xmlBlaster 2.2.0 API

org.xmlBlaster.protocol.corba
Class CorbaDriver

java.lang.Object
  extended by org.xmlBlaster.protocol.corba.CorbaDriver
All Implemented Interfaces:
CorbaDriverMBean, I_Driver, I_AdminPlugin, I_AdminService, I_AdminUsage, I_Plugin

public class CorbaDriver
extends java.lang.Object
implements I_Driver, CorbaDriverMBean

CorbaDriver class to invoke the xmlBlaster server using CORBA. Note the IANA assigned official CORBA ports:

  corba-iiop      683/tcp    CORBA IIOP 
  corba-iiop      683/udp    CORBA IIOP 
  corba-iiop-ssl  684/tcp    CORBA IIOP SSL
  corba-iiop-ssl  684/udp    CORBA IIOP SSL
  
  corbaloc        2809/tcp   CORBA LOC
  corbaloc        2809/udp   CORBA LOC
 
We use the following CORBA specific ports:
   7608 as the default port to look for a naming service
   3412 is the xmlBlaster assigned port, used for bootstrapping (optional)
 
JacORB CORBA socket:
org.jacorb.util.Environment.getProperty("OAIAddr");
org.jacorb.util.Environment.getProperty("OAPort");

See Also:
The protocol.corba.JacORB requirement, The protocol.corba.NameService requirement

Field Summary
private  AddressServer addressServer
           
private  I_Authenticate authenticate
          The singleton handle for this xmlBlaster server
private  org.omg.CORBA.Object authRef
           
private  AuthServerImpl authServer
          The singleton handle for this xmlBlaster server
protected  ContextNode contextNode
           
private  Global glob
           
private  java.lang.String iorFile
           
protected  boolean isActive
           
private static java.util.logging.Logger log
           
protected  java.lang.Object mbeanHandle
          My JMX registration, can be done optionally by implementing classes
private  java.lang.String ME
           
private  org.omg.CosNaming.NameComponent[] nameNode
           
private  org.omg.CosNaming.NameComponent[] nameXmlBlaster
           
private  org.omg.CosNaming.NamingContextExt namingContextExt
           
private  org.omg.CORBA.ORB orb
           
private  org.omg.PortableServer.POA rootPOA
           
private  java.lang.String urlPath
          The URL path over which the IOR can be accessed (via our http bootstrap server)
private  I_XmlBlaster xmlBlasterImpl
          The singleton handle for this xmlBlaster server
 
Constructor Summary
CorbaDriver()
           
 
Method Summary
 void activate()
          Activate xmlBlaster access through this protocol.
 void deActivate()
          JMX Deactivate xmlBlaster access (standby), no clients can connect.
 java.lang.String getName()
          Get a human readable name of this driver
private  org.omg.CosNaming.NamingContextExt getNamingService()
          Locate the CORBA Naming Service.
 java.lang.String getProtocolId()
          Access the xmlBlaster internal name of the protocol driver.
 java.lang.String getRawAddress()
          Get the address how to access this driver.
 java.lang.String getType()
          Enforced by I_Plugin
 java.lang.String getUsageUrl()
           
 java.lang.String getVersion()
          Enforced by I_Plugin
private  void init(Global glob, AddressServer addressServer, I_Authenticate authenticate, I_XmlBlaster xmlBlasterImpl)
          Start xmlBlaster CORBA access.
 void init(Global glob, PluginInfo pluginInfo)
          This method is called by the PluginManager (enforced by I_Plugin).
 boolean isActive()
          JMX
 boolean isShutdown()
          Check status
 void setUsageUrl(java.lang.String url)
           
 void shutdown()
          Instructs the ORB to shut down, which causes all object adapters to shut down.
 java.lang.String usage()
          Command line usage.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ME

private java.lang.String ME

orb

private org.omg.CORBA.ORB orb

glob

private Global glob

log

private static java.util.logging.Logger log

namingContextExt

private org.omg.CosNaming.NamingContextExt namingContextExt

nameXmlBlaster

private org.omg.CosNaming.NameComponent[] nameXmlBlaster

nameNode

private org.omg.CosNaming.NameComponent[] nameNode

iorFile

private java.lang.String iorFile

authServer

private AuthServerImpl authServer
The singleton handle for this xmlBlaster server


authenticate

private I_Authenticate authenticate
The singleton handle for this xmlBlaster server


xmlBlasterImpl

private I_XmlBlaster xmlBlasterImpl
The singleton handle for this xmlBlaster server


rootPOA

private org.omg.PortableServer.POA rootPOA

authRef

private org.omg.CORBA.Object authRef

urlPath

private final java.lang.String urlPath
The URL path over which the IOR can be accessed (via our http bootstrap server)

See Also:
Constant Field Values

addressServer

private AddressServer addressServer

mbeanHandle

protected java.lang.Object mbeanHandle
My JMX registration, can be done optionally by implementing classes


contextNode

protected ContextNode contextNode

isActive

protected boolean isActive
Constructor Detail

CorbaDriver

public CorbaDriver()
Method Detail

getName

public java.lang.String getName()
Get a human readable name of this driver

Specified by:
getName in interface I_Driver

getProtocolId

public java.lang.String getProtocolId()
Access the xmlBlaster internal name of the protocol driver.

Specified by:
getProtocolId in interface I_Driver
Returns:
"IOR"

getType

public java.lang.String getType()
Enforced by I_Plugin

Specified by:
getType in interface I_AdminPlugin
Specified by:
getType in interface I_Plugin
Returns:
For example "IOR"

getVersion

public java.lang.String getVersion()
Enforced by I_Plugin

Specified by:
getVersion in interface I_AdminPlugin
Specified by:
getVersion in interface I_Plugin
Returns:
For example "1.0"

init

public void init(Global glob,
                 PluginInfo pluginInfo)
          throws XmlBlasterException
This method is called by the PluginManager (enforced by I_Plugin).

Specified by:
init in interface I_Plugin
Throws:
XmlBlasterException
See Also:
I_Plugin.init(org.xmlBlaster.util.Global,org.xmlBlaster.util.plugin.PluginInfo)

getRawAddress

public java.lang.String getRawAddress()
Get the address how to access this driver.

Specified by:
getRawAddress in interface CorbaDriverMBean
Specified by:
getRawAddress in interface I_Driver
Returns:
"IOR:00034500350..."

init

private void init(Global glob,
                  AddressServer addressServer,
                  I_Authenticate authenticate,
                  I_XmlBlaster xmlBlasterImpl)
           throws XmlBlasterException
Start xmlBlaster CORBA access. Is called after plugin is created

Parameters:
args - The command line parameters
Throws:
XmlBlasterException

activate

public void activate()
              throws XmlBlasterException
Activate xmlBlaster access through this protocol.

Specified by:
activate in interface I_Driver
Specified by:
activate in interface I_AdminService
Throws:
XmlBlasterException

deActivate

public void deActivate()
JMX Deactivate xmlBlaster access (standby), no clients can connect.

Specified by:
deActivate in interface I_Driver
Specified by:
deActivate in interface I_AdminService

shutdown

public void shutdown()
              throws XmlBlasterException
Instructs the ORB to shut down, which causes all object adapters to shut down.

JacORB behavior:
The POA is not "connected" to the ORB in any particular way other than that is exists. You can call destroy() on a POA to make it disappear. Calling shutdown() on the ORB will implicitly destroy all POAs.

Ports are not linked to POAs in JacORB. Rather, there is a single master port in any server-side ORB which gets created when the root poa is retrieved for the first time. The server process accepts incoming connections on this port and creates new ports for every client process. Because of this connection multiplexing, ports are not released when POAs are destroyed, but when clients exit, or when server-side timouts occur.

Specified by:
shutdown in interface I_AdminPlugin
Specified by:
shutdown in interface I_Plugin
Throws:
XmlBlasterException - if an exception occurs. The exception is handled by the RunLevelManager depending on how the plugin has been configured with the action:

<action do='STOP' onShutdownRunlevel='2' sequence='5' onFail='resource.configuration.pluginFailed'> If onFail is defined to something, the RunLevelManager will stop.


isShutdown

public boolean isShutdown()
Description copied from interface: I_AdminPlugin
Check status

Specified by:
isShutdown in interface I_AdminPlugin
Returns:
true if down

getNamingService

private org.omg.CosNaming.NamingContextExt getNamingService()
                                                     throws XmlBlasterException
Locate the CORBA Naming Service.

The found naming service is cached, for better performance in subsequent calls

Returns:
NamingContextExt, reference on name service
Note that this reference may be invalid, because the naming service is not running any more
Throws:
XmlBlasterException - CORBA error handling if no naming service is found

usage

public java.lang.String usage()
Command line usage.

Specified by:
usage in interface I_Driver
Specified by:
usage in interface I_AdminUsage
Returns:
a human readable usage help string

getUsageUrl

public java.lang.String getUsageUrl()
Specified by:
getUsageUrl in interface I_AdminUsage
Returns:
A link for JMX usage

setUsageUrl

public void setUsageUrl(java.lang.String url)
Specified by:
setUsageUrl in interface I_AdminUsage

isActive

public boolean isActive()
JMX

Specified by:
isActive in interface I_AdminService
Returns:
true if active
See Also:
I_AdminService.isActive()

xmlBlaster 2.2.0 API

Copyright © 1999-2014 The xmlBlaster.org contributers.