[JNDI/Naming/Network] - Re: How to Access EJB over HTTP in remote machine?
by robert.geisler
hi, ritesh,
you want to access ejb 2.1 through http, ejbs are deployed on machine A within a lan (internal address) and the clients (machine B) get redirected from external address?
if this is correct, i did ithe same some weeks ago. here are the steps i had to go through:* use HttpNamingContextFactory instead of NamingContextFactory,
| * configure JMXInvokerServlet and EJBInvokerServlet in deploy/http-invoker.sar/META-INF/jboss-service.xml,
| * configure container-configuration in conf/standardjboss.xml.try to get known to these first.
second... i looked at your deploy/http-invoker.sar/META-INF/jboss-service.xml and i would guess that your InvokerURLs (for JMXInvokerServlet and EJBInvokerServlet) are wrong, because you point to your internal address. i think, you have to configure the external address, because the InvokerURL seems to be the address, JBoss will tell the clients to connect to.
try to set the external addresses as the InvokerURLs for the servlets.
and let me know if this solves your problems.
robert
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4160260#4160260
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4160260
17 years, 10 months
[EJB/JBoss] - Re: Accessing Applet behind NAT firewall [EJB application]
by robert.geisler
hi, sandeep,
did you find a solution for your problem?
if i do understand you correctly, you are using JMXInvokerServlet and EJBInvokerServlet and everything breaks, because you have to static declare the InvokerURLs for the servlets?
maybe this could be a hint for you: you are allowed to declare a String as a key of a system property for the InvokerURL, "jboss.ejb2.invoker.http" for example (see above). then you can set the value of the system property "jboss.ejb2.invoker.http" within your application/ applet, "to form the URLs from the client [...] at the runtime"...?
service-binding.xml:
| <service-bindings>
|
| <server name="JBOSS">
|
| ...
|
| <!-- **************** http-invoker.sar & httpha-invoker.sar*************** -->
| <!-- EJBInvoker -->
| <service-config name="jboss:service=invoker,type=http"
| delegateClass="org.jboss.services.binding.AttributeMappingDelegate">
| <delegate-config> <attribute name="InvokerURL">jboss.ejb2.invoker.http</attribute> </delegate-config>
| <binding port="8230"/>
| </service-config>
|
| ...
|
| </server>
|
| </service-bindings>
client.java:
| ...
| String url = "http://" + this.ip + ":" + this.port + "/" + "invoker/EJBInvokerServlet"; System.setProperty("jboss.ejb2.invoker.http", url); ...
|
let me know if this works for you
robert
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4160256#4160256
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4160256
17 years, 10 months