[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openorb-devel
Subject:    [openorb-devel] Re: ServerManagerImpl getChannelsInfo()
From:       e.thomas () isti ! com (Eric Thomas)
Date:       2003-12-12 3:40:28
[Download RAW message or body]

At 10:18 PM 12/11/2003, John Farrell wrote:
>Eric, I would like to use the getChannelsInfo() method to find out what the
>heck is going on inside OpenORB. You suggested in the thread on sourceforge
>that you could subclass ServerManagerImpl. Could you please tell me how you
>get OpenORB to use your ServerManagerImpl class instead of the standard one.
>I am particularly concerned about 5 minutes delays we are seeing in Open
>Notification, and whether they are related to the
>DEFAULT_THREAD_POOL_WAIT_TIME setting in ServerManagerImpl. Thanks for your
>time,
>John Farrell
>Caterpillar MineStar

Hi John,
      Sure, happy to help.  The key thing I found in the code was the doc 
for the 'load_kernel()' method of 'org.openorb.orb.config.OpenORBConnector' 
in the OpenORB module.  You need to set the 
"openorb.server.serverManagerClass" property to the name of the 
class.  Here are the parts of my code that do this:

--------------------------------------------------------------------------

          //create 'java.util.Properties' object:
     final Properties propsObj = new Properties();

          //add property to import Notification Service module:
     propsObj.setProperty("ImportModule.notify",
                                 "${openorb.home}config/notify.xml#notify" );

          //set server property to specify what server-manager class to use:
     propsObj.setProperty("openorb.server.serverManagerClass",
                                          ExtendedServerManager.class.getName());

          //create Notification Server object:
     org.openorb.notify.Server serverObj = new org.openorb.notify.Server();

          //init server with cmd-line arguments and specified properties:
     serverObj.init(args, propsObj);

--------------------------------------------------------------------------

/**
  * Class ExtendedServerManager extends 'org.openorb.orb.net.ServerManagerImpl'
  * to expose the 'getChannelsInfo()' method.
  */
public class ExtendedServerManager extends 
org.openorb.orb.net.ServerManagerImpl
{
   /**
    * Construct a new server manager.
    * @param orbObj The controling orb.
    */
   public ExtendedServerManager(org.omg.CORBA.ORB orbObj)
   {
     super(orbObj);
   }

   /**
    * Returns an array of strings describing the active server channels.
    * @return An array of strings.
    */
   public String [] getChannelsInfo()
   {
     return super.getChannelsInfo();
   }
}

--------------------------------------------------------------------------

Regards
--Eric Thomas

     ------------------------------------------------
  Eric Thomas - e.thomas@isti.com - http://www.isti.com
                  Tel: (978) 422-7327
         Instrumental Software Technologies, Inc.
Systems Integration and Software Development Specialists

-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
openorb-devel mailing list
openorb-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openorb-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic