I've got a simple stateless EJB with a method that takes a basic enum as an argument and returns the same enum.
@Stateless
@LocalBean
public class SerialBean implements RemoteSerial {
@Override
public Whatever enumTest(Whatever type) {
return type;
}
}
Here's the simple enum:
public enum Whatever {
TEST,
CONNECT_TEST
}
And a simple client:
Properties jndiProps = new Properties();
jndiProps.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
jndiProps.put(Context.PROVIDER_URL, "http-remoting://localhost:8080");
jndiProps.put("jboss.naming.client.ejb.context", true);
try {
Context ctx = new InitialContext(jndiProps);
RemoteSerial serial = (RemoteSerial)ctx.lookup("rmi_test/rmi_ejb/SerialBean!test.RemoteSerial");
System.out.println(serial.enumTest(Whatever.TEST));
System.out.println(serial.enumTest(Whatever.CONNECT_TEST));
} catch (NamingException ex) {
ex.printStackTrace();
}
When I run this code, the client successfully connects to WildFly and returns the first result (TEST). However, the client then freezes when performing the second method call (CONNECT_TEST). No response is received.
If I change the name of CONNECT_TEST to something that doesn't have CONNECT in it, the code works. I can even change CONNECT to cONNECT and that works.
I've tried this in both 10.0 and 10.1 on Windows 7 using jdk1.8.0_102 and 121.
What could possibly be going on here?