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) Which statement is true about the Timer service in an EJB 3.0 stateless session bean?


2) The deployment descriptor for a stateless session bean that uses the isCallerInRole method reads as follows: 3. 4. manager 5. humanresources 6. 16. 17. 18. Is allowed to view and update all employee records. 19. 20. humanresources 21. Which two roles are responsible for creating this deployment descriptor? (Choose two.)


3) Given: 5. public interface MrB1 { 6. public interface MrB2 { A java class is defined as: 11. @Stateless 12. public class MrBean implements MrB1,MrB2 { Which two statements are correct for making this code work as a stateless session bean, considering that this session bean is NOT defined in a deployment descriptor and the interfaces do NOT have annotations? (Choose two.)


4) 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?


5) A session bean calls the setRollbackOnly method on the EJBContext interface within a business method with an active transaction. Which two are correct? (Choose two.)


6) FooBean and BarBean are both EJB 3.0 stateless session beans with container-managed transaction demarcation. All business methods in FooBean have transaction attribute REQUIRED, and all business methods in BarBean have transaction attribute REQUIRES_NEW. The business method foo in FooBean invokes the business method bar in BarBean. Given: 10. public class BarBean { 11. public void bar() { 12. throw new RuntimeException("unexpected error..."); 13. } Which is true about the result of this method invocation assuming execution reaches Line 12?


7) A Java Persistence application wants to use optimistic locking. Which statement that describes the functionality of optimistic locking is correct?


8) A Reader entity has a one-to-many, bidirectional relationship with a Book entity. Two Reader entities are persisted, each having two Book entities associated with them. For example, reader1 has booka and bookb, while reader2 has bookc and bookd. Which query returns a Collection of fewer than four elements?


9) Which statement is correct about the Java Persistence API support for the SQL queries?


10) A developer writes a stateful session bean FooBarBean with two local business interfaces Foo and Bar. The developer wants to write a business method called getBar for interface Foo that returns a Bar reference to the same session bean identity on which the client invokes getBar.Which code, when inserted on Line 12 below, implements the getBar method with the wanted behavior? 10. @Resource SessionContext sessionCtx; 11. public Bar getBar() { 12. 13. }
Home | Register for Job Updates | Contact Us