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

Something like JINI  RSS feed

 
griff777
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello.
I have several computers in my net.
I have several services on each computer(EJB3.0).
Some of these services may depend on the others.
For example I have service(EJB3.0) A on computer1 and B on computer2.
Servce A depneds on service B. (or just can use it if B is available)
But I don want to tell service A that service B is on computer2 because it can change. I would like to have some place where service B could register and where service A can lookup and retrive proxy of service B.
I now that JINI offers something like that.
Is it design pattern what i described?
Do you know some other framework to do that?
How can I carry out it?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That certainly sounds like the situation that JINI is designed for to me. The Jini.org web site would be a good place to start.
Bill
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"griff777" -

Welcome to the JavaRanch! Please adjust your displayed name to meet the
JavaRanch Naming Policy. User names cannot be obviously fake and must constist of a first name and a last name.

You can change your user name here.

Thanks! and welcome to the JavaRanch!
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is what JNDI is used for in J2EE - both computer1 and computer2 will share acess to the same JNDI directory. When B starts, it adds itself to the JNDI directory using an agreed upon "name" - when B shuts down, it removes itself from the directory. When A starts, it looks up B by name in the JNDI directory - if it finds it, it should try to make sure the reference works - B's server *could* have crashed and B might not have had the chance to remove itself - and if it finds it and the reference works then A uses B to do whatever it needs to do.

Of course, this is assuming you don't need other services that Jini may provide, like ways to look up a service by information other than an agreed upon name, multiple possible providers of the "B" service, etc.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!