Our target platform is AS 7.1.1.Final and we are trying to do the following:
We have multiple homogeneous systems across our network. Each system has a standalone 7.1.1.Final server on it that can perform command and control on that server only. We would like all of our systems to run identical war files with each system being differentiated by a custom standalone.xml file. Each system can share its current state with the other systems over JMS. A user can control the system via a UI on the server located closest to them geographically. I want to use the "agent" concept to have commands performed at the server that can take the action. It may be the same server that the user is connected to but it may not. So, basically it involves server to server remote invocation of stateless EJBs. I have read http://docs.jboss.org/author/display/AS71/EJB+invocations+from+a+remote+server+instance and tried that approach. The answer is always "No EJB receiver available for handling ...". I have tried every combination of app name, module name, distinct name with the same result. I can confirm that the servers make remote connections over 4447 to each other but the "ejb:" lookup does not work. Plus, I have the added problem of needing to use local-outbound-connection for connecting to myself and there does not seem to be any examples floating around. And the fact that 7.1.1.Final does not allow multiple remote-outbound-connections without blowing up (fixed in 7.1.3, supposedly). So, that leaves the following:
|Properties jndiProperties = new Properties();|
|InitialContext context = new InitialContext(jndiProperties);|
Sadly, this tries to do its duty but:
javax.naming.NamingException: Failed to create remoting connection [Root exception is java.lang.RuntimeException: Failed to setup EJB remote context]
Caused by: java.lang.LinkageError: loader constraint violation: loader (instance of org/jboss/modules/ModuleClassLoader) previously initiated loading for a different type with name "org/jboss/remoting3/Connection"
which I can sort of understand means that there is already a class loaded that implements the org.jboss.remoting3.Connection interface and I am trying to load a different implementation. Also, I am not sure this works if the remoteSystemUrl is something like "remote://localhost:4447". For us clustering is not an option. Any ideas on how to make this work?