Hi,
I at least don't understand what state you are referring to as necessary to
call external resources.

How is this different from doing some jdbc-sql in a stateless session bean?

Do you want to maintain a pool of "connections" to the corba resource?

Possibly you are looking for resource adapters from the Java Connector
Architecture? (JCA spec is in pfd2, jboss support in jbosscx).  This
provides a uniform way of among other things pooling connections to legacy
resource managers (databases, ERP, other transaction monitors, etc) under
various levels of transaction support.

david jencks

On 2001.05.06 07:08:27 -0400 [EMAIL PROTECTED] wrote:
> 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
> 


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to