Loading questions...
Updated
Want a break from the ads?
Become a Supporter and enjoy a completely ad-free experience, plus unlock Learn Mode, Exam Mode, AstroTutor AI, and more.
Support Examcademy
Your support keeps this platform running. Become a Supporter to remove all ads and unlock exclusive study tools.
Create a free account to unlock all questions for this exam.
Log In / Sign UpA developer needs to deliver a large-scale enterprise application that connects developer chooses an EJB 3.1-compliant application server, which three are true about the EJB business component tier? (Choose three.)
Which API must an EJB 3.1 container make available to enterprise beans at runtime?
A developer creates a stateful session bean that is used by many concurrent clients. The clients are written by other development team; and it is assumed that these clients might not remove the bean when ending their session. The number of concurrent sessions will be greater than the defined bean cache size.
The developer must consider that the state of the session bean can be influenced by either passivation or timeout.
Which three actions should the developer take to make the bean behave correctly in passivation and timeout situations? (Choose three.)
A stateful session bean contains a number of instance variables. The types of instance variables A and B are serializable. Instance variable B is a complex type which is populated by many business calls, and can, therefore, not be refilled by the client without starting all over. A helper instance variable C is defined as having a Serializable type, and can hold all the information which is in variable B. for example, B is of type XML-DOM tree and C of Type String.
Which two solutions, when combined, maintain the state of the session bean over a passivation and activation by the container? (Choose two.)
A developer wants to release resources within a stateless session bean class. The cleanup method should be executed by the container before an instance of the class is removed. The deployment descriptor is NOT used.
Which three statements are correct? (Choose three.)
A developer creates a stateless session bean. This session bean needs data from a remote system. Reading this data takes a long time. Assume that the data will NOT change during the life time of the bean and that the information to connect to the remote system is defined in JNDI.
Which statement describes how to manage the data correctly?
Suppose an EJB named HelloWorldBean is deployed as a standalone ejb-jar. Assuming the HelloWorldBean is implemented as follows:

Which HelloWorldBean methods are accessible by another EJB within the same ejb-jar?
Given the following stateless session bean:

How would you change the EJB to prevent multiple clients from simultaneously accessing the sayHello method of a single bean instance?
Given singleton bean FooEJB:

How many distinct FooEJB bean instances will be used to process the code on the lines 101-105?
A developer writes a Singleton bean that holds state for a single coordinate:

An update thread acquires an EJB reference to CoordinateBean and alternates between invoking SetCoordinate (0, 0) and SetCoordinate (1, 1) in a loop.
At the same time, ten reader threads each acquire an EJB reference to CoordinateBean and invoke getCoordinate () in a loop.
Which represents the set of all possible coordinate values [X, Y] returned to the reader threads?
A developer writes a Singleton bean that uses the java Persistence API within a business method:

Two different concurrently executing caller threads acquire an EJB reference to PersonBean and each invoke the getPerson () method one time. How many distinct transaction are used to process the caller invocations?
Given the following client-side code that makes use of the session bean Foo:
10. @EJB Foo bean1;
12. @EJB Foo bean2;
// more code here
20. boolean test1 = beanl.equals(bean1);
21. boolean test2 = beanl.equals(bean2) ;
Which three statements are true? (Choose three)