Hello, I am trying to use the remoting endpoint API to initiate a connection to a wildfly server.
I have some SLSB deployed there and when I use a InitialContext, I can invoke the SLSB. I am using the properties that I mention in the gist here (Using remoting endpoint API to connect to Wildfly 8.2.0.Final). But with this approach I always get back a generic IllegalStateException with no meaningful underlying cause.
So, I am trying to use the remoting endpoint API directly to connect so I can detect at a minimum if there is a authentication problem. This approach (Using remoting endpoint API to connect to Wildfly 8.2.0.Final) works for me in JBoss7/EAP6 but when I try to use a similar approach in Wildfly, I don't get a response.
I suspect I am missing some property(ies) when I use the remoting endpoint in Wildfly. Any pointers to the problem or test cases that do this will be most appreciated.
Thanks in advance.
Found it! I need to use "HttpUpgradeConnectionProviderFactory" instead of "RemoteConnectionProviderFactory".
endpoint.addConnectionProvider(protocol, new HttpUpgradeConnectionProviderFactory(), remoteConnectionProviderCreationOptions);
Thanks to this test case: JVM/ConnectionTest.java at d7dd336ea4968096b2920c7912295b2c80050617 · kylinsoong/JVM · GitHub