Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Cache coordination with tomcat 6
Cache coordination with tomcat 6 [message #1403418] Wed, 23 July 2014 14:39 Go to next message
Sascha Smoo is currently offline Sascha SmooFriend
Messages: 56
Registered: November 2012
Member
Hello,

I'm trying to use EclipseLink cache coordination within my tomcat 6 application. I'm using activeMQ which already works find in my environment. In my server.xml I've defined the following Resources:

 <Resource
        auth="Container"
        brokerURL="tcp://jms:61616?daemon=true"
        description="JMS Connection Factory"
        factory="org.apache.activemq.jndi.JNDIReferenceFactory"
        name="jms/connectionFactory"
        type="org.apache.activemq.ActiveMQConnectionFactory"
    />
    <Resource
        description="Change Notification Topic"
        factory="org.apache.activemq.jndi.JNDIReferenceFactory"
        name="jms/changeNotification"
        physicalName="T.SERVICE.INT"
        type="org.apache.activemq.command.ActiveMQTopic"
    />


And my persistence.xml looks like this:

<property name="eclipselink.cache.coordination.protocol" value="jms" />
<property name="eclipselink.cache.coordination.jms.topic" value="jms/changeNotification" />
<property name="eclipselink.cache.coordination.jms.factory" value="jms/jmsConnectionFactory" />


If I startup my tomcat I get the following exception:

[EL Warning]: 2014-07-23 16:19:35.146--ServerSession(1669472530)--Exception [EclipseLink-22103] (Eclipse Persistence Services - 2.4.1.v20121003-ad44345): org.eclipse.persistence.exceptions.RemoteCommandManagerException
Exception Description: Could not look up remote connection under name jms/jmsConnectionFactory with URL null
Internal Exception: javax.naming.NameNotFoundException: Name jms is not bound in this Context


Any ideas what's wrong? Is it possible with tomcat anyways? Could not find any information about it in the www. Smile

Greetings,
Sascha

[Updated on: Wed, 23 July 2014 17:36]

Report message to a moderator

Re: Cache coordination with tomcat 6 [message #1403496 is a reply to message #1403418] Thu, 24 July 2014 07:57 Go to previous messageGo to next message
Sascha Smoo is currently offline Sascha SmooFriend
Messages: 56
Registered: November 2012
Member
Ok, small update. This did the trick inside the persistence.xml

<property name="eclipselink.cache.coordination.jms.topic" value="java:comp/env/jms/changeNotification" />
<property name="eclipselink.cache.coordination.jms.factory" value="java:comp/env/jms/connectionFactory" />


But... it seems EclipseLink is not sending any notifications via JMS. I can't see the cache coordination working in my logging.

Any assistance? Smile

Greetings,
Sascha

[Updated on: Thu, 24 July 2014 08:59]

Report message to a moderator

Re: Cache coordination with tomcat 6 [message #1403515 is a reply to message #1403496] Thu, 24 July 2014 09:21 Go to previous message
Sascha Smoo is currently offline Sascha SmooFriend
Messages: 56
Registered: November 2012
Member
It seems that EclipseLink JMS Connection is established but EclipseLink is not sending any sync messages. Entities are configured correctly I guess:

@Cacheable(true)
@Cache(type = CacheType.FULL, coordinationType = CacheCoordinationType.SEND_NEW_OBJECTS_WITH_CHANGES)


If I send a text message manually via activeMQ EclipseLink is responding in my logging with:

[EL Warning]: 2014-07-24 11:20:24.706--ServerSession(992328659)--Received unexpected message type: org.apache.activemq.command.ActiveMQTextMessage from topic: T.SERVICE.INT; ignoring


So it seems EclipseLink is listening via JMS, but why isn't it sending any sync messages?

Greetings,
Sascha
Previous Topic:Same code not working same way in JSE as in JEE
Next Topic:Running JPA entity with native queries from TestNG
Goto Forum:
  


Current Time: Tue Mar 19 08:37:32 GMT 2024

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

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

Back to the top