Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jndi connection in a FIN_WAIT_2 state during a remote EJB call on jboss (embedded).

 
Rodolfo Ferrini
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I have a Connection time out problem while trying to connect to a remote ejb.

Context configuration:

...
InitialContext context = new InitialContext( );
context.addToEnvironment(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
context.addToEnvironment(Context.URL_PKG_PREFIXES, "org.jboss.naming: org.jnp.interfaces");
context.addToEnvironment(Context.PROVIDER_URL, "jnp://somehost:1099");
...
MyEjb ejb = (MyEjb) context.lookup("MyEjb");
...

The above piece of code is running on tomcat + jboss-embedded (Windows XP). "somehost" has the same server configuration but a different SO (Windows 7).

a netstat -an on "somehost" shows that the port 1099 is listening on 0.0.0.0, i can get the connection with a telnet call from my machine.

However, during the lookup call, the same netstat -an command reports that the jndi connection is in a FIN_WAIT_2 state. So, the above call results in a Connection time out exception.

All works fine if "somehost" == "localhost".

Any idea?

Regards,
Rodolfo
 
Rodolfo Ferrini
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Problem solved.

There was a firewall blocking rmi port (1098 in my case). This port is also required during the look up process.

Regards,
Rodolfo
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic