File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes jndi connection in a FIN_WAIT_2 state during a remote EJB call on jboss (embedded). Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "jndi connection in a FIN_WAIT_2 state during a remote EJB call on jboss (embedded)." Watch "jndi connection in a FIN_WAIT_2 state during a remote EJB call on jboss (embedded)." New topic
Author

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

Rodolfo Ferrini
Greenhorn

Joined: Jun 03, 2010
Posts: 2
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

Joined: Jun 03, 2010
Posts: 2
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
 
Don't get me started about those stupid light bulbs.
 
subject: jndi connection in a FIN_WAIT_2 state during a remote EJB call on jboss (embedded).