EJB + threads + httpclient... yes does break the letter of the spec's, but yep it works and it works just fine.

Who ever wrote the spec that said you couldn't open a socket in an EJB really wasn't living in the real world.

The only thing to watch is that MultiThreadedConnectionManager does start it's own thread for managing the pool, this does work in an EJB but it won't be shutdown correctly when the application is stopped, you may find that you create a thread leak.

Having said this I've only tried this in WebSphere 4 and 5. Version 4 it wasn't a big deal as the process for the appserver got restarted when re-installing the app, but in websphere 5 it caused a leak.

Gareth Davis
Logical Practice Systems Limited

[EMAIL PROTECTED]
On 4 Aug 2004, at 16:20, Karthikeyani K wrote:

Hi,
We have all requests posted to a servlet which delegates the request to a Stateless Session Bean. Does creatring and invoking a Httpclient postmethod in a helper class invoked by the Stateless Session Bean violate any of the EJB specifications. (EJB spec says sockets are not to be created in EJB code etc. ). Please suggest.



Thanks, Karthi

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to