public class MWSLibrary extends Object
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:
MWSLibrary.SYSTEM_PROP_MWS_INSTALL_DIR
property to point to the
the installation folder for WM products, if MWS is present there it will read database connectivity configuration
directly from MWSMWSLibrary.SYSTEM_PROP_JDBC_POOL_ALIAS
the name of the alias set for this JDBC pool. Then MWSLibrary obtain connections from this pool instead
of creating and managing its own internal pool
MWSLibrary.SYSTEM_PROP_DB_DRIVER
, #SYSTEM_MWS_DB_URL
,
#SYSTEM_MWS_DB_USER
, #SYSTEM_MWS_DB_PASSWORD
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
Modifier and Type | Field and Description |
---|---|
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.
|
Modifier and Type | Method and Description |
---|---|
static void |
init()
Initializes MWSLibrary.
|
static boolean |
isInitialized()
Returns true if MWSLibrary is already initialized
|
static void |
shutdown()
Shuts down previously initialized MWSLibrary.
|
public static final String SYSTEM_PROP_MWS_INSTALL_DIR
public static final String SYSTEM_PROP_JDBC_POOL_ALIAS
public static final String SYSTEM_PROP_DB_URL
public static final String SYSTEM_PROP_DB_DRIVER
public static final String SYSTEM_PROP_DB_USER
public static final String SYSTEM_PROP_MIN_CONNECTIONS
public static final int SYSTEM_PROP_MIN_CONNECTIONS_DEFAULT
public static final String SYSTEM_PROP_MAX_CONNECTIONS
public static final int SYSTEM_PROP_MAX_CONNECTIONS_DEFAULT
public static final String SYSTEM_PROP_IDLE_TIMEOUT
public static final int SYSTEM_PROP_IDLE_TIMEOUT_DEFAULT
public static final String SYSTEM_PROP_CLEANUP_PERIOD
public static final int SYSTEM_PROP_CLEANUP_PERIOD_DEFAULT
public static final String SYSTEM_PROP_MAX_WAITTIME
public static final int SYSTEM_PROP_MAX_WAITTIME_DEFAULT
public static final String SYSTEM_PROP_DB_PASSWORD
public static final String SYSTEM_PROP_CDS_JOURNAL_LOGGER
public static final String SYSTEM_PROP_CDS_LOG_PROPERTIES_FILE
public static void init() throws Exception
Exception
- if there was an exception during MWSLibrary initializationpublic static void shutdown()
public static boolean isInitialized()