Hello.
This message is more of a design question, sorry if it doesn't belong to this list.
Stateless session beans are usually used to implement service-like features, such as a
CalculatorBean which might have functionality for doing certain kind of calculations.
The Staless session beans works fine here.
But if I have a service that needs to connect to some kind of resource, e.g. a CORBA
service, how should that be implemented with Statless session beans?
The bean is stateless in one sense since it doesn't change it's state between calls,
but it is stateful in another sense, since it must contain a state to be able to call
external resources.
My first approach was to put all "state initialization" in the ejbCreate method, but
that might not work if the connection setup is slow.
My second approach was to let the clients keep the references to the service beans
they use, and use the same bean on each call. I don't know if that is appropriate to
do according to EJB though.
Question: How should this be implemented?
The way to do this in "no-ejb"-Java would be through connection pools I guess ...
which is straght forward and easy, but connection pools of ejb's, hm, that should be
handled by the container, right!?
/ Jonas
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user