/** * Starts up the remote cache server on this JVM, and binds it to the registry on the given host * and port. * <p> * A remote cache is either a local cache or a cluster cache. * <p> * @param host the host name * @param port the port number * @param propFile the remote cache hub configuration file * @throws IOException * * @deprecated Use startup(String, int, Properties) instead */ @Deprecated public static void startup( String host, int port, String propFile ) throws IOException { if ( log.isInfoEnabled() ) { log.info( "ConfigFileName = [" + propFile + "]" ); } Properties props = RemoteUtils.loadProps( propFile ); startup(host, port, props); }
/** * Load configuration values from config file if possible */ private Properties loadPropertiesFromFile() { Properties props = null; try { props = RemoteUtils.loadProps(propsFileName); if (props != null) { registryHost = props.getProperty("registry.host", registryHost); String portS = props.getProperty("registry.port", String.valueOf(registryPort)); setRegistryPort(portS); } } catch (IOException e) { log.error("Problem loading props.", e); } return props; }
/** * Initialize the RMI Cache Server from a properties file. * <p> * @param prop * @throws RemoteException if the configuration of the cache manager instance fails * * @deprecated Use version with Properties parameter instead */ @Deprecated private void init( String propFile ) throws RemoteException { String propFileName = propFile == null ? DFEAULT_REMOTE_CONFIGURATION_FILE : propFile; Properties prop = null; try { prop = RemoteUtils.loadProps(propFileName); } catch (IOException e) { throw new RemoteException(e.getMessage(), e); } init(prop); }
Properties props = RemoteUtils.loadProps( propFile ); startup(host, port, props, propFile);
throws Exception Properties prop = args.length > 0 ? RemoteUtils.loadProps( args[args.length - 1] ) : new Properties();
throws Exception Properties prop = args.length > 0 ? RemoteUtils.loadProps( args[args.length - 1] ) : new Properties();
/** * Start the cache. */ public TestRemoteCache() { super(); try { System.out.println( "main> creating registry on the localhost" ); RemoteUtils.createRegistry( 1101 ); Properties config = RemoteUtils.loadProps("/TestRemoteServer.ccf"); RemoteCacheServerFactory.startup( "localhost", 1101, config); } catch ( Exception e ) { e.printStackTrace(); } }
@Override protected void setUp() throws Exception { super.setUp(); IRemoteCacheServerAttributes rcsa = new RemoteCacheServerAttributes(); rcsa.setConfigFileName( "/TestRemoteCacheServer.ccf" ); Properties config = RemoteUtils.loadProps(rcsa.getConfigFileName()); this.server = new RemoteCacheServer<String, String>( rcsa, config ); }
try props = RemoteUtils.loadProps(propsFileName);
rcsa.setConfigFileName( "/TestRemoteCacheServer.ccf" ); Properties config = RemoteUtils.loadProps(rcsa.getConfigFileName()); MockRemoteCacheListener<String, Long> mockListener = new MockRemoteCacheListener<String, Long>(); RemoteCacheServer<String, Long> server = new RemoteCacheServer<String, Long>( rcsa, config );
rcsa.setLocalClusterConsistency( true ); rcsa.setConfigFileName( "/TestRemoteCacheServer.ccf" ); Properties config = RemoteUtils.loadProps(rcsa.getConfigFileName()); RemoteCacheServer<String, Long> server = new RemoteCacheServer<String, Long>( rcsa, config );