I use wildfly-9.0.0.CR1
public class HelloWorldBean implements HelloWorld {
public HelloWorldBean() {
try {
login();
} catch (LoginException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
................................................................
public boolean login() throws LoginException {
InetAddress remoteAddr = null;
System.out.println("RemotingContext" );
Connection connection = RemotingContext.getConnection();
if (RemotingContext.isSet())
System.out.println("RemotingContext = true");
else
System.out.println("RemotingContext = false");
................................................................
wildfly always gives false
2015-05-25 08:16:46,609 INFO [stdout] (EJB default - 1) RemotingContext = false
please tell me what I'm doing wrong?