This content has been marked as final.
Show 2 replies
-
1. Re: EJB lookup under JBoss-4.0.1
911as Jan 4, 2005 2:43 PM (in response to mat)I'm having the same problem, are you able to fix it?
Thank you. -
2. Re: EJB lookup under JBoss-4.0.1
mat Jan 13, 2005 10:23 AM (in response to mat)"mat" wrote:
Changing from JBoss-4.0.1RC2 to JBoss-4.0.1 encountered the following problem:
The application contains 2 stateless session beans: sessionA and sessionB.
The application installed on two different machines as local server and remote server.
Simple lookup from sessionA in a local server to sessionB of a remote server results
in the sessionA pointing to the sessionB of the same local server.
ie the environment Properties is ignored and 'new InitialContext(p)' behaves the same as 'new InitialContext()'.
The following code is used in sessionA to lookup sessionB which is fine under JBoss-4.0.1RC2.
private sessionBHome lookupsessionB() throws NamingException {
java.util.Properties p = new java.util.Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
p.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
p.put(Context.PROVIDER_URL, remoteServerName+":1099");
InitialContext jndi = new InitialContext(p);
return (PersistentUpdateSessionHome) jndi.lookup("sessionBJNDIName");
}
Any help is greatly appreciated.
Many thanks.
nasser
The NullPointerException error occurs within a stateless sessionBean as a timer bean: javax.ejb.TimedObject
public class MyTimerSessionBean implements SessionBean, javax.ejb.TimedObject {
public void ejbTimeout(javax.ejb.Timer timer) {
...
}
...
}
nm