My standalone client uses ConfigBasedEJBClientContextSelector to connect to a remote JBoss AS 7.1.3:
During The EJBClientContext.setSelector() call the Server throws javax.security.sasl.SaslException which is not rethrown by setSelector();
setSelector() returns without errors or any exceptions.
If the client then calls someEjbMethod() the IllegalStateException is thrown.
My client have to react on SaslException.
Is it possible to catch SaslException or any other exceptions from the remote server?
If you want that level of control over connection creation then you should be using the JBoss Remoting APIs to create the connection yourself and if the connection is successfully created then register it to the EJBClientContext using the JBoss EJB client API.