This content has been marked as final.
Show 3 replies
-
1. Re: failed to implement a stand alone java client calling to
amitguz Dec 14, 2005 7:57 AM (in response to amitguz)found the problem.
I needed set the security.
add new file to the client side
policy.all which contain :grant { permission java.security.AllPermission "", ""; };
and run the client VC with -Djava.security.policy=policy.all
but now I lookup failed with:javax.naming.NameNotFoundException: authors not bound at org.jnp.server.NamingServer.getBinding(NamingServer.java:514) at org.jnp.server.NamingServer.getBinding(NamingServer.java:522) at org.jnp.server.NamingServer.getObject(NamingServer.java:528) at org.jnp.server.NamingServer.lookup(NamingServer.java:281) at sun.reflect.GeneratedMethodAccessor74.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
-
2. Re: failed to implement a stand alone java client calling to
okism Jan 12, 2006 5:06 AM (in response to amitguz)but now I lookup failed with:
javax.naming.NameNotFoundException: authors not bound at org.jnp.server.NamingServer.getBinding(NamingServer.java:514) at org.jnp.server.NamingServer.getBinding(NamingServer.java:522) at org.jnp.server.NamingServer.getObject(NamingServer.java:528) at org.jnp.server.NamingServer.lookup(NamingServer.java:281) at sun.reflect.GeneratedMethodAccessor74.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
Did you solve it? I have the same problem, too. There are no examples on how to find (lookup) deployed EJB from VM other then EJB containers. When I look in JNDI tree in JMX console, and compare it to what InitialContext contains, I see that it does not search through java namespace, but only through global JNDI namespace.
Here is the code:InitialContext ctx; try { ctx = new InitialContext(); Enumeration ctxList = ctx.list(""); int i = 0; while (ctxList.hasMoreElements()) { i++; NameClassPair element = (NameClassPair) ctxList.nextElement(); System.out.println("element "+i+" : "+element); } } catch (NamingException e) { e.printStackTrace(); }
-
3. Re: failed to implement a stand alone java client calling to
amitguz Jan 12, 2006 7:17 AM (in response to amitguz)the JNDI rules are like that:
under JAVA : u can reach JNDI names only from the same VM which JBOSS use, meaning if your client is a standalone client (on a separate VM) and your JBOSS run on a different VM u cannot fetch the namespaces in this area from the client.
under GLOBAL: u can fetch the objects from the JNDI even from different VM.
my problem was that my remote interface wasn't written to the global JDNI due to bye mistake I assign both the local and the remote to the same interface.
@local
@remote
public interface Authors {
dddd,,,,
}