Novell exteNd Messaging Platform 5.2

com.sssw.jms.api
Class JMQMessageService

java.lang.Object
  extended bycom.sssw.jms.api.JMQMessageService

public abstract class JMQMessageService
extends Object

A class for creating an in-process Java Message Service. This class also defines a set of properties, which must be set in order to run the JMS server.


Field Summary
static String MSGSVC_CLUSTER_IDENTIFICATION
          Indication of whether to use IP addresses or host names to identify cluster members.
static String MSGSVC_CLUSTER_MEMBERS
          A comma separated list of cluster member URL's.
static String MSGSVC_CLUSTER_TOPICS
          A comma separated list of topics to forward messages for.
static String MSGSVC_CONFIG_FILE
          This property indicates a file name of an XML file with JMS server configuration.
static String MSGSVC_DEBUG
          A boolean property that detemines whether or not the JMS server will run in debug mode.
static String MSGSVC_ENABLE_NAMING
          Boolean property to disable the JMS server from exposing a name service.
static String MSGSVC_ENABLE_SECURITY
          Boolean property to enable security in the JMS server.
static String MSGSVC_ENABLE_SSL
          Boolean property to enable the JMS server to support SSL.
static String MSGSVC_ERROR_QUEUE
          The queue for error messages.
static String MSGSVC_JDBC_DRIVER
          The class name of the JDBC Driver.
static String MSGSVC_JDBC_MAXMSGSIZE
          The maximum message size.
static String MSGSVC_JDBC_MAXPOOLSIZE
          The maximum connection pool size for the database.
static String MSGSVC_JDBC_MINPOOLSIZE
          The minimum connection pool size for the database.
static String MSGSVC_JDBC_PASSWORD
          The password for the database user.
static String MSGSVC_JDBC_URL
          The database URL to use for the JMS tables.
static String MSGSVC_JDBC_USER
          The database username to use to access the JMS tables.
static String MSGSVC_LOGDIR
          The directory where the JMS error logs are kept.
static String MSGSVC_MEMORY
          The maximum memory size used for messages in the JMS server.
static String MSGSVC_NAME
          The unique name of the message service.
static String MSGSVC_PORT
          The IIOP port on which the message service starts up.
static String MSGSVC_PROPFILE
          Messaging service properties filename.
static String MSGSVC_QUEUE_FACTORY
          A comma separated list of queue connection factories.
static String MSGSVC_QUEUE_XA_FACTORY
          A comma separated list of XA queue connection factories.
static String MSGSVC_ROUTER_TARGETS
          A comma separated list of router URL's.
static String MSGSVC_ROUTER_TOPICS
          A comma separated list of topics to route messages for.
static String MSGSVC_SECURITY_AUTHORIZATION
          The fully classified name of the access control list class.
static String MSGSVC_SECURITY_MANAGER
          The fully classified name of the principal manager class.
static String MSGSVC_SECURITY_REALM
          The fully classified name of the authentication class.
static String MSGSVC_SSL_CERTIFICATE
          Directory with the JMS server's SSL information.
static String MSGSVC_SSL_CIPHER_SUITES
          A list of cipher suites supported.
static String MSGSVC_SSL_CLIENT_CERTIFICATE
          Boolean property to decide whether an SSL enabled JMS server requires client applications to present it with a certificate.
static String MSGSVC_SSL_PASSWORD
          The password to decrypt the private key.
static String MSGSVC_STORE
          The name of the persistent store to use.
static String MSGSVC_STORE_DIR
          The root directory for a file based message store.
static String MSGSVC_STORE_SYNC
          A boolean property that detemines whether or not the JMS server will sync file descriptors when writing messages into the file store.
static String MSGSVC_THREADSMAX
          The maximum size of the thread pool.
static String MSGSVC_TOPIC_FACTORY
          A comma separated list of topic connection factories.
static String MSGSVC_TOPIC_XA_FACTORY
          A comma separated list of XA topic connection factories.
static String MSGSVC_VERBOSE
          A boolean property that detemines whether or not the JMS server will run in verbose mode.
 
Constructor Summary
JMQMessageService()
           
 
Method Summary
abstract  ORB getORB()
          Get the ORB used by this in-process JMS server.
static JMQMessageService init(ORB orb, Properties props)
          Create an in-process instance of the Java Messaging Service.
static JMQMessageService init(Properties props)
          Create an in-process instance of the Java Messaging Service.
abstract  void shutdown()
          Shutdown the in-process Java Message Service.
abstract  void start()
          Start the in-process Java Message Service.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MSGSVC_PROPFILE

public static final String MSGSVC_PROPFILE
Messaging service properties filename. When started without the -props flags, the jmqserv and dbinit programs will load a property file with this name.

See Also:
Constant Field Values

MSGSVC_NAME

public static final String MSGSVC_NAME
The unique name of the message service. If multiple message broker share a database, they must use different names to avoid data clashes. Each JMS instance will prefix all its database table names with this string.

See Also:
Constant Field Values

MSGSVC_ROUTER_TARGETS

public static final String MSGSVC_ROUTER_TARGETS
A comma separated list of router URL's. Example:
    godel:53506,escher:53506
 
All topic messages received on this broker will be forwarded to the specified router target brokers. All queue messages where the target queue is not on this broker will be forwarded, unless this broker is also clustered and one of the cluster members host the specifed queue.

Since:
jBroker MQ 2.1
See Also:
Constant Field Values

MSGSVC_ROUTER_TOPICS

public static final String MSGSVC_ROUTER_TOPICS
A comma separated list of topics to route messages for. If the list is empty, messages for all topics will be forwarded. Example:
    topic0,topic1
 

Since:
jBroker MQ 2.1
See Also:
Constant Field Values

MSGSVC_ERROR_QUEUE

public static final String MSGSVC_ERROR_QUEUE
The queue for error messages. If a message broker receives a routed message designed for a queue which is not bound to this broker, and this broker has no other routing destinations or cluster memebers to forward the message to, said message will be stored in this error queue. If no error queue is specified, the message will be silently discarded. If the queue which is named by this property doesn't exist it will be created automatically.

Since:
jBroker MQ 2.1
See Also:
Constant Field Values

MSGSVC_CLUSTER_MEMBERS

public static final String MSGSVC_CLUSTER_MEMBERS
A comma separated list of cluster member URL's. Example:
    godel:53506,escher:53506
 

Since:
jBroker MQ 2.0
See Also:
Constant Field Values

MSGSVC_CLUSTER_IDENTIFICATION

public static final String MSGSVC_CLUSTER_IDENTIFICATION
Indication of whether to use IP addresses or host names to identify cluster members. The value of this property must correspond to how cluster members are identified in the MSGSVC_CLUSTER_MEMBERS property. Administraters must ensure that either IP addresses or host names are used consistently throughout the cluster. Possible values for this property are IP and hostname (both case insensitive) with IP being the default value.

Since:
jBroker MQ 2.1
See Also:
Constant Field Values

MSGSVC_CLUSTER_TOPICS

public static final String MSGSVC_CLUSTER_TOPICS
A comma separated list of topics to forward messages for. If the list is empty, messages for all topics will be forwarded. Example:
    topic0,topic1
 

Since:
jBroker MQ 2.0
See Also:
Constant Field Values

MSGSVC_TOPIC_FACTORY

public static final String MSGSVC_TOPIC_FACTORY
A comma separated list of topic connection factories. The general format is:
    name:clientID:username:password
 
Only the name is mandatory. Example:
    MyTopicFactory:client0:john:secret,OtherTopicFactory
 

Since:
jBroker MQ 2.0
See Also:
Constant Field Values

MSGSVC_TOPIC_XA_FACTORY

public static final String MSGSVC_TOPIC_XA_FACTORY
A comma separated list of XA topic connection factories. The general format is:
    name:clientID:username:password
 
Only the name is mandatory.

Since:
jBroker MQ 2.0
See Also:
Constant Field Values

MSGSVC_QUEUE_FACTORY

public static final String MSGSVC_QUEUE_FACTORY
A comma separated list of queue connection factories. The general format is:
    name:clientID:username:password
 
Only the name is mandatory.

Since:
jBroker MQ 2.0
See Also:
Constant Field Values

MSGSVC_QUEUE_XA_FACTORY

public static final String MSGSVC_QUEUE_XA_FACTORY
A comma separated list of XA queue connection factories. The general format is:
    name:clientID:username:password
 
Only the name is mandatory.

Since:
jBroker MQ 2.0
See Also:
Constant Field Values

MSGSVC_PORT

public static final String MSGSVC_PORT
The IIOP port on which the message service starts up.

See Also:
Constant Field Values

MSGSVC_LOGDIR

public static final String MSGSVC_LOGDIR
The directory where the JMS error logs are kept. The JMS server will keep one file for stdout and another for stderr.

See Also:
Constant Field Values

MSGSVC_THREADSMAX

public static final String MSGSVC_THREADSMAX
The maximum size of the thread pool. If this property is not specified, the JMS server will not enforce a maximum number of threads in the server.

Since:
jBroker MQ 1.3
See Also:
Constant Field Values

MSGSVC_MEMORY

public static final String MSGSVC_MEMORY
The maximum memory size used for messages in the JMS server. The value specified is specified as bytes. Alternatively, mega bytes can be specified, e.g. "10m". When this property is not specified, the server will not restrict its use of memory.

Since:
jBroker MQ 2.0
See Also:
Constant Field Values

MSGSVC_STORE

public static final String MSGSVC_STORE
The name of the persistent store to use. The JMS server currently supports the following stores (names are not case sensitive):

Since:
jBroker MQ 1.3
See Also:
Constant Field Values

MSGSVC_JDBC_DRIVER

public static final String MSGSVC_JDBC_DRIVER
The class name of the JDBC Driver.

See Also:
Constant Field Values

MSGSVC_JDBC_URL

public static final String MSGSVC_JDBC_URL
The database URL to use for the JMS tables.

See Also:
Constant Field Values

MSGSVC_JDBC_USER

public static final String MSGSVC_JDBC_USER
The database username to use to access the JMS tables. This username will also be created as a JMS administrator group.

See Also:
Constant Field Values

MSGSVC_JDBC_PASSWORD

public static final String MSGSVC_JDBC_PASSWORD
The password for the database user. This will also be the password for the JMS server's administrator group. Note that this property is not available when invoking the

See Also:
Constant Field Values

MSGSVC_JDBC_MINPOOLSIZE

public static final String MSGSVC_JDBC_MINPOOLSIZE
The minimum connection pool size for the database.

See Also:
Constant Field Values

MSGSVC_JDBC_MAXPOOLSIZE

public static final String MSGSVC_JDBC_MAXPOOLSIZE
The maximum connection pool size for the database.

See Also:
Constant Field Values

MSGSVC_JDBC_MAXMSGSIZE

public static final String MSGSVC_JDBC_MAXMSGSIZE
The maximum message size. This value is only used with Sybase. The default value is 32k; if larger messages must be stored, this value must be set accordingly.

See Also:
Constant Field Values

MSGSVC_ENABLE_SECURITY

public static final String MSGSVC_ENABLE_SECURITY
Boolean property to enable security in the JMS server.

The default value for this property is false. If this property is set to true, then the JMS server makes sure that ACL checking is done and that the server can be administered only by an Administrator.

See Also:
Constant Field Values

MSGSVC_SECURITY_REALM

public static final String MSGSVC_SECURITY_REALM
The fully classified name of the authentication class. This class must implement the Realm interface.

Since:
jBroker MQ 2.1
See Also:
Realm, Constant Field Values

MSGSVC_SECURITY_MANAGER

public static final String MSGSVC_SECURITY_MANAGER
The fully classified name of the principal manager class. This class must implement the PrincipalManager interface. Note that if you specify a custom principal manager you must also specify a custom realm.

Since:
jBroker MQ 2.1
See Also:
MSGSVC_SECURITY_REALM, JMQPrincipalManager, Constant Field Values

MSGSVC_SECURITY_AUTHORIZATION

public static final String MSGSVC_SECURITY_AUTHORIZATION
The fully classified name of the access control list class. This class must implement the AclManager interface.

Since:
jBroker MQ 2.1
See Also:
JMQAclManager, Constant Field Values

MSGSVC_ENABLE_SSL

public static final String MSGSVC_ENABLE_SSL
Boolean property to enable the JMS server to support SSL.

The default value for this property is false. If this property is set to true, then the JMS server exposes a secure connection factory object, which clients can use to create confidential connections. Note that the client connection factory must be configured with the desired quality of protection as well as a set of trusted certificates and certificate authorities.

Since:
jBroker MQ 2.1
See Also:
JMQConnectionFactory.setCertificateChain(byte[][], byte[]), JMQConnectionFactory.addCACertificate(byte[][]), JMQConnectionFactory.IIOP_SSL_PROTOCOL, Constant Field Values

MSGSVC_SSL_CERTIFICATE

public static final String MSGSVC_SSL_CERTIFICATE
Directory with the JMS server's SSL information. This property will be consulted when the MSGSVC_ENABLE_SSL property is set to TRUE. The JMS server will look for the following files in this directory:

Since:
jBroker MQ 2.1
See Also:
MSGSVC_ENABLE_SSL, Constant Field Values

MSGSVC_SSL_CLIENT_CERTIFICATE

public static final String MSGSVC_SSL_CLIENT_CERTIFICATE
Boolean property to decide whether an SSL enabled JMS server requires client applications to present it with a certificate.

This property will be consulted when the MSGSVC_ENABLE_SSL property is set to TRUE.

Since:
jBroker MQ 2.1
See Also:
MSGSVC_ENABLE_SSL, Constant Field Values

MSGSVC_SSL_PASSWORD

public static final String MSGSVC_SSL_PASSWORD
The password to decrypt the private key. This property should only be specified if the private key is encrypted. This property will be consulted when the MSGSVC_ENABLE_SSL property is set to TRUE. It will be used to decrypt the private key loaded from the privateKey.pkcs8 file.

Since:
jBroker MQ 2.1
See Also:
MSGSVC_SSL_CERTIFICATE, Constant Field Values

MSGSVC_SSL_CIPHER_SUITES

public static final String MSGSVC_SSL_CIPHER_SUITES
A list of cipher suites supported. Each name in this list must correspond to a string constant defined in the CipherSuite interface.

Since:
jBroker MQ 2.1
See Also:
CipherSuite, Constant Field Values

MSGSVC_ENABLE_NAMING

public static final String MSGSVC_ENABLE_NAMING
Boolean property to disable the JMS server from exposing a name service.

The default value for this property is true. If this property is set to false, then the JMS server will not expose a COS name server with administered objects and destinations. Since the JMS server's name space is accessed using the JNDI/CosNaming driver it will not be protected. When running the JMS server in SSL mode, the name space can be disabled to prevent clients from getting clear text access to the name space.

When the name service is disabled, administered objects and destinations (queues and topics) are not accessible via JNDI. Instead, client applications must use the JMQConnectionFactory objects to bootstrap connection factories and the JMQQueue and JMQTopic objects for bootstrapping destination objects. Note that the name space should only be disabled if clean text access compromises the security of an application.

Since:
jBroker MQ 2.1
See Also:
JMQTopic, JMQQueue, JMQConnectionFactory, Constant Field Values

MSGSVC_STORE_DIR

public static final String MSGSVC_STORE_DIR
The root directory for a file based message store. If this directory does not exist when running dbinit -create it will be created. Note that running dbinit -destroy will remove this directory will all its content.

Since:
jBroker MQ 2.1
See Also:
Constant Field Values

MSGSVC_STORE_SYNC

public static final String MSGSVC_STORE_SYNC
A boolean property that detemines whether or not the JMS server will sync file descriptors when writing messages into the file store. If sync is set to false, the performance will be better - but since data may not be fully committed to the disk, messages and acknowledgements could be lost in case of a crash. If not specified, the default value of this property is true.

Since:
jBroker MQ 2.1
See Also:
FileDescriptor.sync(), Constant Field Values

MSGSVC_DEBUG

public static final String MSGSVC_DEBUG
A boolean property that detemines whether or not the JMS server will run in debug mode. Debug mode will output additional information when an unexpected error condition occurs. If not specified, the default value of this property is false.

Since:
jBroker MQ 2.1
See Also:
Constant Field Values

MSGSVC_VERBOSE

public static final String MSGSVC_VERBOSE
A boolean property that detemines whether or not the JMS server will run in verbose mode. Verbose mode will output additional information about the runtime behavior of the JMS server, including: If not specified, the default value of this property is false.

Since:
jBroker MQ 2.1
See Also:
Constant Field Values

MSGSVC_CONFIG_FILE

public static final String MSGSVC_CONFIG_FILE
This property indicates a file name of an XML file with JMS server configuration. The format of this configuration file is the same as the format used by the jmqconfig program.

Since:
jBroker MQ 2.1
See Also:
Constant Field Values
Constructor Detail

JMQMessageService

public JMQMessageService()
Method Detail

init

public static JMQMessageService init(Properties props)
                              throws JMSException
Create an in-process instance of the Java Messaging Service.

Parameters:
props - message service properties
Returns:
a newly created instance
Throws:
JMSException - if a JMS server could not be instantiated. Use the JMSException's getLinkedException method to get the root cause of the exception.

init

public static JMQMessageService init(ORB orb,
                                     Properties props)
                              throws JMSException
Create an in-process instance of the Java Messaging Service.

Parameters:
orb - an ORB instance
props - message Service properties
Returns:
an instance of the Message Service
Throws:
JMSException - if a JMS server could not be instantiated. Use the JMSException's getLinkedException method to get the root cause of the exception.

getORB

public abstract ORB getORB()
                    throws JMSException
Get the ORB used by this in-process JMS server.

Returns:
the ORB singleton use by the JMS server
Throws:
JMSException - if the message service has not been started

start

public abstract void start()
                    throws JMSException
Start the in-process Java Message Service.

Throws:
JMSException - if the message service could not be started. Possible causes include:
  • invalid or incomplete properties were specified
  • an ORB could not be instantiated
  • the JMS database was not created
  • the database could not be accessed
  • the port is already in use
Consult the JMSException's getLinkedException method for details about the cause of the exception.

shutdown

public abstract void shutdown()
                       throws JMSException
Shutdown the in-process Java Message Service.

Throws:
JMSException - if shutdown unexpectedly failed. Consult the JMSException's getLinkedException method for details about the cause of the exception.

Novell exteNd Messaging Platform 5.2

exteNd is a registered trademark of Novell, Inc.
Copyright 1998-2004 Novell, Inc. All Rights Reserved.