We're caching a JMS ConnectionFactory to reduce the number of repetitive JNDI lookups in some code deployed under Websphere Application Server 6.0.x. However we're seeing a number of heap dumps and investigation has indicated that this cached object is holding onto a huge number of references within com.ibm.ejs.j2c.poolmanager.PoolManager
We've checked the Sun API for the javax.jms.ConnectionFactory interface and it indicates:
"An administered object should not hold on to any remote resources" and "Clients should think of administered objects as local Java objects. Looking them up should not have any hidden side effects or use surprising amounts of local resources."
The IBM implementation of this interface is com.ibm.ws.sib.api.jms.impl.JmsManagedConnectionFactoryImpl. Are we wrong in holding on to a reference of this class or is there some other cause to this large consumption of memory?
Many thanks,
Stephen
Regards,
Brian
You should be fine caching the connection factory. As Brian suggests, it
sounds like your problem is more to do with the number of connections
that are being created on the connection factory.
Regards,
David