Sreejobs Logo
   For Latest Job Updates 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
SreeJob Fees   Feeds
Hot Jobs
Welcome Guest
Login | Register
Total No Of Questions: 100.
1) A developer wants to create a portable EJB 3.0 application that includes the following class definition for the Entity Account: 11. @Entity 12. @EntityListeners(com.acme.AlertMonitor.class) 13. public class Account { 14. // more code here 15. @PrePersist 16. protected void validateCreate() {/* more code here */} 17. } Which statement is correct?

2) Given: 10. @Stateless 11. public void SecureBean01 implements Secure01 { 23. @AllowRoles("ADMIN") 24. public void methodA() {} 10. @Stateless 11. public void SecureBean02 implements Secure02 { 23. @AllowRoles("administrator") 24. public void methodB() {} Which deployer action permits a user authenticated as "John" to call both methodA on SecureBean01 and methodB on SecureBean02?

3) Given : public class MyException extends Exception { } The business interface Foo declares a method work(): 1. public void work() throws MyException; The bean class FooBean contains the following: 10. @Stateless 11. @Remote(Foo.class) 12. public class FooBean { 13. public void work() throws MyException { 14. //do some work not shown here 15. throw new MyException(); 16. } Assuming there is no deployment descriptor, which statement is true when the work() method is invoked by a client with an existing transaction context and execution reaches Line 15?

4) Which is a valid way of injecting a container-managed transaction-scoped persistence context into an EJB 3.0 session bean assuming the application contains only one persistence unit?

5) The execution of the find method in the following code throws an exception: 11. em.find(Customer.class, custId); 12. //Where em is a reference to a extended scoped entity manager. Which scenario can cause the exception?

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

8) A developer creates the following session bean: 10. @Stateless 11. @RolesAllowed("SECRET") 12. public class MyBean implements MyInterface { 13. public void methodA() {} 14. @PermitAll 15. public void methodB() {} 16. @DenyAll 17. public void methodC() {} 18. } No deployment descriptor is supplied. Which two statements are true? (Choose two.)

9) A developer writes a stateless session bean with one local business interface and with container-managed transactions. All business methods have transaction attribute REQUIRED. The bean has an injected field sessionCtx of the type SessionContext. Which two operations are allowed in a business method of the bean? (Choose two.)

10) 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.)
Page 1 of 10
Home | Register for Job Updates | Contact Us