2 ms·
I've been doing mostly Java for over a decade. For me, the session bean is the most useful part of the somewhat artificial amalgam that is JEE/J2EE/whatever.
by ShabbyDoo 17y ago
I've been doing mostly Java for over a decade. For me, the session bean is the most useful part of the somewhat artificial amalgam that is JEE/J2EE/whatever. Need declarative XA transaction management? "Required" is your friend. Want to remote to a service but also use it locally? Yup. Need to control the number of concurrent invocations of a service? Just configure your thread pools.
Don't need any of that stuff? Then, you probably don't need J2EE. I've never used a stateful session bean on a project and haven't heard too many good use cases to justify them. Pre-3.0 EJBs were a disaster, and everybody just used Hibernate. And EJB3 is basically Hibernate anyway.
For lighter-weight Java, the Spring Framework along with annotations takes away a lot of the misery the author discusses.