com.webmethods.sc.mws
Class MWSLibrary

java.lang.Object
  extended by com.webmethods.sc.mws.MWSLibrary

public class MWSLibrary
extends Object

MWSLibrary class is used to intialize and shutdown My webMethods Server shared component.

MWSLibrary is initialized by calling into MWSLibrary.init() method. If API has been already initialized this call does nothing. Before initilizing the client must set some configuration system properties:

MWS Database configuration. My webMethods Server component needs to access MWS database where all necessary configuration is stored. There are two ways to configure this connectivity:

Any audit logging done by directory component is done to #LOG_CATEGORY_NAME Log4J category logger. It is up to container using this API to provide logging configuration for this category


Field Summary
static String SYSTEM_PROP_CDS_JOURNAL_LOGGER
          System property which identifies the fully qualified class name for WmJournalLogger used by CDS.
static String SYSTEM_PROP_CDS_LOG_PROPERTIES_FILE
          System property which identifies the location of external log4j properties file for configuring the CDS logger
static String SYSTEM_PROP_CLEANUP_PERIOD
          System property which identifies the amount of time in milliseconds to sleep between runs of the idle connection validation/cleaner thread.
static int SYSTEM_PROP_CLEANUP_PERIOD_DEFAULT
          The default value for the amount of time in milliseconds to sleep between runs of the idle connection validation/cleaner thread.
static String SYSTEM_PROP_DB_DRIVER
          System property which identifies database driver.
static String SYSTEM_PROP_DB_PASSWORD
          System property which identifies database connection password.
static String SYSTEM_PROP_DB_URL
          System property which identifies connection url.
static String SYSTEM_PROP_DB_USER
          System property which identifies database connection user.
static String SYSTEM_PROP_IDLE_TIMEOUT
          System property which identifies the minimum amount of time in milliseconds an object may sit idle in the pool before it is eligible for evication.
static int SYSTEM_PROP_IDLE_TIMEOUT_DEFAULT
          The default value for the minimum amount of time in milliseconds an object may sit idle in the pool before it is eligible for evication.
static String SYSTEM_PROP_JDBC_POOL_ALIAS
          System property which identifies the name of JDBC pool alias which should be used to connect to MWS database
static String SYSTEM_PROP_MAX_CONNECTIONS
          System property which identifies the maximum number of established connections that should be kept in the pool at all times.
static int SYSTEM_PROP_MAX_CONNECTIONS_DEFAULT
          The default value for the maximum number of established connections that should be kept in the pool at all times.
static String SYSTEM_PROP_MAX_WAITTIME
          System property which identifies the amount of time in milliseconds to sleep between runs of the idle connection validation/cleaner thread.
static int SYSTEM_PROP_MAX_WAITTIME_DEFAULT
          The default value for the amount of time in milliseconds to sleep between runs of the idle connection validation/cleaner thread.
static String SYSTEM_PROP_MIN_CONNECTIONS
          System property which identifies the minimum number of established connections that should be kept in the pool at all times.
static int SYSTEM_PROP_MIN_CONNECTIONS_DEFAULT
          The default value for the minimum number of established connections that should be kept in the pool at all times.
static String SYSTEM_PROP_MWS_INSTALL_DIR
          System property which value identifies root path to installed WM products, e.g.
 
Method Summary
static void init()
          Initializes MWSLibrary.
static boolean isInitialized()
          Returns true if MWSLibrary is already initialized
static void shutdown()
          Shuts down previously initialized MWSLibrary.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SYSTEM_PROP_MWS_INSTALL_DIR

public static final String SYSTEM_PROP_MWS_INSTALL_DIR
System property which value identifies root path to installed WM products, e.g. c:\webMethods. This is used to read MWS database configuration and requires a local configured MWS instance. Either this property of DB_URL property should be specified

See Also:
Constant Field Values

SYSTEM_PROP_JDBC_POOL_ALIAS

public static final String SYSTEM_PROP_JDBC_POOL_ALIAS
System property which identifies the name of JDBC pool alias which should be used to connect to MWS database

See Also:
Constant Field Values

SYSTEM_PROP_DB_URL

public static final String SYSTEM_PROP_DB_URL
System property which identifies connection url. Either this property or WM_INSTALL_DIR property should be specified

See Also:
Constant Field Values

SYSTEM_PROP_DB_DRIVER

public static final String SYSTEM_PROP_DB_DRIVER
System property which identifies database driver.

See Also:
Constant Field Values

SYSTEM_PROP_DB_USER

public static final String SYSTEM_PROP_DB_USER
System property which identifies database connection user.

See Also:
Constant Field Values

SYSTEM_PROP_MIN_CONNECTIONS

public static final String SYSTEM_PROP_MIN_CONNECTIONS
System property which identifies the minimum number of established connections that should be kept in the pool at all times.

See Also:
Constant Field Values

SYSTEM_PROP_MIN_CONNECTIONS_DEFAULT

public static final int SYSTEM_PROP_MIN_CONNECTIONS_DEFAULT
The default value for the minimum number of established connections that should be kept in the pool at all times.

See Also:
Constant Field Values

SYSTEM_PROP_MAX_CONNECTIONS

public static final String SYSTEM_PROP_MAX_CONNECTIONS
System property which identifies the maximum number of established connections that should be kept in the pool at all times.

See Also:
Constant Field Values

SYSTEM_PROP_MAX_CONNECTIONS_DEFAULT

public static final int SYSTEM_PROP_MAX_CONNECTIONS_DEFAULT
The default value for the maximum number of established connections that should be kept in the pool at all times.

See Also:
Constant Field Values

SYSTEM_PROP_IDLE_TIMEOUT

public static final String SYSTEM_PROP_IDLE_TIMEOUT
System property which identifies the minimum amount of time in milliseconds an object may sit idle in the pool before it is eligible for evication.

See Also:
Constant Field Values

SYSTEM_PROP_IDLE_TIMEOUT_DEFAULT

public static final int SYSTEM_PROP_IDLE_TIMEOUT_DEFAULT
The default value for the minimum amount of time in milliseconds an object may sit idle in the pool before it is eligible for evication.

See Also:
Constant Field Values

SYSTEM_PROP_CLEANUP_PERIOD

public static final String SYSTEM_PROP_CLEANUP_PERIOD
System property which identifies the amount of time in milliseconds to sleep between runs of the idle connection validation/cleaner thread.

See Also:
Constant Field Values

SYSTEM_PROP_CLEANUP_PERIOD_DEFAULT

public static final int SYSTEM_PROP_CLEANUP_PERIOD_DEFAULT
The default value for the amount of time in milliseconds to sleep between runs of the idle connection validation/cleaner thread.

See Also:
Constant Field Values

SYSTEM_PROP_MAX_WAITTIME

public static final String SYSTEM_PROP_MAX_WAITTIME
System property which identifies the amount of time in milliseconds to sleep between runs of the idle connection validation/cleaner thread.

See Also:
Constant Field Values

SYSTEM_PROP_MAX_WAITTIME_DEFAULT

public static final int SYSTEM_PROP_MAX_WAITTIME_DEFAULT
The default value for the amount of time in milliseconds to sleep between runs of the idle connection validation/cleaner thread.

See Also:
Constant Field Values

SYSTEM_PROP_DB_PASSWORD

public static final String SYSTEM_PROP_DB_PASSWORD
System property which identifies database connection password. Once MWSLibrary is initialized password value is not required in the System properties anymore

See Also:
Constant Field Values

SYSTEM_PROP_CDS_JOURNAL_LOGGER

public static final String SYSTEM_PROP_CDS_JOURNAL_LOGGER
System property which identifies the fully qualified class name for WmJournalLogger used by CDS. If not present, MWSLibrary will try to load the DEFAULT_CDS_JOURNAL_LOGGER

See Also:
Constant Field Values

SYSTEM_PROP_CDS_LOG_PROPERTIES_FILE

public static final String SYSTEM_PROP_CDS_LOG_PROPERTIES_FILE
System property which identifies the location of external log4j properties file for configuring the CDS logger

See Also:
Constant Field Values
Method Detail

init

public static void init()
                 throws Exception
Initializes MWSLibrary. It establishes connection to configured and initialized MWS database and load all required configuration data

Throws:
Exception - if there was an exception during MWSLibrary initialization

shutdown

public static void shutdown()
Shuts down previously initialized MWSLibrary. It cleans all cached resources and disconnects from MWS database


isInitialized

public static boolean isInitialized()
Returns true if MWSLibrary is already initialized