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)
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
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?
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