Remote = <ejb-name>
Local = local/<ejb-name>
Assuming you declare the interfaces in ejb-jar.xml
I have declared my EJB local and when deploying JBOSS tells my, the Bean was correctly bound to 'local/'.
But when I try a lookup with
I receive a 'NullPointer'-Exception and the jboss-Log says the bean was not bound. Looking at the JNDIView shows me the Bean at the JNDI-Global-Namespace at the local note.
Trying ...("java:env/local/...) or ...("java:local/...) didn't solve the problem.
Whats wrong. Do I have to do speciall property settings for the InitialContext. At the moment the Context was initialized with that:
Properties prop = new Properties();
prop.put InitialContext.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
ctx = new InitialContext(prop);
Every other RemoteBean or Datasource works. Means I lookup and get the beans, just the local Beans didn't work.
You can only make local calls from within session and entity beans. It looks like you're trying to make a local call from your client code - jsp/servlet or whatever - and that's not possible - you have to make it a remote call.
Not that it fixes the problem in question, but you can make local calls from servlets in an embedded container...
Thanks for helping. This was finaly the problem and after I lookup inside a sessionbean i got the searched local bean.
My fault was to think a local client can call local beans.
Thanks a lot!
jboss 2.4.1 - jdk1.3.1 - win2000
on a related topic...
I am storing a string in Jndi to be looked up within jboss and from external jvm's.
(Nothing to do with EJBs)
i can do a lookup() from within jboss and from
an external jvm and all seem ok.
however, when i modify the value a la
Context c = new InitialContext();
i get strange results (to me, anyhow).
if i do the rebind() from within jboss jvm
and do a lookup() from within jboss jvm
all seems well but
i get the old values if i
do a lookup() from a different jvm.
if i do the rebind() from within a different jvm
and a lookup() from a different jvm
all seems well again but then
the changes are not noticed if i
do a lookup() from within jboss.
(again, i get the original values)
i would assume that changes in jndi would
get noticed, irrespective of the jvm.
i thought that was the idea behind jndi.
how do i make global changes OR what am I
> You can only make local calls from within session and
> entity beans. It looks like you're trying to make a
> local call from your client code - jsp/servlet or
> whatever - and that's not possible - you have to make
> it a remote call.
I'd like to follow up on that statement. I'm currently working on migrating an application from weblogic to jboss, and I'm running into a problem doing lookups on the local interface. The application does this fine under weblogic, but not jboss. Is this an area where weblogic is operating outside the standards?