Hi,

[this was sent yesterday but apparently got lost]

Could anyone explain how to do such a thing ? I have an application that
is mainly servlet/JSP based but also provides an RMI service, so I'd
like to register this RMI object in the same VM.

I have first tried to register the object by starting from the command
line a class whose main method does this:

         service = new SyncServiceImpl(imagePath);
         Hashtable environment = new Hashtable();
         environment.put("java.naming.provider.url","rmi://localhost");
        
environment.put("java.naming.factory.initial","com.evermind.server.rmi.RMIInitialContextFactory");
         environment.put("host", "localhost");
         environment.put("username", "admin");
         environment.put("password", "123");
         Context ctx = new InitialContext(environment);
         ctx.rebind("SyncService",service);

Note that I found out these parameters by trial-and-error, so they may
be wrong. After starting Orion, I run this code and get this exception:

Error binding to server: java.security.AccessControlException: access
denied (java.io.SerializablePermission enableSubstitution )

What am I doing wrong ?

In addition to that, I'd like the object to be registered in JNDI
through either a config file or some kind of startup class. But I don't
see any way of doing this with Orion.

Thanks,

Alain.
-- 
Alain Rogister
Ubiquity s.a.
http://www.ubiquity.be

S/MIME Cryptographic Signature

Reply via email to