EJB Session Remote Calls

7

75blured

Bonjour,

I'm looking from a deployed class in a WebApp on a JBoss (a VM and a
machine that I will name A) to call an EJB Session Remote deployed on a
machine named B.

I'm using the following code for the ejb call :
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, sInitialContextFactory);
env.put("java.naming.factory.url.pkgs", "org.jboss.naming");
env.put(Context.PROVIDER_URL, "jnp://10.225.7.25:1999"); // machine
B address
// the port jnp is set 1999
env.put(sFactoryUrl, sInterface);
InitialContext initialContext = new InitialContext(env);

System.out.println(initialContext.getEnvironment().toString());
Object o = initialContext.lookup("com/company/EJBToto");
System.out.println("o : " + o);

However on the lookup on "com/company/EJBToto", I'm getting the
following exception
<<
'Root exception is java.rmi.NoSuchObjectException: no such object in
table]
2006-07-18 19:06:35,426 ERROR [com.MaClasse] Exception when getting
facade
javax.naming.CommunicationException [Root exception is
java.rmi.NoSuchObjectException: no such object in table]
at
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:648)
at
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:508)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
...
the EJBToto is well deployed on JBoss (A) and I'm seeing it on the
jmx-console with the good name.

Is it the code I'm using which give problem ?

Thanks a lot in advance.

Regards,
75Blured.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top