use of org.eclipse.persistence.platform.server.NoServerPlatform in project eclipselink by eclipse-ee4j.
the class RCMDistributedServer method run.
/**
* This method starts the server and makes the dispatcher available
* Creation date: (7/21/00 9:58:37 AM)
*/
@Override
public void run() {
RemoteCommandManager cm = new RemoteCommandManager((AbstractSession) session);
// set propagate command synchronously for testing
cm.setShouldPropagateAsynchronously(false);
cm.getDiscoveryManager().setAnnouncementDelay(0);
// ovewrite default to use RMI registry naming service
cm.getTransportManager().setNamingServiceType(TransportManager.REGISTRY_NAMING_SERVICE);
// set full rmi URL of local host
cm.setUrl("rmi://localhost:1099");
// turn on cache sync with RCM
((AbstractSession) session).setShouldPropagateChanges(true);
cm.setServerPlatform(new NoServerPlatform(new DatabaseSessionImpl()));
cm.initialize();
}
use of org.eclipse.persistence.platform.server.NoServerPlatform in project eclipselink by eclipse-ee4j.
the class SessionsFactory method buildServerPlatformConfig.
/**
* INTERNAL: Build the appropriate server platform
*/
protected ServerPlatform buildServerPlatformConfig(ServerPlatformConfig platformConfig, DatabaseSessionImpl session) {
if (platformConfig == null) {
return new NoServerPlatform(session);
}
// Build the server platform, the config model knows which to build.
ServerPlatform platform;
if (platformConfig instanceof CustomServerPlatformConfig) {
platform = buildCustomServerPlatformConfig((CustomServerPlatformConfig) platformConfig, session);
} else {
// A supported platform so instantiate an object of its type.
String serverClassName = platformConfig.getServerClassName();
if (platformConfig.isSupported()) {
platform = ServerPlatformUtils.createServerPlatform(session, serverClassName, m_classLoader);
} else {
throw SessionLoaderException.serverPlatformNoLongerSupported(serverClassName);
}
}
// Process the common elements in ServerPlatformConfig
processServerPlatformConfig(platformConfig, platform);
return platform;
}
Aggregations