GridPeerConfiguration conf = new GridPeerConfiguration();
GridPeerServiceConfiguration coreSeviceConf = new CoreServicesLookupConfiguration( coreServicesMap );
conf.addConfiguration( coreSeviceConf );
MultiplexSocketServiceConfiguration socketConf = new MultiplexSocketServiceConfiguration( new MultiplexSocketServerImpl( "127.0.0.1",
new MinaAcceptorFactoryService(),
l,
grid1 ) );
conf.addConfiguration( socketConf );
WhitePagesLocalConfiguration wplConf = new WhitePagesLocalConfiguration();
wplConf.setWhitePages( new JpaWhitePages( Persistence.createEntityManagerFactory( "org.drools.grid" ) ) );
conf.addConfiguration( wplConf );
socketConf.addService( WhitePages.class.getName(), wplConf.getWhitePages(), 8000 );
conf.configure( grid1 );
GridImpl grid2 = new GridImpl( new ConcurrentHashMap<String, Object>() );
conf = new GridPeerConfiguration();