I have a remote ejb client and a custom login module. I am testing my login module, i enter an invalid password in remote client. My login module runs correctly and send an exception. However, remote client attempts to recall login module again to login user. But i do not want this. Because when there is an exception in my custom login module, i update some values in my database. Therefore the same code in login module runs twice and my db has inconsistent values. So how can i prevent this reconnect attemp of remote ejb client? I use JBOSS 7.1.2 Final SNAPSHOT version in server and jboss 7.1.1 client maven dependencies. Thanks.

The reconnect attempt will only be done if there is a subsequent request/invocation on the EJB, after the previous connection attempt failed. Are you invoking on the bean after the failed attempt? Is that the real code you posted? Can you post the rest of the code too?

07.05.2012 08:50:05: DEBUG ConfigBasedEJBClientContextSelector [main] - EJB client context org.jboss.ejb.client.EJBClientContext@111a3ac will have no EJB receivers associated with it since there was no EJB client configuration available to create the receivers

The EJB client API implementation which exposes certain APIs only guarantees certain exceptions. One of them is the non availability of a EJB receiver which can happen due to number of reasons, one of them being incorrect connection configurations. Auto connection setup using the properties file is one mechanism of setting up EJB receivers and in this mechanism we do not throw any exceptions and instead just log them as errors/warning and move on. So there isn't really any exception that can be caught in there. If you really want to fail/catch those exceptions yourself, then instead of letting the EJB client API auto create the connections, you can create the connections yourself in your code and then pass that connection object to EJBClientContext.registerConnection(Connection) method to register a receiver for it. Javadocs are available here http://docs.jboss.org/ejbclient/