| From | Sent On | Attachments |
|---|---|---|
| glas...@javadesktop.org | Oct 22, 2010 8:11 pm | |
| glas...@javadesktop.org | Oct 22, 2010 10:15 pm |
| Subject: | Standalone EJB client using iiop/rmi | |
|---|---|---|
| From: | glas...@javadesktop.org (glas...@javadesktop.org) | |
| Date: | Oct 22, 2010 8:11:17 pm | |
| List: | net.java.dev.glassfish.users | |
I have a setup
EJB 2.1 beans on a sunone application server 6.1 (I know this is a glassfish
forum but could not find the answer anywhere) having bean exposed as iiop.
I want to access these beans from a standalone client. I am able to lookup the
bean but when i try to access a method I get the following error
[b]Caused by: java.rmi.AccessException: Client is not authorized for this
invocation.[/b]
I am not sure it the server is using ssl. There is a
<iiop-service><iiop-listener> entry using ssl in sun-application-jar.xml but
there is no <ior-security> entry which exposing jars.
Here is the code [code] public class BranchCodeClient { public static void main(String [] args) throws Exception{ Properties iiop = new Properties();
iiop.put("java.naming.factory.initial",
"com.sun.jndi.cosnaming.CNCtxFactory");
iiop.put("java.naming.provider.url", "iiop://172.30.16.105:33700/");
InitialContext context = new InitialContext(iiop); BranchServiceHome home = (BranchServiceHome)PortableRemoteObject.narrow( context.lookup("ejb/BranchService"), BranchServiceHome.class); BranchService service = (BranchService)home.create(); System.out.println(service.list());//ERROR OCCURS HERE
} } [/code] Please help...
regards Taha [Message sent by forum member 'tawus']





