Additionally I found, that I can and need to define property "clientConnectAddress=<remote_ip>" for jboss remoting.

I added (uncommented line) into remoting-jboss-bens.xml, but it didn't work. Then I found that this connector is for EJB2 but for EJB3 is used ejb3-connectors-jboss-beans.xml . Then I added following lines to EJB3 connector

<!-- Remoting Server Configuration -->

<bean name="ServerConfiguration"

class="org.jboss.remoting.ServerConfiguration">

<property name="invocationHandlers">

<map keyClass="java.lang.String" valueClass="java.lang.String">

<entry>

<key>AOP</key>

<value>

org.jboss.aspects.remoting.AOPRemotingInvocationHandler

</value>

</entry>

</map>

</property>

<property name="invokerLocatorParameters">

<map keyClass="java.lang.String" valueClass="java.lang.String">

<entry>

<key>clientConnectAddress</key>

<value>

<remote_ip>

</value>

</entry>

</map>

</property>

</bean>

Still not working... I have bad feeling that I am adding clientConnectAddressin wrong way, but there are no sample on this.

I have a similar problem, and I am using JBoss AS6. I believe the way of configuring ejb3-connectors-jboss-beans.xml is the right way for AS6 ?

[ Is that the only place to configure? ]

And I finally found some syntax explanation in JBoss Remoting Guide (version 2.5.4.SP2), in section 5.4.1.2. Multihome servers.

This is my scenario:

We have a physical Server A (internal IP: 192.168.2.187) within LAN, which connects to outside world via a modem/router. We use Dynamic DNS service for outside to connect to our Server A. So we have a web page that can be accessed this way: http://xyz.dyndns-server.com:8080/myweb/

For this Dyn DNS to work, the modem/router has to have forwarding address (xyz.dyndns-server.com => 192.168.2.187, with corresponding ports). We open up ports 8080 and 1099.

The problem is that, though my web application (html, jsp, servlet) is working fine, my Swing client somehow could not access the EJB3 (remote stateful session bean). My Swing client, running in any other workstation/PC within the LAN, can access my EJB3 bean in Server A just fine. I started the JBoss AS 6 with -b 0.0.0.0 option.

My Swing client uses the following for JNDI connection:

java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory

java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces

java.naming.provider.url=jnp://xyz.dyndns-server.com:1099

Can anyone help me out? What could be the root cause? Do I miss anything here? Thanks a lot.

Are you saying that your Swing client is having a problem accessing JDNI on the server, i.e., it is unable to download the EJB3 client proxy? If that is the problem, then I can tell you that the JNDI implementation does not use Remoting, so the multihome trick will not work for JNDI.

The JDNI implementation is part of the Application Server code base, so, if I have interpreted your problem correctly, I suggest that you post the question to the "JNDI and Naming" forum here: http://community.jboss.org/en/jbossas/jndi.