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

CorbaCommFailure and re-initializing the ORB  RSS feed

 
Kyle Willkomm
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are currently experiencing numerious and periodic CORBA COMM FAILUREs in prd. We are utilizing JDK 1.3 / CORBA and trying to submit to a C++ server object. When the web server starts up, it initializes the ORB using the ior and orb.init(). When the actual calls are made, we are narrowing to the server object and making the call. Problem is that periodically we get the CORBA COMM FAILURE when we make the call. During our investigation, we determined that the actual servers look to be running just fine and they are registared with the naming service. When this error occurs, we present the user with a communication failure message.
Our theory is that the ORB is caching the server objects and their connection paths. If the connection is broken for whatever reason, it throws a CORBA COMM FAILURE instead of trying to reconnect to the server object. Can anyone verify our theory? A detailed understanding of how the java ORB works would be very helpful.
Secondly, what is the best way to handle this exception. Should we shutdown the ORB and restart it? I am very apprehensive about this since users running on the other threads will be affected. Anyone familiar with orb.disconnect(Object ob) or orb.connect(Object ob)? Should I do these steps in my exception handling block to get the ORB to set up or cache a real server object?
In reading another discussion thread, I ran across someone using the objRef._non_existent() to get it to go. Anyone familiar with this method and understand the implications of its use?
 
Mo Ibrahim
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is safe to call _non_existent() on the remote object before you proceed to make calls on the objRef. You can rebind to the remote object if the test fails.
 
Kyle Willkomm
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes but how do you rebind without doing an Orb.init() ? The old server reference is now registered with the Orb's snapshot of the naming service, and the Java Orb will not get a new refrence unless you call init() again on the orb and produce a new naming context with which to find the particular server again.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!