I would also like to know why there are no merged EJBs. But I want to know why they are combined, and not created and destroyed on demand. The fact that instances can be reused for unrelated queries greatly complicates the implementation of stateless beans (which means you have to be incredibly careful in using instance fields), and I don't see any significant advantages in this.
In particular, I do not see any performance benefits. I tried to implement coreless beans in JBoss (6, IIRC) and its only bean instance that combined; The water pipe to handle the method call is recreated from scratch every time it is used. This means that the only preservation of performance is the creation of a single object, which should be trivial time. The only situation when I see that it is not trivial is if the w810 acquires heavy resources and keeps them between calls. However, in this case, the bean is indeed used as an illustrious, poorly managed pool; the right solution would be to pool resources directly!
EJB has been around for a long time. When they first appeared, building an object was expensive, so it was wise to combine them. But these days are long gone. Why was the pool not reset in EJB3?
source share