-
1. Re: Controling the number of stateless session bean instance
callum Nov 24, 2001 12:27 PM (in response to conora)Hi there,
I would think you would be able to add another container configuration for this particular type of stateless bean to the conf/tomcat/standardjboss.xml file and then refer to that configuration in your jboss.xml for that particular bean. Alternatively you can add the configuration definition into your jboss.xml file instead of the standard xml.
Either way it should work (though haven't tried it)
Callum -
2. Re: Controling the number of stateless session bean instance
jimboj Nov 24, 2001 12:39 PM (in response to conora)Hey,
I would probably suggest that you use a socket factory and pool and use the bean to retrieve a socket from the pool. I'm not so sure its a good idea to have a socket associated entirely with a bean instance. This way you can configure the pool and factory to limit the number of sockets and just use the bean as a facade or consumer of the sockets
J -
3. Re: Controling the number of stateless session bean instance
conora Nov 26, 2001 5:32 AM (in response to conora)Thanks for your thoughs....
I've had a few over the weekend myself....
1) Add an interceptor which effectively blocks until
a socket becomes free
2) Write a connector ? -
I like the socket factory and pool idea ....
Is there anywhere where I might find some more details
about this approach?
Conor -
4. Re: Controling the number of stateless session bean instance
jimboj Nov 28, 2001 10:00 AM (in response to conora)Hi Conor,
Not sure if its in the J2EE catalog, or something similar at http://developer.java.sun.com/developer/restricted/patterns/J2EEPatternsAtAGlance.html but you could start with a singleton/facade that maintains a pool of connections and provides possibly synchronised access to obtain and return them. The facade/pool could be configured or initialized statically with the appropriate number of connections, or it could start with none and grow to a maximum when connections are required. There will be plenty of code around to demonstrate the use of pooling of resources
J