EJB + JNDI over HTTP + Router
joseluisherrero May 1, 2006 2:28 PMHi all
I have deployed a EJB running on JBOSS and JAVA client can connect ok. The problem is that ports 1099, ... must be opened in evreyall router between server and client.
I've read in JBOSS documentation about the using JNDI over HTTP. Port 8080 is used and ports do not need to be opened in every router, because this port is allways open. Am I right?
Now it's time to configure this situiation:
1.- Change JBOSS-SERVICE.XML (\jboss\server\default\deploy\http-invoker.sar\META-INF) and change invoker service configuration
2.- Change JBOSS-SERVICE.XML (\jboss\server\default\conf) and redirect ports (192.168.1.1 to IP where Jboss is running) and tell the port 8080
3.- Client connection must be changed
Connection is opened, but every message sent by the client seems to be local and no answer is returned, but no error message is shown.
Can anybody help me.
Configuration files are as follows:
----------JBOSS-SERVICE.XML-------------
(\jboss\server\default\deploy\http-invoker.sar\META-INF)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE server>
<!-- $Id: jboss-service.xml,v 1.4.6.1 2004/11/29 16:50:50 starksm Exp $ -->
<!-- The HTTP invoker service configration
-->
<!-- Use a URL of the form http://:8080/invoker/EJBInvokerServlet
where is InetAddress.getHostname value on which the server
is running.
-->
http://
:8080/invoker/EJBInvokerServlet
true
<!-- Expose the Naming service interface via HTTP -->
<!-- The Naming service we are proxying -->
jboss:service=Naming
<!-- Compose the invoker URL from the cluster node address -->
http://
:8080/invoker/JMXInvokerServlet
true
org.jnp.interfaces.Naming
org.jboss.proxy.ClientMethodInterceptor
org.jboss.proxy.SecurityInterceptor
org.jboss.naming.interceptors.ExceptionInterceptor
org.jboss.invocation.InvokerInterceptor
<!-- Expose the Naming service interface via clustered HTTP. This maps
to the ReadOnlyJNDIFactory servlet URL
-->
jboss:service=Naming
http://
:8080/invoker/readonly/JMXInvokerServlet
true
org.jnp.interfaces.Naming
org.jboss.proxy.ClientMethodInterceptor
org.jboss.proxy.SecurityInterceptor
org.jboss.naming.interceptors.ExceptionInterceptor
org.jboss.invocation.InvokerInterceptor
(\jboss\server\default\conf)
----------JBOSS-SERVICE.XML-------------
........
1
300
300
60000
Real IP (xx.yy.jj.zz)
4445
80.26.27.3
8080
false
<depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager
..............
--------- CLIENT CONNECTION ----------
environment.put(Context.INITIAL_CONTEXT_FACTORY,"org.jboss.naming.HttpNamingContextFactory");
environment.put(Context.URL_PKG_PREFIXES,"org.jboss.naming:org.jnp.interfaces");
environment.put Context.PROVIDER_URL, "http://[IP]:8080/invoker/JNDIFactory");