I'm also intrested in this. We have a similar prroblem, where we access one ejb from a standalon client on a server1, that ejb need, in some cases, access an ejb on a second server (server2).
We have specifyed the -Djboss.ejb.client.properties.file.path=/path/to/file/jboss-as-ejb-client.properties in the standalone.sh to the javavm and in the standalone.xml (just to be sure).
The first request works fine (client to server), but the second fails (server1 to server2) every time with the same massage.
14:14:25,114 ERROR [stderr] (pool-9-thread-7) java.lang.IllegalArgumentException: Could not find module app: module: jboss-as-ejb-remote-server-side-7.1.0.CR1-SNAPSHOT distinct name:
14:14:25,114 ERROR [stderr] (pool-9-thread-7) at org.jboss.as.ejb3.remote.LocalEjbReceiver.findBean(LocalEjbReceiver.java:227)
We have seen contact between the server on the remoting port, fetching the namespace, from server2 to server1.
14:13:16,410 DEBUG [org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver] (Remoting "config-based-ejb-client-endpoint" task-1) Received module availability message for appName: moduleName: jboss-as-ejb-remote-server-side-7.1.0.CR1-SNAPSHOT distinctName: for receiver context org.jboss.ejb.client.EJBReceiverContext@644b27ad
Any thoughts on this?
possibly I should mention, that we start the server with -Djboss.ejb.client.properties.file.path=../standalone/configuration/jboss-ejb-client.properties
the file "jboss-ejb-client.properties" looks simply like:
remote.connection.default.host=10.0.41.223 <-- the second server
remote.connection.default.port = 4447
We use Jboss 7.1.0.CR1beta.
javax.ejb.EJBException: java.lang.IllegalArgumentException: Could not find module app: Inventory.Seam module: Inventory.Seam-ejb-2.0-SNAPSHOT distinct name:; nested exception is: java.lang.IllegalArgumentException: Could not find module app: Inventory.Seam module: Inventory.Seam-ejb-2.0-SNAPSHOT distinct name:
java.lang.IllegalArgumentException: Could not find module app: Inventory.Seam module: Inventory.Seam-ejb-2.0-SNAPSHOT distinct name:
But we are sure, that the naming is correct, because the exact same name runs with a desktop client.
Im also seeing this issue, when I try to lookup ejb on serverB from my accessbean on serverA it fails in the same way ( the lookup is actually ok, but I cannot invoke the bean , home.create() fails miserably with IllegalArgumentException like above, from standalone java app the thing works fine )
In the past I've federated the JNDI trees as described in org.jboss.naming.ExternalContext MBean. This makes the global JNDI namespace of server2 visible in server1 as a subcontext.
It then makes no difference in your code whether or not the remote EJB is in the same server or a remote server, aside from the ENC->global name mapping (and assuming proper RMI calling semantics).
I'm not sure how to do this in JBoss 7 though.
Sorry everyone, it was my plan a few weeks back to add an example for this usecase, but just haven't been able to get to this yet. I'll make sure I have something very soon.
I also have this problem. Can't wait for the example
I have a similar problem.
When do you plan to add the example for this problem?
It would be fine, if you could give us the example before 7.1.0.Final.
I just added the documentation here https://docs.jboss.org/author/display/AS71/EJB+invocations+from+a+remote+server+instance. Those steps are supposed to work (we have testcases for those), but I haven't verified whatever I've written in that documentation against a sample application (too late in the night right now). So give it a try and let us know how it goes. If you run into any issues, feel free to report them here.
Are you shure , you would like give this as end solution... ?
For each remote EJB Destination I have to change Client Server configuration.....
- create outbound-socket-binding ( static )
- create remote-outbound-connection ( static )
- jboss-ejb-client.xml entries... ( static )
What is the reason to doing so? It sounds for me like stone age.... not modern light way fast App Server AS 7.1 ...
Pass Connection URL to JNDIContext needs one Line source code, is dynamic for any remote destination and needs one line code... an 0 Lines configuration and 0 number of config files...
I can do this with pure java rmi ... and 10 years old App Server... but not with EE 6 AS 7.1 ....
And now I need to do static configuration... static config files so a client can call remote ejb...on remote server.
What if my client needs to call 5 EJB's on 5 different remote Servers...
According to your server to server docu I would have to configure 5 outbound-cocket-bindig, 5 remote -outbound-connection, and put 5
remoting-ejb-receiverin to jboss-ejb-client.xml....
Each time my client lookup an EJB , depends on order in jboss-ejb-client.xml client will get worst case 4 lookup misses.... until he use the correct
remoting-ejb-receiver for given EJB...
This will be performance killer....
Imaging an Administrator which deploy an Application on AS 7.1. Now Administrator will need to know all remote EJB destination in this ear File... and will have to change Client Server configuration... so this Application can do remote calls....
I thing Jboss Support will be overflowed with support Requests from clients...
Why not make ejb remote call so simple for users of AS 7 , like calling an HTTP Url ... ?
I tried it, but I got "java.lang.IllegalArgumentException: Could not find module app: Inventory.Seam module: Inventory.Seam-ejb-2.0-SNAPSHOT distinct name:"
I am sure that the naming is not the problem, because it works in the client scenario.
I completely agree!
The usual lookup code using the InitialContext with the Context.PROVIDER_URL value has to work.
I am now getting a java.lang.IllegalStateException : No EJB receiver available, and I think it might have something to do with not specifying SSL_ENABLED=false. Where do I specify that now in the jboss-ejb-client.xml ?