I have a remote JMS client writing to a queue on a remote JBoss A-MQ, it currently open&close connection every time it writes a message. I am trying to replace this with pooled connection for better performance. I couldn't find any sample config would meet this need, although you would think this is a very common scenario.
I did find this guide :
but it's for HornetQ. It also says:
A pooled-connection-factory should not have any entry bound in the "java:jboss/exported" namespace because a pooled-connection-factory is not suitable for remote clients.
Which really confuses me: we can't use connection pool for remote clients?
The pooled connection factory is managed my JCA resource adapters. So to use it you need a JMS resource adapter. If your remote client is in a Jboss container you can configure a local pooled connection factory and use it. For a standalone client, you can simple cache your connection, or use some other frameworks (spring?).