com.bea.dsp.management.session
Interface SessionMBean


public interface SessionMBean

A core session maintains the currently active artifacts for all data spaces. A change session maintains the modifications associated with one or more data spaces.


Field Summary
static java.lang.String NAME_PREFIX
           
 
Method Summary
 void changeOwner()
          Sets the owner of this session to the current user.
 void deploy(DeploymentUnit deploymentUnit, DeploymentOptions deploymentOptions)
          Models the import of a set of changes in an existing data space during this session.
 void export(java.lang.String dataSpaceName, java.lang.String jarFilePath, ExportOptions exportOptions)
          Models the export of the definition and optionally also the configuration artifacts in a data space in this session to a jar file.
 javax.management.ObjectName getAdministrationService(java.lang.String dataSpaceName)
           
 javax.management.ObjectName getMetadataService(java.lang.String dataSpaceName)
           
 java.lang.String getOwner()
           
 javax.management.ObjectName getRuntimeService(java.lang.String dataSpaceName)
          Returns the object name for the RuntimeServiceMBean for the dataspace.
 DataSpaceVersion getVersion(java.lang.String dataSpaceName)
           
 DeploymentUnit.ContentType importJar(java.lang.String dataSpaceName, java.lang.String jarFilePath, DeploymentOptions deploymentOptions)
          Models the import of a set of changes in the specified data space during this session.
 

Field Detail

NAME_PREFIX

static final java.lang.String NAME_PREFIX
Method Detail

importJar

DeploymentUnit.ContentType importJar(java.lang.String dataSpaceName,
                                     java.lang.String jarFilePath,
                                     DeploymentOptions deploymentOptions)
                                     throws java.lang.Exception
Models the import of a set of changes in the specified data space during this session. The changes involve creation (C) or update (U) of data space model or administration artifacts contained in the jar. The jar file must be present on the admin server's file system. Artifacts that do not currently exist in the specified data space in this session are created and those that exist are updated. The jar file may also contain a file containing a list of locators of artifacts to be deleted. The file should be named "delete.list" and it should be located under META-INF folder. All other jar entries under the META-INF are ignored.

This method is not applicable to the core session.

Parameters:
dataSpaceName - The name of the data space to import into. Must exist and may not be null.
jarFilePath - The path to the jar file on the admin server's file system. May not be null and the file must exist.
deploymentOptions - See DeploymentOptions. null denotes the default options.
Returns:
The content type of the deployment unit represented by the specified jar.

May not be null.

Throws:
java.lang.Exception - The ManagementException instances thrown by this method have one of the following error codes:
  • DEPLOYMENT_UNIT_VALIDATION_FAILED
  • INVALID_DEPLOYMENT_UNIT__BUILD Exceptions with this error code can be downcast to DeploymentUnitBuildException, so that the list of detailed build error messages may be retrieved.
  • INCREMENTAL_DEPLOYMENT_FATAL_FAILURE
See Also:
for details about how you can set various flags while importing a jar., This method constructs an in memory deployment unit and then delegates to that method.

deploy

void deploy(DeploymentUnit deploymentUnit,
            DeploymentOptions deploymentOptions)
            throws java.lang.Exception
Models the import of a set of changes in an existing data space during this session. The changes involve creation (C), update (U) or deletion (D) of data space model or administrative artifacts.

If the deployment unit contains administrative artifacts, the following constraints apply:

This operation involves the following stages:

This method is not applicable to the core session.

Parameters:
deploymentUnit - A unit capturing the set of artifact changes to be applied on a particular data space in this session. May not be null.
deploymentOptions - See DeploymentOptions. null denotes the default options.
Throws:
java.lang.Exception - The ManagementException instances thrown by this method have one of the following error codes:
  • DEPLOYMENT_UNIT_VALIDATION_FAILED
  • INVALID_DEPLOYMENT_UNIT__BUILD Exceptions with this error code can be downcast to DeploymentUnitBuildException, so that the list of detailed build error messages may be retrieved.
  • INCREMENTAL_DEPLOYMENT_FATAL_FAILURE
See Also:
DeploymentUnit

export

void export(java.lang.String dataSpaceName,
            java.lang.String jarFilePath,
            ExportOptions exportOptions)
            throws java.lang.Exception
Models the export of the definition and optionally also the configuration artifacts in a data space in this session to a jar file.

Parameters:
dataSpaceName - The name of the data space to extract the resources from. May not be null and must exist.
jarFilePath - The location of the generated jar file. May not be null.
exportOptions -
Throws:
java.lang.Exception - If the above conditions are not met, or the jar file cannot be generated.
See Also:
for details about all the flags that you can set while exporting a dataspace

changeOwner

void changeOwner()
                 throws java.lang.Exception
Sets the owner of this session to the current user.

NOTE: This method is primarily meant to be used when an inactive, long-standing session prevents other administrators from making changes. Use of this method to perform session changes when a session is active and application of other changes are pending will result in non-deterministic behavior.

This method is not applicable to the core session.

Throws:
java.lang.Exception - If problems are encountered while associating the session with the current user (e.g. because of security permissions or file I/O).

getOwner

java.lang.String getOwner()
                          throws java.lang.Exception
Returns:
The current owner of this session.

This method is not applicable to the core session.

Throws:
java.lang.Exception - If problems are encountered while retrieving the owner of the current session (e.g. because of security permissions or file I/O).

getAdministrationService

javax.management.ObjectName getAdministrationService(java.lang.String dataSpaceName)
                                                     throws java.lang.Exception
Parameters:
dataSpaceName - The name of a data space. Must exist and not be null.
Returns:
The object name of the MBean that provides access to administration services for this data space in this session.
Throws:
java.lang.Exception - If the dataspace does not exist.

getMetadataService

javax.management.ObjectName getMetadataService(java.lang.String dataSpaceName)
                                               throws java.lang.Exception
Parameters:
dataSpaceName - The name of a data space. Must exist and not be null.
Returns:
The object name of the MBean that provides access to metadata access services for this data space in this session.
Throws:
java.lang.Exception - If the dataspace does not exist.

getRuntimeService

javax.management.ObjectName getRuntimeService(java.lang.String dataSpaceName)
                                              throws java.lang.Exception
Returns the object name for the RuntimeServiceMBean for the dataspace. There are two kind of runtime mbeans for a dataspace. The local runtime service mbean for a dataspace runs on all the target servers. The global runtime service mbean runs on the admin server only. This method returns the object name for the global runtime service mbean.

This method is applicable only to the core session.

Parameters:
dataSpaceName - The name of a data space. Must exist and not be null.
Returns:
The object name of the MBean that provides access to global runtime info for this data space in the core session.
Throws:
java.lang.Exception - If the dataspace does not exist.
java.lang.UnsupportedOperationException - If this method is called on any session other than the core session.

getVersion

DataSpaceVersion getVersion(java.lang.String dataSpaceName)
                            throws java.lang.Exception
Parameters:
dataSpaceName - The name of a data space. May not be null.
Returns:
An opaque component that may be used to compare dataspace versions.
Throws:
java.lang.Exception - In the specified data space does not exist.


Copyright © 2007 BEA Systems Inc. All Rights Reserved.