Reputation: 18368
I am reading the book. It said the Singleton session bean
will never be re-created in the event of a system exception, unlike other kind of session beans. So, I have some questions.
Will both of stateless
and stateful
session beans be re-created in the event of a system exception ?
When the singleton
session bean instance encounters exceptions, could it continue to work well to response other requests ?
Upvotes: 0
Views: 117
Reputation: 33936
Stateless beans are created for every method call as necessary. Stateful beans will be destroyed, and the client needs to explicitly create a new one.
Yes, singleton beans are never destroyed, so the same instance will be used for subsequent method calls even when beans of another type would be destroyed.
Upvotes: 0