org.obe.spi.service
Class ServerConfig

java.lang.Object
  extended byorg.obe.util.CommonConfig
      extended byorg.obe.spi.service.ServerConfig

public final class ServerConfig
extends CommonConfig

Provides access to OBE server configuration information. OBE is configured by several XML and properties files, which can either be located in the OBE configuration directory or in the META-INF/services directory in obeconfig.jar. Resources in the latter location are accessed via this class's ClassLoader. The OBE configuration directory can be specified by the system property "obe.config.dir", and it defaults to the current directory. Loose files take precedence over resources in obeconfig.jar.

The obe.properties file contains the main OBE configuration, and the ServiceManager.properties file contains the OBE ServiceManager configuration.

Author:
Adrian Price

Field Summary
static java.lang.String ASYNC_THREADPOOL_SIZE_PROP
          Property key for async manager thread pool size.
static java.lang.String AUDIT_NON_TXN_PROP
          Property key for audit trail transactionality.
static java.lang.String DIRECTORY_POLL_INTERVAL_PROP
          Property key for processes directory polling interval.
static java.lang.String DOMAIN_PROP
          Property key for auditing domain.
static java.lang.String EVENT_KEY_BASED_SUBSCRIPTIONS_PROP
          Property key for key-based event subscription usage.
static java.lang.String EVENT_MAX_TARDINESS_PROP
          Property key for temporal event validity.
static java.lang.String MAIL_SESSION_PROP
          Property key for mail session.
static java.lang.String NODE_PROP
          Property key for auditing node.
static java.lang.String REUSE_WORKITEMS_PROP
          Property key for workitem reuse.
static java.lang.String SCRIPT_PROP
          Property key for default script type.
static java.lang.String USE_EVENT_API_PROP
          Property key for internal event API usage.
static java.lang.String USE_INIT_SERVLET_PROP
          Property key for initialization servlet usage.
static java.lang.String VERBOSE_PROP
          Property key for debug verbosity.
 
Fields inherited from class org.obe.util.CommonConfig
_logger, _props, CONFIG_DIR_PROP, CONFIG_FILE, CREDENTIALS_PROP, DATE_FORMAT_PROP, DURATION_UNIT_PROP, PRINCIPAL_PROP, PROTOCOL_PROP
 
Method Summary
static int getAsyncThreadpoolSize()
          Returns the size of the thread pool used to service asynchronous execution requests.
static int getDirectoryPollInterval()
          Returns the polling interval for the ${obe.config.dir}/processes and ${obe.config.dir}/events directories.
static java.lang.String getDomain()
          Returns the server's management domain.
static java.lang.String getHostAddress()
          Returns the local host's IP address.
static java.lang.String getHostName()
          Returns the local host's DNS host name.
static java.net.InetAddress getLocalHost()
          Returns the local host's InetAddress, if known.
static javax.mail.Session getMailSession()
          Returns the default mail session.
static int getMaximumTemporalEventTardiness()
          Returns the maximum acceptable delay for processing a non-recoverable temporal event.
static java.lang.String getNodeId()
          Returns the server's node ID.
static java.lang.String getScriptType()
          Returns the default script type to use if one is not specified in XPDL.
static boolean isAuditNonTransactional()
          Returns whether auditing should be performed non-transactionally.
static boolean isVerbose()
          Returns whether debug output should be verbose.
static boolean reuseWorkItems()
          Returns whether work items should be re-used.
static boolean supportsKeyBasedEventSubscriptions()
          Returns whether the event manager should accept key-based event subscriptions.
static boolean useEventAPI()
          Returns whether to inject application events via the local client API.
static boolean useInitServlet()
          Returns whether to defer initialization to the J2EEInitServlet.
 
Methods inherited from class org.obe.util.CommonConfig
findResource, getBooleanProperty, getConfigDir, getCredentials, getDefaultDateFormat, getDefaultDurationUnit, getIntProperty, getPrincipal, getProtocol, getStringProperty, openInputSource, openInputStream, openOutputStream, openReader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

AUDIT_NON_TXN_PROP

public static final java.lang.String AUDIT_NON_TXN_PROP
Property key for audit trail transactionality.

See Also:
isAuditNonTransactional(), Constant Field Values

DOMAIN_PROP

public static final java.lang.String DOMAIN_PROP
Property key for auditing domain.

See Also:
getDomain(), Constant Field Values

MAIL_SESSION_PROP

public static final java.lang.String MAIL_SESSION_PROP
Property key for mail session.

See Also:
getMailSession(), Constant Field Values

NODE_PROP

public static final java.lang.String NODE_PROP
Property key for auditing node.

See Also:
getNodeId(), Constant Field Values

REUSE_WORKITEMS_PROP

public static final java.lang.String REUSE_WORKITEMS_PROP
Property key for workitem reuse.

See Also:
reuseWorkItems(), Constant Field Values

SCRIPT_PROP

public static final java.lang.String SCRIPT_PROP
Property key for default script type.

See Also:
getScriptType(), Constant Field Values

USE_EVENT_API_PROP

public static final java.lang.String USE_EVENT_API_PROP
Property key for internal event API usage.

See Also:
useEventAPI(), Constant Field Values

EVENT_KEY_BASED_SUBSCRIPTIONS_PROP

public static final java.lang.String EVENT_KEY_BASED_SUBSCRIPTIONS_PROP
Property key for key-based event subscription usage.

See Also:
supportsKeyBasedEventSubscriptions(), Constant Field Values

EVENT_MAX_TARDINESS_PROP

public static final java.lang.String EVENT_MAX_TARDINESS_PROP
Property key for temporal event validity.

See Also:
getMaximumTemporalEventTardiness(), Constant Field Values

USE_INIT_SERVLET_PROP

public static final java.lang.String USE_INIT_SERVLET_PROP
Property key for initialization servlet usage.

See Also:
useInitServlet(), Constant Field Values

VERBOSE_PROP

public static final java.lang.String VERBOSE_PROP
Property key for debug verbosity.

See Also:
isVerbose(), Constant Field Values

ASYNC_THREADPOOL_SIZE_PROP

public static final java.lang.String ASYNC_THREADPOOL_SIZE_PROP
Property key for async manager thread pool size.

See Also:
getAsyncThreadpoolSize(), Constant Field Values

DIRECTORY_POLL_INTERVAL_PROP

public static final java.lang.String DIRECTORY_POLL_INTERVAL_PROP
Property key for processes directory polling interval.

See Also:
getDirectoryPollInterval(), Constant Field Values
Method Detail

getLocalHost

public static java.net.InetAddress getLocalHost()
Returns the local host's InetAddress, if known.

Returns:
The local host.

getHostAddress

public static java.lang.String getHostAddress()
Returns the local host's IP address.

Returns:
The local host address.

getHostName

public static java.lang.String getHostName()
Returns the local host's DNS host name.

Returns:
The DNS host name.

getDomain

public static java.lang.String getDomain()
Returns the server's management domain. Currently, this returns the hard-coded string "OBE". In a future release, this will be changed to return the name of the management domain to which the server belongs.

The setting reflects the string value of the configuration property obe.domain.

Returns:
The management domain name, defaulting to "OBE".
See Also:
DOMAIN_PROP

getNodeId

public static java.lang.String getNodeId()
Returns the server's node ID. Currently, this returns the server's DNS host name. In a future release, this will be changed to return a node ID that is unique within the management domain to which the server belongs.

The setting reflects the string value of the configuration property obe.node.

Returns:
The server's node ID, defaulting to the primary DNS host name.
See Also:
NODE_PROP

getScriptType

public static java.lang.String getScriptType()
Returns the default script type to use if one is not specified in XPDL.

The setting reflects the boolean value of the configuration property obe.script.

Returns:
Script type, defaulting to "text/x-xpath".
See Also:
SCRIPT_PROP

isVerbose

public static boolean isVerbose()
Returns whether debug output should be verbose.

The setting reflects the boolean value of the configuration property obe.debug.verbose.

Returns:
true if verbose debugging is enabled, defaulting to false.
See Also:
VERBOSE_PROP

reuseWorkItems

public static boolean reuseWorkItems()
Returns whether work items should be re-used.

The setting reflects the boolean value of the configuration property obe.reuse.workitems.

Returns:
true if work item re-use is enabled.
See Also:
REUSE_WORKITEMS_PROP

useEventAPI

public static boolean useEventAPI()
Returns whether to inject application events via the local client API. The engine creates an application event listener, with which it subscribes for workflow-relevant application events. Injecting application events via the API allows them to be handled in a transactional context under an authenticated identity if the ApplicationEventBroker implementation does not provide these characteristics.

The setting reflects the boolean value of the configuration property obe.events.use.api.

Returns:
true if events are to be injected via the API, false for direct injection into the workflow engine.
See Also:
USE_EVENT_API_PROP

useInitServlet

public static boolean useInitServlet()
Returns whether to defer initialization to the J2EEInitServlet.

Returns:
true to defer initialization, false to initialize immediately.
See Also:
USE_INIT_SERVLET_PROP

isAuditNonTransactional

public static boolean isAuditNonTransactional()
Returns whether auditing should be performed non-transactionally. If auditing is transactional, audit entries are enlisted in the transaction and will be lost in the event of a rollback. Otherwise, audit entries will be always logged regardless of the outcome of the transaction to which they relate.

N.B. Non-transactional auditing is very much more expensive than transactional auditing, and should only be used if absolutely necessary. In addition, interpreting the audit log is less straightforward, because the transactional context must be taken into account to determine whether an audit entry relates to a committed change or one which was rolled back. At the time of writing, non-transactional auditing support is incomplete, in that the transaction ID is not currently included in the logged information.

The setting reflects the value of the configuration property obe.audit.nontransactional:

TypeDefaultPurpose
booleanfalse The property name that specifies whether to log audit entries non-transactionally.

Returns:
true for non-transactional auditing.
See Also:
AUDIT_NON_TXN_PROP

getAsyncThreadpoolSize

public static int getAsyncThreadpoolSize()
Returns the size of the thread pool used to service asynchronous execution requests.

The setting reflects the value of the configuration property obe.async.threadpool.size.

Returns:
Async thread pool size, defaulting to 20.
See Also:
ASYNC_THREADPOOL_SIZE_PROP

getDirectoryPollInterval

public static int getDirectoryPollInterval()
Returns the polling interval for the ${obe.config.dir}/processes and ${obe.config.dir}/events directories. Only used by the BasicProcessRepository and BasicApplicationEventBroker.

The setting reflects the value of the configuration property obe.directory.poll.interval.

Returns:
Polling interval in milliseconds, defaulting to 5000 (5 seconds).
See Also:
DIRECTORY_POLL_INTERVAL_PROP

getMaximumTemporalEventTardiness

public static int getMaximumTemporalEventTardiness()
Returns the maximum acceptable delay for processing a non-recoverable temporal event. Non-recoverable temporal events older than this are discarded unprocessed.

The setting reflects the value of the configuration property obe.events.max.tardiness.

Returns:
Maximum temporal event processing delay, defaulting to 30000 (5 minutes).
See Also:
EVENT_MAX_TARDINESS_PROP

supportsKeyBasedEventSubscriptions

public static boolean supportsKeyBasedEventSubscriptions()
Returns whether the event manager should accept key-based event subscriptions.

The setting reflects the value of the configuration property obe.events.key.based.subscriptions.

Returns:
true to accept key-based subscriptions, false to reject, defaulting to true.
See Also:
EVENT_KEY_BASED_SUBSCRIPTIONS_PROP

getMailSession

public static javax.mail.Session getMailSession()
                                         throws OBEException
Returns the default mail session.

Returns:
Mail session.
Throws:
OBEException


SourceForge.net Logo OBE-1.0 Copyright (c) 2002-2006 Adrian Price. All Rights Reserved.