1 22 package org.jboss.test; 23 24 import java.io.IOException ; 25 import java.rmi.AlreadyBoundException ; 26 import java.rmi.RemoteException ; 27 import java.rmi.registry.LocateRegistry ; 28 import java.rmi.registry.Registry ; 29 30 import org.jboss.security.Util; 31 import org.jboss.security.srp.SerialObjectStore; 32 import org.jboss.security.srp.SRPRemoteServer; 33 34 41 public class SRPServerImpl 42 { 43 SerialObjectStore store; 44 45 void run() throws IOException , AlreadyBoundException , RemoteException 46 { 47 store = new SerialObjectStore(); 48 SRPRemoteServer server = new SRPRemoteServer(store); 49 Registry reg = LocateRegistry.createRegistry(Registry.REGISTRY_PORT); 50 reg.bind("SimpleSRPServer", server); 51 } 52 53 public static void main(String [] args) throws Exception 54 { 55 SRPServerImpl server = new SRPServerImpl(); 56 server.run(); 57 } 58 } 59 | Popular Tags |