[jboss-user] [EJB 3.0] - Re: Accessing EJB3s through a firewall

magnus.ahlander do-not-reply at jboss.com
Fri Jan 25 17:56:25 EST 2008


I'm employing the following configuration of JBossAS 4.2.1 GA to make stateless EJB3s accessible both through firewall/router and from LAN. 

1. Port forwarding

Configure port forwarding of the following ports from router to JBossAS:host:

Naming - 1098, 1099
EJB3 - 3873
HTTP - 8080

2. EJB3 proxies

Modify jboss.service.xml in ejb3.deployer\META-INF:

...
  |    <mbean code="org.jboss.remoting.transport.Connector"
  |          name="jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3">
  |       <depends>jboss.aop:service=AspectDeployer</depends>
  |       <attribute name="Configuration">
  |          <config>
  |             <invoker transport="socket">
  |                <attribute name="serverBindAddress">${jboss.bind.address}</attribute>
  |                <attribute name="serverBindPort">3873</attribute>
  |                <attribute name="clientConnectAddress"><external_host_name></attribute>
  |                <attribute name="clientConnectPort">3873</attribute>
  |             </invoker>
  |             <handlers>
  |                <handler subsystem="AOP">org.jboss.aspects.remoting.AOPRemotingInvocationHandler</handler>
  |             </handlers>
  |          </config>
  |       </attribute>
  |    </mbean>
  | ...
  | 

3. RMI stubs 

Add the following system property when starting JBossAS:

-Djava.rmi.server.hostname=<external_host_name>

4. DNS

Make sure DNS entries are resolved as follows:

<external_host_name> -> <external_host_ip> (outside of the router - WAN)

<external_host_name> -> <internal_host_ip> (inside of the router - LAN)

Regards,
Magnus

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4123692#4123692

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4123692



More information about the jboss-user mailing list