-
1. Re: Remote EJB Client doesn't work but Remote RMI Client doe
bg000 Nov 21, 2005 9:54 AM (in response to mustaghattack)I think it depends on the configuration of your server.
The code seems ok.
When using a server behind a firewall, it is necessary to configure it in order to provide clients with the address of the firewall (otherwise, after the first lookup call, the server will send its local hostname to the external client) :
RMI/JNDI-jnp :
1) the url must be the firewall's url
2) lauch your server with :
-Djava.rmi.server.hostname=FIREWALL_ADDRESS_OR_NAME -Djava.rmi.server.useLocalHostname=false
By using these parameters your server will "say" to all the clients that they must call the firewall. -
2. Re: Remote EJB Client doesn't work but Remote RMI Client doe
mustaghattack Nov 21, 2005 11:12 AM (in response to mustaghattack)What do you mean by
RMI/JNDI-jnp :
1) the url must be the firewall's url
I have done a test with a simple RMI server (launch on the same machine than the jboss server), and a simple RMI client. It works fine !!
I understood the problem with the hostname and I don't see the difference (in term of communication) between a RMI server (from scratch) and a JBoss server (it uses RMI isn't it ?).
Maybe I need some extra configuration ?
From other post I tried to set this file :
...\ejb3.deployer\META-INF\jboss-service.xml
... without success :( -
3. Re: Remote EJB Client doesn't work but Remote RMI Client doe
bg000 Nov 21, 2005 11:51 AM (in response to mustaghattack)
I mean, when you use Rmi (url begins with jnp://) that are the parameters you need to configure.
E.g. when using rmi over http (also know as "using http as invokation layer") you need to configure http-invoker.sar.
Have you tried a test with your simple RMI server behind the firewall and your RMI client in front of it ? Does it work ? -
4. Re: Remote EJB Client doesn't work but Remote RMI Client doe
mustaghattack Nov 21, 2005 12:16 PM (in response to mustaghattack)Thanks for your help,
I don't think that URL are a problem : because I ran a copy of ther server on a machine without firewall and I can reach it remotly.
I'm sorry but I don't get you :
Have you tried a test with your simple RMI server behind the firewall and your RMI client in front of it ? Does it work ?
as I say in my last post (and the post before) RMI works well : I ran a RMI server on my PC server (behind the firewall, in DMZ) and I can connect a client to it from any place ... -
5. Re: Remote EJB Client doesn't work but Remote RMI Client doe
mustaghattack Nov 22, 2005 5:15 AM (in response to mustaghattack)I saw in a post that every bean should be annotated with
@RemoteBinding(clientBindUrl="socket://[host]:[port]")
but it seems that JBoss 4.0.3 doesn't need it (.. I would like to use this annotation but I didn't find it ... disappear ?)
Another thing is the jboss.bind.adress variable (I saw it in naming-service.xml). In my log it's set to 0.0.0.0 is it normal ? -
6. Re: Remote EJB Client doesn't work but Remote RMI Client doe
mustaghattack Nov 23, 2005 12:25 PM (in response to mustaghattack)This problem is very embarrassing ...
Any suggestion would be welcome ! -
7. Re: Remote EJB Client doesn't work but Remote RMI Client doe
triathlon98 Nov 24, 2005 3:48 AM (in response to mustaghattack)I think 0.0.0.0 is the default value and binds to all local ip addresses.
Joachim -
8. Re: Remote EJB Client doesn't work but Remote RMI Client doe
mustaghattack Nov 24, 2005 4:25 AM (in response to mustaghattack)Ok, but is it normal ? Do I have to change it to the external ip ?
-
9. Re: Remote EJB Client doesn't work but Remote RMI Client doe
mustaghattack Dec 14, 2005 12:59 PM (in response to mustaghattack)Hello again ...
I still can't solve my problem ! I have no more idea ... what can I test / check ? Is the JndiLoginInitialContextFactory responsible ?
Thanks ! -
10. Re: Remote EJB Client doesn't work but Remote RMI Client doe
mustaghattack Dec 19, 2005 2:42 PM (in response to mustaghattack)Ok I solved my problem !
In fact I set the clientConnectAddress attribute (of the Ejb3Connector MBean) with my domain name (instead of the IP address). And my /etc/hosts file contained the following line192.168.2.2 my-domain
Where 192.168.2.2 is the ethernet interface.
When the InvokerLocator is created by the StatelessRemoteProxyFactory it get my-domain into the URI. Then it try to resolv the host and get 192.168.2.2. When a client lookup for a bean it get a proxy with an invoker set with 192.168.2.2 for the hostname ...
RMI work because it doesn't try to resolv the hostname