Only one JNDI server is used by my application at the following (default) place : 
"//localhost : 1099".
So, what I don't understand is why my session bean can't retrieve a reference to an 
object which is outside the
container (unlike other EJBs or database ressources ...). Is there a particular reason 
specific to jBoss for this
?? Or have I made an error using JNDI ?
Note that in the other sense, the connection of my clients to the EJBs on the server 
via JNDI, there is no
problem ...

> Jerome Veillard wrote:
> >
> > Hi,
> > I have the following problem. I want to invoke a method on an object
> > which is on the client side. I want to invoke it from a session bean.
> >
> > In my client code, I bind an object to a given name :
> > System.setProperty("java.naming.factory.initial",
> > "org.jnp.interfaces.NamingContextFactory");
> > System.setProperty("java.naming.provider.url", "localhost:1099");
> > InitialContext jndiContext = new InitialContext();
> > jndiContext.bind("xxxx", xxxx);
> >
> > In the session bean, I try to retrieve the object reference :
> > InitialContext jndiContext = new InitialContext();
> > Object ref = jndiContext.lookup("xxxx");
> >
> > But a NamingException is raised and I can't invoke the method.
> >
> > What I want to know is why I can't access my client object from a bean ?
>
> Any stacktrace to that exception?
>
> /Rickard

> Here is the stacktrace :
>
> [TrafficRetrieverBean] A NamingException has been thrown
>  at org.jnp.server.NamingServer.getBinding(NamingServer.java:340)
>  at org.jnp.server.NamingServer.getBinding(NamingServer.java:347)
>  at org.jnp.server.NamingServer.getObject(NamingServer.java:353)
>  at org.jnp.server.NamingServer.lookup(NamingServer.java:230)
>  at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:280)
>  at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:265)
>  at javax.naming.InitialContext.lookup(InitialContext.java:350)
>  at
> tsi.TrafficRetrieverBean.sendTrafficSituations(TrafficRetrieverBean.java:200)
>  at java.lang.reflect.Method.invoke(Native Method)
>  at
> 
>org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:466)
>
>  at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:227)
>  at
> 
>org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:87)
>
>  at
> org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:140)
>
>  at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:185)
>  at
> org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:265)
>
>  at
> 
>org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:222)
>
>  at
> 
>org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:187)
>
>  at
> 
>org.jboss.ejb.plugins.jrmp.interfaces.StatelessSessionProxy.invoke(StatelessSessionProxy.java:164)
>
>  at $Proxy17.sendTrafficSituations(Unknown Source)
>  at tsi.TrackUpdaterBean.updateTracks(TrackUpdaterBean.java:141)
>  at java.lang.reflect.Method.invoke(Native Method)
>  at
> 
>org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:466)
>
>  at org.jboss.ejb.plugins.TxInterceptorBMT.invoke(TxInterceptorBMT.java:227)
>  at
> 
>org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:87)
>
>  at
> org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:140)
>
>  at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:185)
>  at
> org.jboss.ejb.StatelessSessionContainer.invoke(StatelessSessionContainer.java:265)
>
>  at
> 
>org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:222)
>
>  at
> 
>org.jboss.ejb.plugins.jrmp.server.JRMPContainerInvoker.invoke(JRMPContainerInvoker.java:187)
>
>  at java.lang.reflect.Method.invoke(Native Method)
>  at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:241)
>  at sun.rmi.transport.Transport$1.run(Transport.java:142)
>  at java.security.AccessController.doPrivileged(Native Method)
>  at sun.rmi.transport.Transport.serviceCall(Transport.java:139)
>  at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:443)
>  at
> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:643)
>
>  at java.lang.Thread.run(Thread.java:484)



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to