-----Original Message-----
From: Bruno Dumant [mailto:[EMAIL PROTECTED]]
Sent: Monday, December 18, 2000 10:22 AM
To: Halas, Miroslav
Cc: DUMANT Bruno FTRD/DTL; '[EMAIL PROTECTED]'; Jonathan
Subject: Re: FW: Bug in Jonas/Jeremie - Increasing Thread count
Miro,I have finally reproduced your problem, thanks to the traces your sent me last friday.
As I said before, the problem was not with threads but with connections, and more precisely with the handling of localhost. It seems that you try to access your registry using localhost as host name. I was able to reproduce your problem using the -Djava.naming.provider.url=jrmi://localhost option. Then, there were two problems:
The problem is now solved. I have committed the changes in the CVS repository. They should be available in the next Jonas release.
- first, the registry was not recognised as being local. This is due to the fact that to recognise that a server is local, Jonathan tries to match the host address and port number of the server with those of the created server sockets. When the network is on, the host address of the server socket is the real IP address, not 127.0.0.1.
Since the registry was not recognised as being local, Jonathan tries to create a client connection to it.- second, client connections were never reused. This is due to a similar reason : client connections are stored in a hashtable, indexed by their host address and port number, the host address used being the real host name of the socket. Since, when the network is on, the host address is never 127.0.0.1, the already present client connections were not reused, and a new one was created, causing the creation of two threads : one for the client side, the other for the server side.
"Halas, Miroslav" wrote:
Then the next step was that I made the naming context static so all beansYes, a new registry reference was created for each naming context, and consequently a socket connection and two threads.
are reusing the same naming context. The number of created threads decreased
a lot (we still create NamingContext for each HTTP request in the servlets)
which signals me that the threads are connected as a consequence of creation
of naming context and these threads are never terminated when the naming
context is closed.My questions are:I believe it is...1. Is it correct what we do with naming context (to keep it open for longer
time)?2. Is there a connection between creating naming context in the beans andThere was. Now, even if the registry is remote, you will be able to reuse an existing connection, which means that new threads won't be created.
creation of threads in Jonas JVM?3. Is is a bug in Jonas/Jeremie that these threads are not cleand up when weNo, it was not the problem. The problem was that created threads were not closed when the reference to the registry was lost. This is also solved now.
close the naming context or is it our problem?Thanks to everybody for help with diagnosing this problem,Thanks for your patience !Bruno
--
*******************************************************************
Bruno Dumant
DTL/ASR
france telecom R&D
38-40 rue du g�n�ral Leclerc
92794 Issy Moulineaux Cedex 9
FRANCEmailto:[EMAIL PROTECTED]
tel: +33 1 45 29 46 03
fax: +33 1 45 29 66 04
*******************************************************************
Thanks
Bruno for your time and help. This is a great news. Do you have any expectation
when you expect new binary release of Jonas (this is quite big issue for
us)
Miro
- Re: FW: Bug in Jonas/Jeremie - Increasing Thread count Bruno Dumant
- RE: FW: Bug in Jonas/Jeremie - Increasing Thread coun... Halas, Miroslav
- RE: FW: Bug in Jonas/Jeremie - Increasing Thread coun... Halas, Miroslav
- Re: FW: Bug in Jonas/Jeremie - Increasing Thread ... Bruno Dumant
- Halas, Miroslav
