1Z0-895 · Question #95
Assume a client will be accessing a Singleton bean. Which client views is a Singleton bean capable of exposing? (Choose two)
The correct answer is A. Web Service B. Message listener. Singleton session beans are appropriate in the following circumstances. State needs to be shared across the application. A single enterprise bean needs to be accessed by multiple threads concurrently. The application needs an enterprise bean to perform tasks upon application…
Question
Options
- AWeb Service
- BMessage listener
- CEJB 2.x Remote Home
- DEJB 3.x local business
- EJava Persistence API entity
How the community answered
(63 responses)- A76% (48)
- C6% (4)
- D3% (2)
- E14% (9)
Explanation
Singleton session beans are appropriate in the following circumstances. * State needs to be shared across the application. * A single enterprise bean needs to be accessed by multiple threads concurrently. * The application needs an enterprise bean to perform tasks upon application startup and * The bean implements a web service. (A) B: An interceptor method you define in a separate interceptor class takes an invocation context as argument: using this context, your interceptor method implementation can access details of the original session bean business method or message-driven bean message listener method invocation. Singleton Interceptors If your interceptors are stateless, you can use an OC4J optimization extension to the EJB 3.0 specification that allows you to specify singleton interceptors. When you configure a session bean or message-driven bean to use singleton interceptors and you associate the bean with an interceptor class, OC4J creates a single instance of the interceptor class that all bean instances share. This can reduce memory requirements and life cycle overhead. Singleton session beans offer similar functionality to stateless session beans but differ from them in that there is only one singleton session bean per application, as opposed to a pool of stateless session beans, any of which may respond to a client request. Like stateless session beans, singleton session beans can implement web service endpoints. The Java EE 6 Tutorial, What Is a Session Bean? Oracle Containers for J2EE Enterprise JavaBeans Developer's Guide, How do you use an Enterprise Bean in Your Application Exam Questions, Study Guides, Practice Tests. Lead the way to help you pass any IT Certification exams, 100% Pass Guaranteed or Full Refund. Especially Cisco, CompTIA, Citrix, EMC, HP, Oracle, VMware, Juniper, Check Point, LPI, Nortel, EXIN and so on. Our Slogan: First Test, First Pass. Help you to pass any IT Certification exams at the first try. You can reach us at any of the email addresses listed below. Any problems about IT certification or our products, you could rely upon us, we will give you satisfactory answers in 24 hours.
Topics
Community Discussion
No community discussion yet for this question.