-
1. Re: jndi and bindings or What's wrong with this picture?
sgturner Jul 24, 2002 3:57 PM (in response to tonala)<What's wrong with this picture?>
You have not given nearly enough info to enable anyone to help you. Is the lookup done in same JVM as JVM that is hosting EJB? What properties are you passing to Initialcontext? Have you set a jndi name? Does your session bean have local or remote references?
I hate playing 20 questions, so a word to the wise should be sufficient. -
2. Re: jndi and bindings or What's wrong with this picture?
tonala Jul 24, 2002 4:32 PM (in response to tonala)My apologies. I was trying to be both brief an clear and thought some of what you ask would be self evident--my mistake. Your twenty questions complaint is legitimate.
I seems that if I can list the bindings I should be able to have a successful lookup.
My junit is running in a separate jvm. The bean in question has both local and remote interfaces. ( See note at then end of this message.)
The jboss.xml entry is:
<session>
<ejb-name>PRPASession</ejb-name>
<jndi-name>session/PRPASession</jndi-name>
</session>
The properties used by the InitialContext are as follows:
/*
Because this method returns a seemingly valid context, shouldn't that be evidence that the properties are correct?
*/
public static Context getInitialContext()
throws javax.naming.NamingException
{
Properties p = new Properties();
p.put("java.naming.factory.initial","org.jnp.interfaces.NamingContextFactory");
p.put("java.naming.provider.url","localhost:1099");
p.put("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");
return new javax.naming.InitialContext(p);
}
All this is running on same physical machine.
Note: When this PRPASessionBean had only remote interfaces, JBoss complained in the server.log that is could not be bound for lack of local interfaces. Is it not possible to have only remote interfaces? It thought it was. -
3. Re: jndi and bindings or What's wrong with this picture?
sgturner Jul 24, 2002 6:32 PM (in response to tonala)Since your jboss.xml binds the bean as session/PRPASession, I would try that in the lookup, not session/PRPASessionHome
-
4. Re: jndi and bindings or What's wrong with this picture?
tonala Jul 24, 2002 6:47 PM (in response to tonala)Thank you for clearing that up.
My EJB book always shows lookup being done on the Home interface. Apparently, this jboss.xml changes that. I noticed the discrepancy but thought that the "Home" part of the name was being handled internally somehow by JBoss.