com.ail.core.configure.server
Class ServerBean

java.lang.Object
  extended by com.ail.core.Component
      extended by com.ail.core.EJBComponent
          extended by com.ail.core.configure.server.ServerBean
All Implemented Interfaces:
ConfigurationOwner, CoreUser, java.io.Serializable, javax.ejb.EnterpriseBean, javax.ejb.SessionBean

public class ServerBean
extends EJBComponent
implements javax.ejb.SessionBean, CoreUser, ConfigurationOwner

Version:
$Revision: 1.8 $
See Also:
Serialized Form

Constructor Summary
ServerBean()
           
 
Method Summary
 CatalogCarArg catalogCar(CatalogCarArg arg)
          Service wrapper business method for the CatalogCar service.
 void clearConfigurationCache()
          Reset the server side cache used to hold configuration information.
 void clearNamedConfigurationCache(java.lang.String namespace)
          Reset the server side cache used to hold configuration information.
 DeployCarArg deployCar(DeployCarArg arg)
          Service wrapper business method for the DeployCar service.
 void ejbActivate()
           
 void ejbCreate()
           
 void ejbPassivate()
           
 void ejbRemove()
           
 GetClassListArg getClassList(GetClassListArg arg)
          Service wrapper business method for the GetClassList service.
 GetCommandScriptArg getCommandScript(GetCommandScriptArg arg)
          Service wrapper business method for the GetCommandScript service.
 GetConfigurationArg getConfiguration(GetConfigurationArg arg)
           
 java.lang.String getConfigurationNamespace()
          Hard code the namespace to "com.ail.core.configure.server.ServerBean".
 Core getCore()
          Fetch the entry point's instance of the core.
 GetNamespacesArg getNamespaces(GetNamespacesArg arg)
           
 javax.ejb.SessionContext getSessionContext()
          Returns the context passed to the EJB's setSessionContext method.
 Version getVersion()
          Return the version details of this component.
 VersionEffectiveDate getVersionEffectiveDate()
          The version effective date for the bean is always 'now'.
 org.w3c.dom.Element[] invokeServiceSoap(org.w3c.dom.Element[] xml)
           
 java.lang.String invokeServiceXML(java.lang.String xml)
          Expose services via XML.
 PackageCarArg packageCar(PackageCarArg arg)
          Service wrapper business method for the PackageCar service.
 void resetCoreConfiguration()
          Reset the Core's configuration to its factory settings.
 void resetNamedConfiguration(java.lang.String name)
          Reset a named configuration owner to its factory settings.
 SetCommandScriptArg setCommandScript(SetCommandScriptArg arg)
          Service wrapper business method for the SetCommandScript service.
 SetConfigurationArg setConfiguration(SetConfigurationArg arg)
           
 void setSessionContext(javax.ejb.SessionContext context)
           
 
Methods inherited from class com.ail.core.EJBComponent
getSecurityPrincipal
 
Methods inherited from class com.ail.core.Component
getConfiguration, resetConfiguration, setConfiguration
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.ail.core.configure.ConfigurationOwner
getConfiguration, resetConfiguration, setConfiguration
 

Constructor Detail

ServerBean

public ServerBean()
Method Detail

setSessionContext

public void setSessionContext(javax.ejb.SessionContext context)
Specified by:
setSessionContext in interface javax.ejb.SessionBean

getSessionContext

public javax.ejb.SessionContext getSessionContext()
Description copied from class: EJBComponent
Returns the context passed to the EJB's setSessionContext method.

Specified by:
getSessionContext in class EJBComponent
Returns:
session context.

ejbActivate

public void ejbActivate()
Specified by:
ejbActivate in interface javax.ejb.SessionBean

ejbPassivate

public void ejbPassivate()
Specified by:
ejbPassivate in interface javax.ejb.SessionBean

ejbRemove

public void ejbRemove()
Specified by:
ejbRemove in interface javax.ejb.SessionBean

ejbCreate

public void ejbCreate()
               throws javax.ejb.CreateException
Throws:
javax.ejb.CreateException

getVersionEffectiveDate

public VersionEffectiveDate getVersionEffectiveDate()
                                             throws javax.ejb.EJBException
The version effective date for the bean is always 'now'.

Specified by:
getVersionEffectiveDate in interface CoreUser
Overrides:
getVersionEffectiveDate in class Component
Returns:
version effective date.
Throws:
javax.ejb.EJBException

getVersion

public Version getVersion()
                   throws javax.ejb.EJBException
Description copied from class: Component
Return the version details of this component.

Specified by:
getVersion in class Component
Returns:
version details
Throws:
javax.ejb.EJBException

getCore

public Core getCore()
             throws javax.ejb.EJBException
Description copied from class: Component
Fetch the entry point's instance of the core.

Specified by:
getCore in class Component
Returns:
The core being used by the entry points.
Throws:
javax.ejb.EJBException

resetCoreConfiguration

public void resetCoreConfiguration()
                            throws javax.ejb.EJBException
Reset the Core's configuration to its factory settings.

Throws:
javax.ejb.EJBException

resetNamedConfiguration

public void resetNamedConfiguration(java.lang.String name)
                             throws javax.ejb.EJBException
Reset a named configuration owner to its factory settings. The name argument may be "all" in which case a predefined set of configurations (defined in this component's config) are reset.

Parameters:
name - The class name of the ConfigurationOwner, or "all" to reset the predefined list.
Throws:
javax.ejb.EJBException - if the configurationOwner class cannot be found/instantiated.

clearConfigurationCache

public void clearConfigurationCache()
                             throws javax.ejb.EJBException
Reset the server side cache used to hold configuration information.

Throws:
javax.ejb.EJBException

clearNamedConfigurationCache

public void clearNamedConfigurationCache(java.lang.String namespace)
                                  throws javax.ejb.EJBException
Reset the server side cache used to hold configuration information.

Parameters:
namespace - The namespace to be cleared from the cache.
Throws:
javax.ejb.EJBException

invokeServiceXML

public java.lang.String invokeServiceXML(java.lang.String xml)
                                  throws javax.ejb.EJBException
Expose services via XML. This method unmarshals the XML argument string into an object, finds a method on the EJB to accept that object type as an argument and invokes it. The result returned from the method is marshalled back into XM and returned.

The methods are invoked on the context's local interface if possible (if one exists). If no local interface is found then the remote interface is used instead. Invoking methods via the local/remote interface means that the deployment settings for security and transacts will be honoured.

Parameters:
xml - XML argument to be passed to the service.
Returns:
XML returned from the service.
Throws:
javax.ejb.EJBException

invokeServiceSoap

public org.w3c.dom.Element[] invokeServiceSoap(org.w3c.dom.Element[] xml)
                                        throws javax.ejb.EJBException
Throws:
javax.ejb.EJBException

getNamespaces

public GetNamespacesArg getNamespaces(GetNamespacesArg arg)
                               throws javax.ejb.EJBException
Throws:
javax.ejb.EJBException

getConfiguration

public GetConfigurationArg getConfiguration(GetConfigurationArg arg)
                                     throws javax.ejb.EJBException
Throws:
javax.ejb.EJBException

setConfiguration

public SetConfigurationArg setConfiguration(SetConfigurationArg arg)
                                     throws javax.ejb.EJBException
Throws:
javax.ejb.EJBException

getCommandScript

public GetCommandScriptArg getCommandScript(GetCommandScriptArg arg)
                                     throws javax.ejb.EJBException
Service wrapper business method for the GetCommandScript service.

Parameters:
arg - The argument to pass to the service.
Returns:
The objects returned from the service.
Throws:
BaseServerException - In response to any exception thrown by the service.
javax.ejb.EJBException

setCommandScript

public SetCommandScriptArg setCommandScript(SetCommandScriptArg arg)
                                     throws javax.ejb.EJBException
Service wrapper business method for the SetCommandScript service.

Parameters:
arg - The argument to pass to the service.
Returns:
The objects returned from the service.
Throws:
BaseServerException - In response to any exception thrown by the service.
javax.ejb.EJBException

getClassList

public GetClassListArg getClassList(GetClassListArg arg)
                             throws javax.ejb.EJBException
Service wrapper business method for the GetClassList service.

Parameters:
arg - The argument to pass to the service.
Returns:
The objects returned from the service.
Throws:
BaseServerException - In response to any exception thrown by the service.
javax.ejb.EJBException

deployCar

public DeployCarArg deployCar(DeployCarArg arg)
                       throws javax.ejb.EJBException
Service wrapper business method for the DeployCar service.

Parameters:
arg - The argument to pass to the service.
Returns:
The objects returned from the service.
Throws:
BaseServerException - In response to any exception thrown by the service.
javax.ejb.EJBException

packageCar

public PackageCarArg packageCar(PackageCarArg arg)
                         throws javax.ejb.EJBException
Service wrapper business method for the PackageCar service.

Parameters:
arg - The argument to pass to the service.
Returns:
The objects returned from the service.
Throws:
BaseServerException - In response to any exception thrown by the service.
javax.ejb.EJBException

catalogCar

public CatalogCarArg catalogCar(CatalogCarArg arg)
                         throws javax.ejb.EJBException
Service wrapper business method for the CatalogCar service.

Parameters:
arg - The argument to pass to the service.
Returns:
The objects returned from the service.
Throws:
BaseServerException - In response to any exception thrown by the service.
javax.ejb.EJBException

getConfigurationNamespace

public java.lang.String getConfigurationNamespace()
Hard code the namespace to "com.ail.core.configure.server.ServerBean". Generally, the super class will automatically provide a namespace based on the class name, but for EJBs this can be a problem. Some app server generated containers effect the name of the class causing the configuration to fail. Weblogic is one such.

Specified by:
getConfigurationNamespace in interface CoreUser
Overrides:
getConfigurationNamespace in class Component
Returns:
The namespace of the configuration.