You're right, that's the best way to do it...

Thanks a lot

florent

Sagi Mann a écrit :
Florent,
I can send it in about 24 hrs, since I have it on another box which I
currently don't have access to. I'll send me a reminder, but I expect
until then to post it on JIRA and send you the link instead... will be
more useful for other people who may need it (like Tony from 1 min
ago...)

thanks.

Sagi Mann

-----Original Message-----
From: Florent Blondeau [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 18, 2007 02:55 PM
To: HttpClient User Discussion
Subject: Re: [GlassFish] Using HttpClient from within an App server

Hi,

That's nice of you... And yes, I'm very interested.
If there's no place to share it, i'd be grateful if you send it to
my address

Thanks a lot

Florent

Sagi Mann a écrit :
Hi,
I've created a resource adapter (JCA 1.5) that is based on HttpClient
3.1. I call it from EJB's who need to access http servers. It's not
very fancy, but it may be a good start. Anyone interested? If so,
where do I post it?


Sagi Mann

-----Original Message-----
From: Florent Blondeau [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 18, 2007 01:37 PM
To: HttpClient User Discussion
Subject: Re: [GlassFish] Using HttpClient from within an App server

Thanks for your answers,

5 000 is not a real limit,  It will depends on the load tests, and  I
don't really expect to reach that number.
As my app is distributed, I can increase the number of machines if
resources are too much stressed.
I understand better what really is the MTHCM... I think I will have to
make a custom WorkManager which could
take care of the connections itself if I want to use a single instance
of HttpClient and then get better performances...
It's a pretty hard thing to do I think, and I'm going to see that later,
if the perfs are really a problem.
 I'm going to try the multiple instances  solution. I will keep in mind
your wise advise about closing connections

Thanks to all

Florent

Raymond Kroeker a écrit :

You will probably; hit a ceiling in terms of a total number of open file
handles before you get to 5000.

Raymond

On Dec 17, 2007 11:35 AM, Roland Weber <[EMAIL PROTECTED]> wrote:



Hello Florent,



As I can't create threads directly in the App server, I can't use the
MultiThreadedHttpConnectionManager...


MTHCM is not really multithreaded, it is just thread-safe for use
in multithreaded applications. Unfortunately though, there is one
background thread for connection GC. You could copy MTHCM and
remove the connection GC mechanism. It's not easy though, the
code is rather complex.



Can I use as many HttpClient
instances as the number of
threads I have (about 5000) ?


You can, if you can live with 5000 connections being open
at the same time. Just make _very_ sure that you close
the connections (SimpleHttpConnectionManager.shutdown,
or create with the auto-close flag) once you don't need
them anymore.

hope that helps,
 Roland


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









--
Pingwy
27, rue des arènes
49100 Angers

Reply via email to