private void configureGrid1(Grid grid,
int port,
WhitePages wp) {
//Local Grid Configuration, for our client
GridPeerConfiguration conf = new GridPeerConfiguration();
//Configuring the Core Services White Pages
GridPeerServiceConfiguration coreSeviceWPConf = new CoreServicesLookupConfiguration( coreServicesMap );
conf.addConfiguration( coreSeviceWPConf );
//Configuring the Core Services Scheduler
GridPeerServiceConfiguration coreSeviceSchedulerConf = new CoreServicesSchedulerConfiguration();
conf.addConfiguration( coreSeviceSchedulerConf );
//Configuring the WhitePages
WhitePagesLocalConfiguration wplConf = null;
if ( wp != null ) {
wplConf = new WhitePagesLocalConfiguration();
wplConf.setWhitePages( wp );
conf.addConfiguration( wplConf );
}
// //Create a Local Scheduler
// SchedulerLocalConfiguration schlConf = new SchedulerLocalConfiguration( "myLocalSched" );
// conf.addConfiguration( schlConf );
if ( port >= 0 ) {
//Configuring the SocketService
MultiplexSocketServiceConfiguration socketConf = new MultiplexSocketServiceConfiguration( new MultiplexSocketServerImpl( "127.0.0.1",
new MinaAcceptorFactoryService(),
SystemEventListenerFactory.getSystemEventListener(),
grid) );
socketConf.addService( WhitePages.class.getName(), wplConf.getWhitePages(), port );
// socketConf.addService( SchedulerService.class.getName(), schlConf.getSchedulerService(), port );
conf.addConfiguration( socketConf );
}
conf.configure( grid );
}