Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to check if servant existent in naming server  RSS feed

 
Meir Yan
Ranch Hand
Posts: 599
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all
how can i check servant existent in naming server in cases where the
application server is down
but the servants are still registrated in the naming server .
 
Marco Ehrentreich
best scout
Bartender
Posts: 1294
IntelliJ IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Meir,

what kind of naming server do you mean? The one which is holding remote references of Java objects - like a JNDI server or the RMI registry - or a DNS server for host name lookups?

Anyway in both cases you simply have to query the name server for the information you want to know. If you want to know for example if there's an existing DNS entry for the full qualified host name of host "foo.example.com" you have to query the DNS server for a corresponding so called A-record for this host. You can do this in an own program or with one of a lot of available command line tools in UNIX/Linux for example. It's similar for JNDI. You have to use a JNDI client to query the JNDI server.

A DNS server is usually standalone so there's no problem in this situation. For JNDI there's often a JNDI server used which is embedded in an application server. This way you won't have luck if your application server is down.

I hope this helps a little with your problem...

Marco
 
Meir Yan
Ranch Hand
Posts: 599
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
its corba naming server im talking about
 
Marco Ehrentreich
best scout
Bartender
Posts: 1294
IntelliJ IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry Meir, but unfortunately I've got no experience with Corba

But I could imagine it's pretty much the same as with JNDI and DNS. If it's a standalone server you can simply query it for the information you want to check. If it's part of an application server it will be obviously down when your app server is down so you can only check it if there's some kind of persistent data store for the data.

I'm sure someone else may help you

Marco
 
Peter Chase
Ranch Hand
Posts: 1970
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can call _non_existent() on the CORBA object reference. If that returns true, then the object to which you have a reference definitely does not exist. If it returns false, the object might exist.

The only way to be sure is to try doing something with the object reference, and seeing if you get a COMM_FAILURE, OBJECT_NOT_EXIST, OBJ_ADAPTER etc.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!