[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[eclipselink-users] RE: Eclipselink in clustered environment.
|
Hi Shashi,
I had been using the following code for the SessionCustomizer to configure RMI Cache Coordination on WebLogic Server:
public void customize(Session session) throws Exception {
Server server = (Server) session;
RemoteCommandManager commandMgr =
new RemoteCommandManager((CommandProcessor) server);
commandMgr.setUrl( System.getProperty("eclipselink.coordination.url"));
commandMgr.setChannel("EclipseLinkChannel");
commandMgr.setShouldPropagateAsynchronously(true);
commandMgr.getDiscoveryManager().setPacketTimeToLive(0);
RMITransportManager transportManager = new RMITransportManager(commandMgr);
transportManager.setNamingServiceType(TransportManager.JNDI_NAMING_SERVICE);
transportManager.setUserName("username");
transportManager.setEncryptedPassword("password");
transportManager.setInitialContextFactoryName( "weblogic.jndi.WLInitialContextFactory");
transportManager.setShouldRemoveConnectionOnError(true);
commandMgr.setTransportManager(transportManager);
server.setCommandManager(commandMgr);
server.setShouldPropagateChanges(true);
if(server.isConnected ()) {
server.getCommandManager().initialize();
}
else
{
server.login();
}
}
Using this code I can create a cluster of two WLS server instances running on the same machine.
I just have to setup the right URL for the JNDI lookup for this current CommandManager as a startup java option with
-Declipselink.coordination.url=t3://hostname:port/...
I hope that helps.
Best regards,
Reinhard Girstenbrei
-----Original Message-----
From: eclipselink-users-request@xxxxxxxxxxx [mailto:eclipselink-users-request@xxxxxxxxxxx]
Sent: 16 July 2010 18:00
To: eclipselink-users@xxxxxxxxxxx
Subject: eclipselink-users Digest, Vol 35, Issue 19
Send eclipselink-users mailing list submissions to
eclipselink-users@xxxxxxxxxxx
To subscribe or unsubscribe via the World Wide Web, visit
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
or, via email, send a message with subject or body 'help' to
eclipselink-users-request@xxxxxxxxxxx
You can reach the person managing the list at
eclipselink-users-owner@xxxxxxxxxxx
When replying, please edit your Subject line so it is more specific
than "Re: Contents of eclipselink-users digest..."
Today's Topics:
1. Eclipselink in clustered environment. (Shashikant Kale)
----------------------------------------------------------------------
Message: 1
Date: Fri, 16 Jul 2010 10:58:28 +0530
From: Shashikant Kale <Shashikant.Kale@xxxxxxxxxxxxxxxx>
Subject: [eclipselink-users] Eclipselink in clustered environment.
To: EclipseLink User Discussions <eclipselink-users@xxxxxxxxxxx>
Message-ID: <FDCD1F56CDE47840ADD853365BBE7FEF04C4ACFF1E@indxchange03>
Content-Type: text/plain; charset="us-ascii"
Hello,
I am trying to setup eclipselink in clustered environment. We don't have JMS provider and hence would like to setup RMI based coordination for L2 cache. However I am finding it difficult to make it work. Looking at various examples and eclipselink cache coordination documentation at http://wiki.eclipse.org/Introduction_to_Cache_%28ELUG%29#Cache_Coordination_API wrote following code
in a SessionCustomizer
session.setProperty("eclipselink.cache.coordination.protocol", "rmi");
//Use default EclipseLinkCommandChannel for propagation
CommandManager cm = new RemoteCommandManager((CommandProcessor)session);
cm.setShouldPropagateAsynchronously(true);
DiscoveryManager dm = cm.getDiscoveryManager();
dm.setAnnouncementDelay(1000);
dm.setMulticastGroupAddress("224.0.0.1");
dm.setMulticastPort("2000");
dm.setPacketTimeToLive(2);
However this doesn't seem to be working. I am sure I am missing something here. Does somebody have a working example of cache coordination setup using RMI?
TIA,
Shashi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://dev.eclipse.org/mailman/private/eclipselink-users/attachments/20100716/09a49c75/attachment.html
------------------------------
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
End of eclipselink-users Digest, Vol 35, Issue 19
*************************************************