Sreejobs Logo
   For Latest Job Updates  
sreenutech.com Online Exams
Home Govt Jobs IT Fresher Jobs IT Exp Jobs IT Walk-Ins MBA Jobs BPO Jobs Register FAQ’s Post Job Contact Us
Search:
SreeJob Fees   Feeds
Hot Jobs
Welcome Guest
Login | Register
Total No Of Questions: 100.
1) A Java Persistence application has been developed for a Java SE environment and the persistence.xml file looks like this: order-mappings.xml com.acme.Order com.acme.Customer com.acme.Item Now the developer wants to repackage it as a Java EE application and try it on several compliant Java EE 5 containers using injection to get an entity manager. Which change is needed to make to the persistence.xml?


2) The syntax of the ORDER BY clause is defined in the Java Persistence API as: orderby_clause ::=ORDER BY orderby_item {, orderby_item}*Which statement is correct about the use of ORDER BY clauses?


3) A User entity is in a one-to-many relationship with a Book entity. In other words, a developer can reach the collection of books that a User instance myUser has by using the path expression "myUser.books". A developer wants to write a Java Persistence query that returns all users that have only two books. Which two are valid queries that return this information? (Choose two.)


4) Given the following stateless session bean implementation classes: 10. @TransactionAttribute(TransactionAttributeType.MANDATORY) 11. public class MySuper { 12. public void methodA() {} 13. public void methodB() {} 14. } 10. @Stateless 11. public class MyBean extends MySuper implements MyInt { 12. public void methodA() {} 13. 14. @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW) 15. public void methodC() {} 16. } 10. @Remote() 11. public interface MyInt { 12. public void methodA(); 13. public void methodB(); 14. public void methodC(); 15. } Assuming no other transaction-related metadata, what are the transaction attributes of methodA,methodB, and methodC respectively?


5) A developer writes an enterprise application and packages it into an enterprise archive (EAR). The application contains one persistence unit with unit name "FooPU". The application also contains an ejb-jar with one stateless session bean. Which code, when added to the stateless session bean class, injects a container-managed persistence context at runtime?


6) The Java Persistent API defines certain rules for persistent entities. These rules are required by the persistent provider to manage entities at runtime. Which statement is correct, assuming NO mapping descriptor is used?


7) Consider a deep inheritance hierarchy consisting of Java Persistence entity classes, non-entities, and mapped superclasses. Which statement is correct, assuming NO mapping descriptor is present?


8) A developer is working on a user registration application using EJB 3.0. A business method registerUser in stateless session bean RegistrationBean performs the user registration.The registerUser method executes in a transaction context started by the client. If some invalid user data causes the registration to fail, the client invokes registerUser again with corrected data using the same transaction. Which design can meet this requirement?


9) A business method of a stateless session bean with a transaction attribute REQUIRED executes a Java Persistence query on a container-managed persistence context.Under which two conditions can the developer expect the persistence provider to ensure that all changes made to the persistence context in the transaction are visible to the processing of the query? (Choose two.)


10) A developer wants to implement a relationship between Company and Department entity classes. Every department belongs to one company, and one company has several departments. In this application it is essential to quickly determine which company a department belongs to and to also easily access all departments of a given company. Which two declarations provide a solution to these requirements? (Choose two.)
Page 1 of 10
Home | Register for Job Updates | Contact Us