Hello,
during my work on a student research project, I noticed a strage behavior.
Following scenario:
EJB1: a not clustered stateless EJB, which calls EJB2 per lookup
@Stateless
public class Bean implements BeanLocal, BeanRemote {
...
private Bean2 bean2;
public void call(){
Properties properties = new Properties();
properties.put("java.naming.factory.initial",
"org.jnp.interfaces.NamingContextFactory");
properties.put("java.naming.factory.url.pkgs",
"org.jboss.naming:org.jnp.interfaces");
properties.put("java.naming.provider.url",
"192.168.0.52:1100");
Context context;
try {
context = new InitialContext(properties);
bean2 = (RemoteBean2) context.lookup(Bean2.RemoteJNDIName);
while(...){
bean2.doSomething();
}
} catch (NamingException e) {
e.printStackTrace();
}
}
@Clustered
@Stateless
public class Bean2 implements BeanLocal2, BeanRemote2 {
...
public void doSomwthing(){
...
}
}