Only 48 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Could not look up EJBs deployed in remote Linux Machine  RSS feed

 
Sivakumar Nachimuthu
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It throws the following exception


while lookup the ejbs deployed in the remote Jboss the server running in the Linux machine.

There is an option to include an entry in the /etc/hosts file to avoid these exception.

Is there anyother way other than entry in hosts file to avoid such a java exceptions?.
 
Valentin Tanase
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sivakumar,


[java] javax.naming.CommunicationException [Root exception is java.rmi.ConnectException: Connec
tion refused to host: 127.0.0.1;

Looks like you try to lookup the beans using the localhost. However you might like giving us more info: do you try to lookup your beans from within a web app, or from a standalone client? How do you initialize the InitialContext? You might also like sharing some code with us.
Regards.
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your local machine isn't running the requisite registry service. There's no reponse coming from the port you're attempting to do the lookup against, so coding a different hostname only helps if you code the name of a host that's running a registry on that port (and isn't firewalled ).
 
Sivakumar Nachimuthu
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for ur reply.

I got the solution.

While starting the JBOSS server by specifying -Djava.rmi.server.hostname='ipaddress of the machine ',we can look up beans from remote machines.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!