hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gareth Davis <gar...@logicalpractice.com>
Subject Re: Invoke a httpclient in a EJB
Date Thu, 05 Aug 2004 10:26:31 GMT
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

gareth@logicalpractice.com
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: commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org


Mime
View raw message