I have a remote stateless bean
@Remote
public interface HelloRemote {
public void hello();
}
@Stateless
public class Hello {
public void hello(){
// some ip based logic
}
}
and i call it from jse client
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY,
"org.apache.openejb.client.RemoteInitialContextFactory");
p.put("java.naming.provider.url", "http://localhost:8080/tomee/ejb");
p.setProperty(Context.SECURITY_PRINCIPAL, "usr");
p.setProperty(Context.SECURITY_CREDENTIALS, "pass_hash");
InitialContext ctx = new InitialContext(p);
HelloRemote facade = (HelloRemote ) ctx.lookup("HelloRemote ");
facade.hello();
How to get client remote ip in stateless bean?