electric.server.jms
Class JMS

java.lang.Object
  extended byelectric.server.jms.JMS
All Implemented Interfaces:
IEXMLLoggingConstants, IGLUELoggingConstants, IJMSConstants, ILoggingConstants

public final class JMS
extends java.lang.Object
implements IJMSConstants, IGLUELoggingConstants

JMS declares static methods that allow you to specify the paths on which GLUE should accept inbound JMS messages. If a JMS server is not already running on a specified context path, it is started automatically.

Author:
webMethods

Field Summary
 
Fields inherited from interface electric.server.jms.IJMSConstants
DEFAULT_CONNECTION_FACTORY, DEFAULT_QUEUE, GLUE_OPTIMIZATIONS, JMS_QUEUE, JMS_QUEUE_CONNECTION_FACTORY, JMS_RESPONSE_QUEUE, JMS_REUSE_QUEUE_CONNECTIONS, JNDI_PROPERTIES, RELATED_MESSAGE, ROOT, SERVICE_URN, TOTAL_MESSAGE_PARTS, WSDL_NOT_FOUND, WSDL_REQUEST
 
Fields inherited from interface electric.glue.IGLUELoggingConstants
CLUSTER_DEBUG_EVENT, CLUSTER_EVENT, CONSOLE_DEBUG_EVENT, DEPLOY_EVENT, DETECTORS_EVENT, HTTP_EVENT, JMS_EVENT, REBINDING_EVENT, SECURITY_DEBUG_EVENT, SECURITY_DETAIL_EVENT, SERVLET_EVENT, SOAP_EVENT
 
Fields inherited from interface electric.xml.IEXMLLoggingConstants
MAPPING_EVENT, SCHEMA_EVENT
 
Fields inherited from interface electric.util.log.ILoggingConstants
CLASSLOADER_EVENT, COMMAND_EVENT, COMMENT_EVENT, CONFIG_EVENT, DEBUG_EVENT, ELECTRIC_LOGGING_PROPERTY, ERROR_EVENT, EXCEPTION_EVENT, FILE_EVENT, LICENSE_EVENT, RESOURCES_EVENT, SECURITY_EVENT, SHUTDOWN_EVENT, SOURCE_EVENT, SQL_EVENT, STARTUP_EVENT, WARNING_EVENT
 
Constructor Summary
JMS()
           
 
Method Summary
static javax.jms.QueueSession createQSession(javax.jms.QueueConnection qConn)
           
static javax.jms.QueueReceiver createReceiver(javax.jms.QueueSession qSession, javax.jms.Queue queue)
           
static javax.jms.QueueReceiver createReceiver(javax.jms.QueueSession qSession, javax.jms.Queue queue, java.lang.String selector)
           
static javax.jms.QueueRequestor createRequestor(javax.jms.QueueSession qSession, javax.jms.Queue queue)
           
static javax.jms.QueueSender createSender(javax.jms.QueueSession qSession, javax.jms.Queue queue)
           
static void disable()
           
static void enable()
           
static java.lang.String[] findAdminObjects(java.lang.String requestQueueName, java.lang.String queueConnFactName, java.lang.String servicePath)
           
static IJMSAdapter getAdapter()
          Returns currently registered instance of IJMSAdapter.
static java.lang.String getDefaultAdapter()
          Get default adapter class name
static javax.jms.QueueConnection getQConnection(javax.jms.QueueConnectionFactory qConnFactory, boolean cacheCnx)
           
static void initialize()
           
static boolean isEnabled()
           
static void registerAdapter(java.lang.String jmsAdapterClassName)
          Registers an instance of IJMSAdapter.
static void setDefaultAdapter(java.lang.String defaultAdapter)
          Set the new default adapter class name.
static void shutdown()
          Shuts down all open JMS facilities including QueueRequestors, MessageConsumers MessageProducers, QueueSessions, QueueConnections.
static JMSContext startup(java.lang.String application)
          Start JMS subsystem with the specified application name.
static JMSContext startup(java.lang.String application, Context context)
          Start JMS subsystem with the specified application name.
static JMSContext startup(java.lang.String application, java.lang.String path)
          Start JMS subsystem with the specified application name.
static JMSContext startup(java.lang.String application, java.lang.String path, Context context)
          Start JMS subsystem with the specified application name and map it onto the directory identified by the path parameter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMS

public JMS()
Method Detail

initialize

public static void initialize()

enable

public static void enable()

isEnabled

public static boolean isEnabled()

disable

public static void disable()

startup

public static JMSContext startup(java.lang.String application)
                          throws javax.jms.JMSException,
                                 javax.naming.NamingException,
                                 java.net.MalformedURLException
Start JMS subsystem with the specified application name. The started service is mapped onto the root directory, hence any web service published in GLUE gets JMS binding and can process invocations received over JMS queue.

Parameters:
application - specifies the name of the application space. The application name must be in the following format jms://
Throws:
javax.jms.JMSException
javax.naming.NamingException
java.net.MalformedURLException

startup

public static JMSContext startup(java.lang.String application,
                                 Context context)
                          throws javax.jms.JMSException,
                                 javax.naming.NamingException,
                                 java.net.MalformedURLException
Start JMS subsystem with the specified application name. The context object may contain additional settings to override the defaults.

Parameters:
application - specifies the name of the application space. The application name must be in the following format jms://
context - provides additional properties overriding the default settings such as queue name, queue connection factory name, jndi properties, etc.
Throws:
javax.jms.JMSException
javax.naming.NamingException
java.net.MalformedURLException

startup

public static JMSContext startup(java.lang.String application,
                                 java.lang.String path)
                          throws javax.jms.JMSException,
                                 javax.naming.NamingException,
                                 java.net.MalformedURLException
Start JMS subsystem with the specified application name. The started service is mapped onto the directory identified by the path parameter. any web service published in the tree of the path directory in GLUE gets JMS binding and can process invocations received over JMS queue.

Parameters:
application - specifies the name of the application space. The application name must be in the following format jms://
path - path of a glue directory this JMS service is mapped onto
Throws:
javax.jms.JMSException
javax.naming.NamingException
java.net.MalformedURLException

startup

public static JMSContext startup(java.lang.String application,
                                 java.lang.String path,
                                 Context context)
                          throws javax.jms.JMSException,
                                 javax.naming.NamingException,
                                 java.net.MalformedURLException
Start JMS subsystem with the specified application name and map it onto the directory identified by the path parameter. The context object may contain additional settings to override the defaults.

Parameters:
application - specifies the name of the application space. The application name must be in the following format jms://
path - path of a glue directory this JMS service is mapped onto
context - provides additional properties overriding the default settings such as queue name, queue connection factory name, jndi properties, etc.
Throws:
javax.jms.JMSException
javax.naming.NamingException
java.net.MalformedURLException

shutdown

public static void shutdown()
Shuts down all open JMS facilities including QueueRequestors, MessageConsumers MessageProducers, QueueSessions, QueueConnections. This method should be called right before an application that uses GLUE/JMS exits.


registerAdapter

public static void registerAdapter(java.lang.String jmsAdapterClassName)
Registers an instance of IJMSAdapter. The supplied instance will be used to create the default queue/topic and their connection factories. A request to create the default administered objects will be issued upon server start up, when the following conditions are met: If GLUE server is started with jars from multiple JMS providers, it will use the environment for the first registered IJMSAdapter. For example, suppose GLUE has both SwiftMQ and J2EE JMS jar files in the classpath, and both are registered with GLUE via the registerAdmin method. When GLUE's JMS service is started without uder-defined administered objects, GLUE will pick the one that was first to register via registerAdmin.

Parameters:
jmsAdapterClassName -

getAdapter

public static IJMSAdapter getAdapter()
Returns currently registered instance of IJMSAdapter.


setDefaultAdapter

public static void setDefaultAdapter(java.lang.String defaultAdapter)
Set the new default adapter class name.

Parameters:
defaultAdapter - the name of the class serving as the default JMS adapter

getDefaultAdapter

public static java.lang.String getDefaultAdapter()
Get default adapter class name


getQConnection

public static javax.jms.QueueConnection getQConnection(javax.jms.QueueConnectionFactory qConnFactory,
                                                       boolean cacheCnx)
                                                throws javax.jms.JMSException
Parameters:
qConnFactory -
cacheCnx -
Throws:
javax.jms.JMSException

createQSession

public static javax.jms.QueueSession createQSession(javax.jms.QueueConnection qConn)
                                             throws javax.jms.JMSException
Parameters:
qConn -
Throws:
javax.jms.JMSException

createReceiver

public static javax.jms.QueueReceiver createReceiver(javax.jms.QueueSession qSession,
                                                     javax.jms.Queue queue)
                                              throws javax.jms.JMSException
Parameters:
qSession -
queue -
Throws:
javax.jms.JMSException

createReceiver

public static javax.jms.QueueReceiver createReceiver(javax.jms.QueueSession qSession,
                                                     javax.jms.Queue queue,
                                                     java.lang.String selector)
                                              throws javax.jms.JMSException
Parameters:
qSession -
queue -
selector -
Throws:
javax.jms.JMSException

createSender

public static javax.jms.QueueSender createSender(javax.jms.QueueSession qSession,
                                                 javax.jms.Queue queue)
                                          throws javax.jms.JMSException
Parameters:
qSession -
queue -
Throws:
javax.jms.JMSException

createRequestor

public static javax.jms.QueueRequestor createRequestor(javax.jms.QueueSession qSession,
                                                       javax.jms.Queue queue)
                                                throws javax.jms.JMSException
Parameters:
qSession -
queue -
Throws:
javax.jms.JMSException

findAdminObjects

public static java.lang.String[] findAdminObjects(java.lang.String requestQueueName,
                                                  java.lang.String queueConnFactName,
                                                  java.lang.String servicePath)
                                           throws java.io.IOException
Parameters:
requestQueueName -
queueConnFactName -
servicePath -
Throws:
java.io.IOException


copyright© 2001-2004 by webMethods All Rights Reserved.