bettyallen's picture
From bettyallen rss RSS  subscribe Subscribe

310-091 Study material 



Troytec.com is a place where you can find various types of 310-091 exam certifications preparation material. Troytec’s full range of study material for the 310-091 exam helps you to be prepared for the 310-091 exam fully and enter the exam centre with full confidence.We provide you easy, simple and updated study material. After preparing from the 310-091 exam material prepared by us we guarantee you that you will be a certified professional. We guarantee that with Troytec 310-091 study material, you will pass the Certification exam.

 

 
 
Tags:  310-091 Exams  310-091 Certification  310-091 Training  310-091 Practice Exams  310-091 Tests  310-091 Exam Materials  310-091 download 
Views:  887
Downloads:  11
Published:  March 08, 2010
 
0
download

Share plick with friends Share
save to favorite
Report Abuse Report Abuse
 
Related Plicks
Test1pass 310-091 Learning Materials

Test1pass 310-091 Learning Materials

From: xuchun3898329
Views: 333 Comments: 0
310-091 questions and answers,310-091,310-091 exam,free 310-091 example,Test1pass 310-091 braindumps
 
640-802 Practice Tests & Exams

640-802 Practice Tests & Exams

From: carolsmith62
Views: 2807 Comments: 0

CertMagic.com is a place where you can find various types of 640-802 exam certifications preparation material. CertMagic’s full range of study material for the 640-802 exam helps you to be prepared for the 640-802 exam full (more)

 
642-542 Practice Tests & Exams

642-542 Practice Tests & Exams

From: carolsmith62
Views: 2641 Comments: 0
CertMagic.com is a place where you can find various types of 642-542 exam certifications preparation material. CertMagic’s full range of study material for the 642-542 exam helps you to be prepared for the 642-542 exam fully and enter the exam centr (more)

 
4h0-100 Exam

4h0-100 Exam

From: Seal.heart
Views: 503 Comments: 0
CertMagic.com is a place where you can find various types of 4h0-100 exam certifications preparation material. CertMagic’s full range of study material for the 4h0-100 exam helps you to be prepared for the 4h0-100 exam fully and enter the exam centr (more)

 
See all 
 
More from this user
TB0-107 Study material

TB0-107 Study material

From: bettyallen
Views: 1716
Comments: 0

199-01 Study material

199-01 Study material

From: bettyallen
Views: 1049
Comments: 0

9A0-062 Study material

9A0-062 Study material

From: bettyallen
Views: 795
Comments: 0

000-089Study material

000-089Study material

From: bettyallen
Views: 712
Comments: 0

1T6-540 Study material

1T6-540 Study material

From: bettyallen
Views: 782
Comments: 0

642-513 Study material

642-513 Study material

From: bettyallen
Views: 359
Comments: 0

See all 
 
 
 URL:          AddThis Social Bookmark Button
Embed Thin Player: (fits in most blogs)
Embed Full Player :
 
 

Name

Email (will NOT be shown to other users)

 

 
 
Comments: (watch)
 
 
Notes:
 
Slide 1: 310-091 Sun Certified Bus. Component Developer Java EE Platform 5 Exam: 310-091 Demo Edition © 2008 - 2009 Test Killer, LTD All Rights Reserved 1 http://www.testkiller.com http://www.troytec.com
Slide 2: 310-091 QUESTION: 1 Which is a valid Post Construct method in a message-driven bean class? A. @Post Construct public boolean init() { return true; } B. @Post Construct private static void init() {} C. @Post Construct private void init() {} D. @Post Construct public static void init() {} Answer: C QUESTION: 2 Given: 11. Entity public class X { 12. @ld int id; 13. Y y, 14.} A public class Y with NO Java Persistence annotations is defined in the same package.Which statement is correct about these classes if NO other annotations and mapping descriptors are provided? A. Class Y must be serializable. B. Class Y must be marked as an entity. C. The entity X is not defined correctly. The field y must be marked as @Lob. D. Class Y must be accessed by a persistence application through a public interface. Answer: A QUESTION: 3 A developer is working on a user registration application using EJB 3.0. A business method register User in stateless session bean RegistrationBean performs the user registration. The register User method executes in a transaction context started by the client. If some invalid user data causes the registration to fail, the client invokes register user again with corrected data using the same transaction. Which design can meet this requirement? A. Have register User method call EJBContext.setRollbackOnly() method after registration fails. 2 http://www.testkiller.com http://www.troytec.com
Slide 3: 310-091 B. Have register User method throw javax.ejb.EJBTransactionRequiredException after registration fails. C. Have register User method throw EJBException without marking the transaction for rollback, after registration fails. D. Create an application exception with the rollback attribute set to false and have register User method throw it after registration fails. Answer: D QUESTION: 4 Which two class types must be implicitly or explicitly denoted in the persistence.xml descriptor as managed persistence classes to be included within a persistence unit? (Choose two.) A. Entity classes B. Interceptor classes C. Embedded classes D. Entity listener classes Answer: A, C QUESTION: 5 Which statement about the combination of mapping defaults, annotations, and XML descriptors is correct? A. All mapping annotations must always be processed by the persistence provider. B. Some annotations, like the @Entity annotation, must always be processed by the persistence provider. C. The mapping information for an entity class specified by annotations and in XML descriptors must be distinct. D. If multiple entity listeners are defined, the order in which they are invoked can be defined or overwritten in the XML descriptor. Answer: D QUESTION: 6 Which statement about an entity instance lifecycle is correct? A. A new entity instance is an instance with a fully populated state. B. A detached entity instance is an instance with no persistent identity. C. A removed entity instance is NOT associated with a persistence context. 3 http://www.testkiller.com http://www.troytec.com
Slide 4: 310-091 D. A managed entity instance is the instance associated with a persistence context. Answer: D QUESTION: 7 A developer implements a session bean with a method doStuff which behaves differently depending on the caller’s security role. Only users in security roles “ADMIN” and “USER” are allowed to call the method. Assume that there is no security-related metadata in the deployment descriptor. Which two, taken in combination, are appropriate to accomplish this? (Choose two.) A. Annotate method doStuff with @PermitAll. B. Annotate method doStuff with @RolesAllowed({”ADMIN”,”USER”}) C. lf EjBContext.getCallerPrincipal returns role “ADMIN”, implement the behavior for users in role ADMIN. D. If EJBContext.isCallerlnRole(”ADMIN”) returns true, implement the behavior defined for users in role “ADMIN”. Answer: B, D QUESTION: 8 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? A. The validateCreate method may NOT throw runtime exceptions. B. The validateCreate method can invoke the EntityManager.flush operation. C. Methods of the class com.acme.AlertMonitor annotated with callback annotations must take an Object or Account instance as the only argument. D. The above class definition is NOT correct. An entity cannot define a callback method like PrePersist and use the EntityListeners annotation at the same time. Answer: C 4 http://www.testkiller.com http://www.troytec.com
Slide 5: 310-091 QUESTION: 9 Given: 11. @PersistenceContext EntityManager em; 12. public boolean test(Order o){ 13. boolean b = false; 14. o = em.merge(o); 15 em.remove(o); 16. o = em.merge(o); 17. b = em.contains(o); 18. return b; 19. } Which statement is correct? A. The method will return TRUE. B. The method will return FALSE. C. The method will throw an exception. D. The Order instance will be removed from the database. Answer: C QUESTION: 10 The deployment descriptor for a stateless session bean that uses the isCallerlnRole method reads as follows: 3. <security-role-ret> 4. <role-name>manager</role-name> 5. <role-link>humanresources</role-link> 6. <security-role-ret> 16. <security-role> 17. <description> 18. Is allowed to view and update all employee records. 19. </description> 20. <role-name>humanresources</role-name> 21. </security-role> Which two roles are responsible for creating this deployment descriptor? (Choose two.) A. Deployer B. Bean Provider C. System Administrator D. Application Assembler Answer: B, D 5 http://www.testkiller.com http://www.troytec.com
Slide 6: 310-091 QUESTION: 11 Given two entities with a many-to-many bidirectional association between them: 11 @Entity public class Employee { 12. Collection projects; 13. // more code here 14. } and 11. @Entity public class Project{ 12. Set<Employee> emps; 13. // more code here 14. } What set of annotations correctly defines the association? A. @ManyToMany on the projects field, @ManyToMany(mappedBy=”projects”) on the emps field B. @ManyToMany(mappedBy=”emps”) on the projects field, @ManyToMany on the emps field C. @ManyToMany(targetEntity=Project.class) on the projects field, @ManyToMany(mappedBy=”projects”) on the emps field D. @ManyToMany(targetEntity=Project.class) on the projects field, ManyToMany on the emps field Answer: C QUESTION: 12 Given code snippets from two files: 7. public class Dog { 8. public void onMessage(Message m) { System.out.print(’1”); } 9. } and 10. @MessageDriven 11. class MessageDog extends Dog implements MessageDrivenBean { 12. MessageDog(Message m) { System .out.print(“2”); } 13: } Which four code changes, when used together, create a valid JMS message-driven bean?(Choose four.) A. Make class MessageDog public. B. Make the MessageDog constructor no-arg. C. Make the MessageDog constructor public. D. Move the onMessage method to class MessageDog. E. Change MessageDog so that it is NOT a subclass of Dog. F. Make class MessageDog implement MessageListener instead of MessageDrivenBean. 6 http://www.testkiller.com http://www.troytec.com
Slide 7: 310-091 Answer: A, B, C, F QUESTION: 13 Which statement about entity manager is true? A. A container-managed entity manager must be a JTA entity manager. B. An entity manager injected into session beans can use either JTA or resource-local transaction control. C. An entity manager created by calling the EntityManagerFactory.createEntityManager method always uses JTA transaction control. D. An entity manager obtained through resource injection in a stateful session bean can use a resource-local EntityTransaction for transaction control. Answer: A QUESTION: 14 Which two options can be used to predefine Java Persistence queries for easy use? (Choose two.) A. @NamedQuery annotation B. @NamedNativeQuery annotation C. using the named-query element in the XML descriptor D. using the named-native-query element in the XML descriptor Answer: A, C QUESTION: 15 Given a set of CMT bean methods with the following transaction attributes: Method M1 =SUPPORTS Method M2=REQUIRED Method M3=NOT SUPPORTED Method M4=REQUIRES_NEW And the following method invocation sequence: Method M1 invokes Method M2 Method M2 invokes Method M3 Method M1 invokes Method M4 If Method M1 is invoked by a method that does NOT have a transaction context, which describes a possible scenario? A. Method M1: no transaction 7 http://www.testkiller.com http://www.troytec.com
Slide 8: 310-091 Method M2: new transaction Method M3: no transaction Method M4: new transaction B. Method M1: no transaction Method M2: Container throws EJBTransactionRequiredException C. Method M1: new transaction Method M2: runs in same transaction as M1 Method M3: Container throws TransactionNotSupportedException D. Method M1: no transaction Method M2: new transaction Method M3: Container throws TransactionNotSupportedException Answer: A QUESTION: 16 A developer wants to create a Java Persistence query that returns valid U.S. phone numbers (formatted as “123-456-7890” or “800-RUN-EJB3”) from a collection of differently formatted international phone numbers. The developer needs only those numbers that begin with 303. Which WHERE clause is correct? A. WHERE addr.phone LIKE ‘303_’ B. WHERE addr.phone LIKE ‘303%’ C. WHERE addr.phone LIKE ‘303-_-_’ D. WHERE addr.phone LIKE ‘303-%-%’ E. WHERE addr.phone LIKE ‘303-F. WHERE addr.phone LIKE ‘303-%%%-%%%%’ Answer: E QUESTION: 17 A developer is working on a project that includes both EJB 2.1 and EJB 3.0 session beans. A lot of business logic has been implemented and tested in these EJB 2.1 session beans. Some EJB 3.0 session beans need to access this business logic.Which design approach can achieve this requirement? A. Add adapted home interfaces to EJB 3.0 session beans to make EJB 3.0 and EJB 2.1 session beans interoperable. B. Add EJB 3.0 business interfaces to existing EJB 2.1 session beans and inject references to these business interfaces into EJB 3.0 session beans. C. No need to modify existing EJB 2.1 session beans. Use the @EJB annotation to inject a reference to the EJB 2.1 home interface into the EJE 3.0 bean class. 8 http://www.testkiller.com http://www.troytec.com
Slide 9: 310-091 D. No need to modify existing EJA 2.1 session beans. Use the @EJB annotation to inject a reference to the EJA 2.1 component interface into the EJB 3.0 bean class. Answer: C QUESTION: 18 A developer is modifying an existing Java EE application that uses the JDBC API to access a database. This code must be used but cannot be changed, and new code needs to be added that uses the Java Persistence API. Both parts of the code will execute in the same JTA transaction.Which method of the EntityManager interface should the new code use to ensure that the data read by JDBC statements includes the state of managed entities? A. Call refresh on each changed entity. B. Call flush at the end of each business method. C. Call find before accessing any managed entity. D. Call lock at the beginning of each business method. Answer: B QUESTION: 19 A developer wants to achieve the following two behaviors for an EJB 3.0 session bean: (1) If the client calls a business method with a transaction context, the container will invoke the enterprise bean’s method in the client’s transaction context. (2) If the client calls a business method without a transaction context, the container will throw the javax.ejb.EJBTransactionRequiredException. Which transaction attribute should be used? A. REQUIRED B. SUPPORTS C. MANDATORY D. REQUIRES_NEW E. NOT_SUPPORTED Answer: C QUESTION: 20 Given a stateless session bean with container-managed transaction demarcation, from which two methods can a developer access another enterprise bean? (Choose two.) A. bean constructor B. Timeout callback method 9 http://www.testkiller.com http://www.troytec.com
Slide 10: 310-091 C. PreDestroy lifecycle callback method D. PostConstruct lifecycle callback method E. business method from the business interface Answer: B, E 10 http://www.testkiller.com http://www.troytec.com

   
Time on Slide Time on Plick
Slides per Visit Slide Views Views by Location