-
1. Re: rmi over http troubles
rimmeraj Dec 20, 2004 9:16 AM (in response to lordnedox)By default the system name where jboss is runnig is assumed to be the http target. Comment out InvokerURLPrefix,InvokerURLSuffix set UseHostName to false and then put the entire URL you wish to use as InvokerURL
-
2. Re: rmi over http troubles
lordnedox Dec 20, 2004 9:24 AM (in response to lordnedox)"rimmeraj" wrote:
By default the system name where jboss is runnig is assumed to be the http target. Comment out InvokerURLPrefix,InvokerURLSuffix set UseHostName to false and then put the entire URL you wish to use as InvokerURL
As i wrote, my configuration is already like the one you suggest.
[mbean code="org.jboss.invocation.http.server.HttpInvoker" name="jboss:service=invoker,type=http"]
[attribute name="InvokerURL"]http://[public host name]/invoker/EJBInvokerServlet[/attribute]
[/mbean]
I removed prefix, port and useHostName attributes, and set the entire external url in the "InvokerURL" attribute. -
3. Re: rmi over http troubles
rimmeraj Dec 20, 2004 10:38 AM (in response to lordnedox)Did you change the HttpProxyFactory mbean as well?
-
4. Re: rmi over http troubles
kalyan120 Dec 20, 2004 10:53 AM (in response to lordnedox)Are you able to get to the page : http://[public host name] (from your URL) from outside? If not, you might have to look at this page: http://www.jboss.org/wiki/Wiki.jsp?page=UsingJBossBehindAFirewall
Thanks,
Kalyan. -
5. Re: rmi over http troubles
lordnedox Dec 20, 2004 11:15 AM (in response to lordnedox)"kalyan120" wrote:
Are you able to get to the page : http://[public host name] (from your URL) from outside? If not, you might have to look at this page: http://www.jboss.org/wiki/Wiki.jsp?page=UsingJBossBehindAFirewall
Thanks,
Kalyan.
Yes i can reach the server, and i can reach the url http://[public server name]/invoker/JNDIFactory.
The problem is that the server is still returning the internal IP address instead of the url i specified in the "invokerUrl" attribute.
@rimmeraj
Yes i changed them all.
Thank you
Bye -
6. Re: rmi over http troubles
kalyan120 Dec 21, 2004 9:41 AM (in response to lordnedox)The following is the method (in JBoss code) that's returning the internal ip address:
protected void checkInvokerURL() throws UnknownHostException { if( invokerURL == null ) { InetAddress addr = InetAddress.getLocalHost(); String host = useHostName ? addr.getHostName() : addr.getHostAddress(); String url = invokerURLPrefix + host + invokerURLSuffix; setInvokerURL(url); } }
'useHostName' is by default set to false. So, you will have to set it to true inorder to be able to use the url you are wanting to use.
Thanks,
Kalyan. -
7. Re: rmi over http troubles
lordnedox Dec 21, 2004 10:38 AM (in response to lordnedox)"kalyan120" wrote:
The following is the method (in JBoss code) that's returning the internal ip address:protected void checkInvokerURL() throws UnknownHostException { if( invokerURL == null ) { InetAddress addr = InetAddress.getLocalHost(); String host = useHostName ? addr.getHostName() : addr.getHostAddress(); String url = invokerURLPrefix + host + invokerURLSuffix; setInvokerURL(url); } }
'useHostName' is by default set to false. So, you will have to set it to true inorder to be able to use the url you are wanting to use.
Thanks,
Kalyan.
That's right, but the invokerURL variable is set by the "InvokerUrl" xml parameter, so that "if" statement will get skipped.
Thank you
bye -
8. Re: rmi over http troubles
kalyan120 Dec 21, 2004 11:22 AM (in response to lordnedox)I'm not sure if the setInvokerURL method is called after the startService method is called or not. If the startService method is called first and then the setInvokerURL is called later, your setting should work. Other way around, will not work for you. From your exception, it seems as if setInvokerURL is called before startService. Later once, startService is called, checkInvokerURL is called and then the invokerURL is set to the host address as the useHostName property is set to false.
Thanks,
Kalyan. -
9. Re: rmi over http troubles
kalyan120 Dec 21, 2004 11:27 AM (in response to lordnedox)Oops!! Yes you are right. My logic is incorrect.
Thanks,
Kalyan. -
10. Re: rmi over http troubles
lordnedox Jan 11, 2005 5:59 AM (in response to lordnedox)I solved this.
The problem was the ejb configuration in jboss.xml file, under the META-INF directory.
I used something like:
<ejb-name>ejb name</ejb-name>
<jndi-name>jndi name</jndi-name>
<local-jndi-name>jndi name</local-jndi-name>
<configuration-name>HTTP Session</configuration-name>
<container-configurations>
<container-configuration extends="Standard Stateless SessionBean">
<container-name>HTTP Session</container-name>
<home-invoker>jboss:service=invoker,type=http</home-invoker>
<bean-invoker>jboss:service=invoker,type=http</bean-invoker>
</container-configuration>
</container-configurations>
As described in many sites. This was working on LAN and was compatible with xdoclet tags generation.
To solve the problem, i have used something like this:
<ejb-name>ejb name</ejb-name>
<jndi-name>jndi name</jndi-name>
<local-jndi-name>jndi name</local-jndi-name> <invoker-bindings>
<invoker-proxy-binding-name>stateless-http-invoker</invoker-proxy-binding-name>
</invoker-bindings>
<invoker-proxy-bindings>
many tags here
</invoker-proxy-bindings>
As i found in a jboss guide. This wasn't compatible with xdoclet, but it has been quite simple to change jboss_xml.xdt to generate what i needed (thanks to google).
I hope this helps someone. For more details just ask.
Bye all