• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Junilu Lacar
  • Martin Vashko
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Scott Selikoff
  • salvin francis
  • Piet Souris

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

 
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
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!