• Post Reply Bookmark Topic Watch Topic
  • New Topic

connect to another machine via JNDI

 
Andrew Cane
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to connect to JNDI provided by a web server that's hosted by another machine?
thanks
 
E Armitage
Rancher
Posts: 989
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What type of objects do you want to lookup via JNDI? Generally the answer is yes you can look up objects remotely from containers. The specifics of exactly what you can lookup and how depend on the container you are using.
 
Andrew Cane
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My current web app is deployed on weblogic in machine A. I need to access a table located in machine B. Machine B is using JBoss (different vendor). How do I achieve this? thanks
 
E Armitage
Rancher
Posts: 989
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean "table"? Database table?
 
Andrew Cane
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, database table.
 
E Armitage
Rancher
Posts: 989
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do you need to connect to another appserver then? Why not connect to the database from weblogic?
If you really want to do it then you can still lookup a datasource configured in JBoss but that is not supported on AS7 so it depends on your JBoss version. Otherwise you run a remore EJB that manipulates the data on JBoss and then lookup that EJB from Weblogic. If you isolate the ejb-jar that does the data access then you can just deploy that into weblogic as well and not need to make any remote calls.
 
Luan Cestari
Ranch Hand
Posts: 172
C++ Redhat Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with Armitage.

Creating an EJB application in the JBoss side to be remote access. The following documentation might help:

https://docs.jboss.org/author/display/AS71/JNDI+Reference

https://docs.jboss.org/author/display/AS71/EJB+invocations+from+a+remote+client+using+JNDI
 
E Armitage
Rancher
Posts: 989
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Luan Cestari wrote:

Creating an EJB application in the JBoss side to be remote access.

Only if there is a good reason why he can't connect to the database directly from Weblogic.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!