Skip to main content

VBC 4.x: Why doesn"t OAD recognize running servers after restart?

  • February 16, 2013
  • 0 replies
  • 0 views

Problem:

  • Product Name: VisiBroker for C
  • Product Version: 4.x
  • Product Component: ORB, Object Activation Daemon (OAD)
  • Platform/OS Version: All

Why does the OAD not recognize the original running server after a restart?

Application requires only one instance of Server process running. After OAD is restarted, Client cannot work with the server because OAD tries to start another copy and server checks if another instance already running and exits. Is there any way for OAD to reconize servers started by OAD before?

Test case:

1. Start OAD
2. Register server
3. Run client to start server. Server is running
4. Kill OAD
5. Start OAD again
6. Run client

Result: Another copy of server started

Resolution:

This is a limitation in the OAD. The CreationImplDef (written to the OAD impl_rep file) cannot store the related information, in order for active status information to be persistent across OAD runs. Also, other properties such as oadUID and activationIOR passed to spawned server by OAD, are not relevant after an OAD restart.

As a workaround, consider starting oad with "-k" option and unregistering implementations, before bringing down the oad, to avoid manually stopping servers. If in the application environment, the oad is being terminated due to some runtime condition, then maybe modify the application logic such that when it detects an instance of the server already running, it will terminate that process and then start the new instance up.

Another approach would be that when a client request comes in to the OAD (indirectly) to spawn a server process, it will actually run a script. This script can check for existing active Server process, terminate it, and then run a new instance. This way no programmatic changes are required to the application, but just change the OAD registration process.

 

#VisiBroker
#Security