This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Client and EJB components on different servers  RSS feed

 
Tinku Narang
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all

Here is a very rare scene which i want to put in my application ,i have devloped my application using Struts, EJB and JBOSS.

I have devloped the application in component enviornment .
I have implemented the Business Delegate pattern,Facade pattern in my application.

Now my client part that contains the struts action classes and business delegate implementations are present in a .war file and i have deployed them on a server lets called Server1 on machine1.

My components which are different jar files are deployed on server2 on machine2. now how to do the lookup for the session and entity beans .

I know i have to change just my delegate implementaion classes where i do the lookup.But how in case of two different servers.

is there any solution to this scenario.

Best Reagards
Tinku
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have two options:

1. Use javax.naming.InitialContext(Hashtable) to give get a connection to the remote directory service. Check out your remote server's documentation for what information it wants to be provided in the Hashtable.

2. Administratively splice the remote directory service into the local directory service so you can simply use javax.naming.InitialContext() with the usual lookup. If you splice your remote directory service's root at "/server2", you would do something like "context.lookup("/server2/some_dir/some_home".
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!