This week's book giveaway is in the Spring forum.
We're giving away four copies of Spring Boot in Practice and have Somnath Musib on-line!
See this thread for details.
Win a copy of Spring Boot in Practice this week in the Spring forum!

mukesh singhania

Greenhorn
+ Follow
since Dec 30, 2003
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by mukesh singhania

Q 4) specification says Bean class should not define a constructor, because container uses a no-argument constructor to create bean instances, to create a pool when bean is deployed, if any constructor is defined, there should be a no-argument constructor to facilitate this activity. further as client does't instantiate bean class using a constructor, there is no use of defining a constructor.
Q 7) answer b is correct because, when finder method is called, a bean instance is pooled and populated with the data using the primary key. in this state its associated with the EJB remote stub, and ready to serve the client requests.
according to EJB specification once a stateful been is passivated, bean instance is removed from memory, a new instance is created and used to activate and serve another request. As bean is stateful, state is maintained and same instance can not be used for other requests.