We are closing all the Queue connection, session and sender properly.
Can you post the reference tree? Also, what JVM do you use?
We are using Sun JDK 1.5
Well, the problem is resolved. The issue was with JMS connection factory. There is some memory leak with 'RMIConnectionFactory'. We changed our code to use 'java:/ConnectionFactory' [in memory connection factory] and now the memory is settling down properly.
Just to add:
The leak in RMIConnectionFactory is visible, if we have a client which calls stateless session bean and this SLSB in turn pushes a message to JMS Queue.
I am new to jboss. Our application has a memory leak on the similar issue. some UIL2 threads keep multiplying about every minute. An example of such thread follows on the bottom of my message.
My question is this: Where do i change the connection factory type to "java:/ConnectionFactory"? I searched all of my jboss config files for "RMIConnectionFactory" and did not fing any references.
We are using jboss version 4.0.1
If you can offer any advice, it would be really appreciated.
Name: UIL2(SocketManager.MsgPool@f34a08 client=192.168.30.237:8093)#1
State: TIMED_WAITING on EDU.oswego.cs.dl.util.concurrent.LinkedNode@eaabad
Total blocked: 0 Total waited: 2
I am not sure about JBoss 4.0.1 version as we are using JBos 4.2.
But, here is a link you can have a look to find more details about where you can change RMIConnectionFactory settings.
You may need to comment the ConnectionFactory settings in deploy/jms/rmi-il-service.xml and enable the same in deploy/jms/jvm-il-service.xml.
Hope this would be useful.
It's recommended practice to use JCA (i.e. java:/JmsXA ) for all your in-server messaging. Using JCA will guard against resource leakage in your own code.
It's also better practice code against a generic entity (JNDI entry) than a particular provider name.