Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Cache Coordination: setting reuseJMSTopicPublisher to true when using ActiveMQ as the JMS provider
Cache Coordination: setting reuseJMSTopicPublisher to true when using ActiveMQ as the JMS provider [message #1717691] Wed, 16 December 2015 01:27 Go to next message
Leny Tan is currently offline Leny TanFriend
Messages: 6
Registered: September 2015
Junior Member
Hi,

We currently using EclipseLink 2.2.0 in production with cache coordination using JMS ActiveMQ brokers.

Does anyone know if setting reuseJMSTopicPublisher to true okay with using ActiveMQ as the JMS provider?

The reason I'm asking is that in the Java Doc for "setShouldReuseJMSTopicPublisher" method, it's mentioned that default value false and this is JMS and J2EE compliant.
If we set it to true, the TopicConnection is never reused in different threads.True causes TopicConnection, TopicSession and TopicPublisher to be cached within the JMSTopicRemoteConnection and used for every executeCommand call.

So is it save to set this to true?

Per ActiveMQ recommendation, we should reuse connection, session, producer, consumer.


Thanks in advance.

Regards
Leny
Re: Cache Coordination: setting reuseJMSTopicPublisher to true when using ActiveMQ as the JMS provid [message #1717806 is a reply to message #1717691] Wed, 16 December 2015 20:23 Go to previous messageGo to next message
Chris Delahunt is currently offline Chris DelahuntFriend
Messages: 1389
Registered: July 2009
Senior Member
The documentation states that the flag defaults to false as not all JMS providers support allowing TopicConnections to be concurrently reused. If ActiveMQ is one that does allow using these objects concurrently, then it is safe to set to true, but only ActiveMQ documentation can make this determination.

Best Regards,
Chris
Re: Cache Coordination: setting reuseJMSTopicPublisher to true when using ActiveMQ as the JMS provid [message #1719892 is a reply to message #1717806] Tue, 12 January 2016 22:59 Go to previous message
Leny Tan is currently offline Leny TanFriend
Messages: 6
Registered: September 2015
Junior Member
Thanks for the response.

So, after further investigation, we can set this flag reuseJMSTopicPublisher to true for our GlassFish servers.

I mean prerequisite for connection/ session reuse in ActiveMQ is to make sure we use pooling. Since GlassFish is J2EE container and it can support pooling of JMS connections, sessions, and MessageListeners with using JCA (Java Connector Architecture).

However, not all our production servers are GlassFish containers. We also have some instances of Tomcat.
Tomcat is not J2EE container and we cannot switch to use Apache Tomcat EE for this.

Any experiences in using ActiveMq PooledConnectionFactory to wrap ActiveMQConnectionFactory.
Then this PooledConnectionFactory will be used to create connection, sessions and publisher in publishing JMS messages for cache coordination?

Previous Topic:Recommended Java version
Next Topic:IdentityHashMap gets NPE when trying to put
Goto Forum:
  


Current Time: Fri Apr 26 12:06:31 GMT 2024

Powered by FUDForum. Page generated in 0.03545 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top