Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] JMS Cache coordination configuration issue

Hi there, 

I was following some old threads about solving problems related to cache coordination. In my last attempt I tried to adapt the implementation of the CacheCoordinationSessionCustomizer.java, in the eclipselink's test repository.

My current implementation of SessionCustomizer is as follows:

public void customize(Session arg0) throws Exception {
session.setProperty( "cachecoordination.protocol", "jms" );

RemoteCommandManager rcm = new RemoteCommandManager( (DatabaseSessionImpl) session );

JMSTopicTransportManager tm = new JMSTopicTransportManager(rcm);
tm.setTopicHostUrl( "ormi://<ip>:23791/Referencia" );
tm.setTopicName( "jms/TopicoCoordenacaoCacheCNIS" );
tm.setTopicConnectionFactoryName( "jms/TopicConnectionFactoryCNIS" );
rcm.setTransportManager( tm );
rcm.getTransportManager().setUserName( "oc4jadmin" );
rcm.getTransportManager().setPassword( "topsecret" );
rcm.setShouldPropagateAsynchronously( false );
rcm.getTransportManager().setNamingServiceType( TransportManager.JNDI_NAMING_SERVICE );
rcm.getTransportManager().setInitialContextFactoryName( "oracle.j2ee.rmi.RMIInitialContextFactory" );
rcm.getTransportManager().setShouldRemoveConnectionOnError( true );
rcm.setServerPlatform(((org.eclipse.persistence.sessions.DatabaseSession) session).getServerPlatform());
((DatabaseSessionImpl) session).setCommandManager(rcm);
((DatabaseSessionImpl) session).setShouldPropagateChanges(true);
rcm.initialize();

// Sleep to allow RCM to startup and find each session.
try {
Thread.sleep(2000);
} catch (Exception ignore) {
}
}

And in my persistence.xml I have:

<property name="eclipselink.session.customizer" value="packagepath.CacheCustomizer"/>

Well, the problem I'm running into is (just the root of the exception) (sorry for the topic description in portuguese. I did not translate the original exception message for maintaining the exception transcription exactly as I got it):

Caused by: javax.jms.InvalidDestinationException: JMSServer[null:9127]: destination "Tópico para coordenação de cache L2 do eclipselink" is unknown in connection "Oc4jJMS.Connection.null.62d6aaf9:12651f748d4:-8000.4".
at com.evermind.server.jms.JMSUtils.make(JMSUtils.java:1075)
at com.evermind.server.jms.JMSUtils.toInvalidDestinationException(JMSUtils.java:1137)
at com.evermind.server.jms.JMSProvider.findDestination(JMSProvider.java:935)
at com.evermind.server.jms.JMSProvider.findDestination(JMSProvider.java:893)
at com.evermind.server.jms.JMSProvider.createConsumer(JMSProvider.java:450)
at com.evermind.server.jms.EvermindMessageConsumer.<init>(EvermindMessageConsumer.java:87)
at com.evermind.server.jms.EvermindTopicSubscriber.<init>(EvermindTopicSubscriber.java:50)
at com.evermind.server.jms.EvermindTopicSession.createSubscriber(EvermindTopicSession.java:83)
at com.evermind.server.jms.EvermindTopicSession.createSubscriber(EvermindTopicSession.java:74)
at org.eclipse.persistence.internal.sessions.coordination.jms.JMSTopicRemoteConnection.<init>(JMSTopicRemoteConnection.java:78)
at org.eclipse.persistence.sessions.coordination.jms.JMSTopicTransportManager.createConnection(JMSTopicTransportManager.java:101)
... 85 more

I tried search for this error message but just found people with the same problem, but no one with a working solution or, at least, some comment about what is going wrong here.

Does anyone have any hint about what I am doing wrong?

Regards,

Loreno

PS1: I'm doing my first steps on the JMS field. Actually, this is my first incursion in a solution that involves JMS...
PS2: I'm using version 1.1.1 of eclipselink
PS3: I have two copies of the same appliaction running on different hosts. Everything goes just fine in the application deployed in the same host as the JMS topic. The problem above occurs when I try to use the application deployed in the second host, which tries to get access to the topic configured in the first host.

Back to the top