org.objectweb.jonas_jms
Class JmsManagerImpl

java.lang.Object
  |
  +--org.objectweb.jonas_jms.JmsManagerImpl
All Implemented Interfaces:
JmsJmxManagement, JmsManager

public class JmsManagerImpl
extends java.lang.Object
implements JmsManager, JmsJmxManagement

JmsManager implementation This singleton class must exist in each JOnAS server that want to use JMS


Method Summary
 javax.jms.Queue createQueue(java.lang.String name)
          Creation of an administered Object Queue and bind it in the registry
 javax.jms.Topic createTopic(java.lang.String name)
          Creation of an administered Object Topic and bind it in the registry
 int getCurrentNumberOfJmsQueueConnectionFactory()
          Management method
 int getCurrentNumberOfJmsQueueDestination()
          Management method
 int getCurrentNumberOfJmsTopicConnectionFactory()
          Management method
 int getCurrentNumberOfJmsTopicDestination()
          Management method
 java.lang.String getDefaultQueueConnectionFactoryName()
          Management method
 java.lang.String getDefaultTopicConnectionFactoryName()
          Management method
static JmsJmxManagement getJmsJmxManagement()
          Get the JmsJmxManagement.
static JmsManager getJmsManager()
          Get the JmsManager.
 javax.jms.Queue getQueue(java.lang.String name)
          Get Queue (creates it if not exist)
 javax.jms.QueueConnectionFactory getQueueConnectionFactory()
          Get the unique QueueConnectionFactory
 java.util.Enumeration getQueuesNames()
          Get Queue Names
 javax.jms.Topic getTopic(java.lang.String name)
          Get Topic (creates it if not exist)
 javax.jms.TopicConnectionFactory getTopicConnectionFactory()
          Get the unique TopicConnectionFactory
 java.util.Enumeration getTopicsNames()
          Get Topic Names
static javax.transaction.TransactionManager getTransactionManager()
          return the Transaction Manager
 javax.jms.XAQueueConnectionFactory getXAQueueConnectionFactory()
          Get Default XAQueueConnectionFactory
 javax.jms.XATopicConnectionFactory getXATopicConnectionFactory()
          Get Default XATopicConnectionFactory
 void init(java.lang.Class cl, boolean collocated, java.lang.String url, javax.transaction.TransactionManager tm)
          Initialization of the JmsManager
 void removeJmsDestination(java.lang.String jndiName)
          Remove a Jms destination
 void stop()
          Terminate the administering process
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getJmsManager

public static JmsManager getJmsManager()
Get the JmsManager.

getJmsJmxManagement

public static JmsJmxManagement getJmsJmxManagement()
Get the JmsJmxManagement.

getTransactionManager

public static javax.transaction.TransactionManager getTransactionManager()
return the Transaction Manager

init

public void init(java.lang.Class cl,
                 boolean collocated,
                 java.lang.String url,
                 javax.transaction.TransactionManager tm)
          throws java.lang.Exception
Initialization of the JmsManager
Specified by:
init in interface JmsManager
Parameters:
class - JmsAdministration class .
boolean - true for launchin the MOM inside the JOnAS server.
String - url connexion that must be used as soon as we don't use the default value of a3server.xml

createQueue

public javax.jms.Queue createQueue(java.lang.String name)
                            throws java.lang.Exception
Creation of an administered Object Queue and bind it in the registry
Specified by:
createQueue in interface JmsManager

createTopic

public javax.jms.Topic createTopic(java.lang.String name)
                            throws java.lang.Exception
Creation of an administered Object Topic and bind it in the registry
Specified by:
createTopic in interface JmsManager

getTopicConnectionFactory

public javax.jms.TopicConnectionFactory getTopicConnectionFactory()
Get the unique TopicConnectionFactory
Specified by:
getTopicConnectionFactory in interface JmsManager

getQueueConnectionFactory

public javax.jms.QueueConnectionFactory getQueueConnectionFactory()
Description copied from interface: JmsManager
Get the unique QueueConnectionFactory
Specified by:
getQueueConnectionFactory in interface JmsManager

getXATopicConnectionFactory

public javax.jms.XATopicConnectionFactory getXATopicConnectionFactory()
Get Default XATopicConnectionFactory
Specified by:
getXATopicConnectionFactory in interface JmsManager

getXAQueueConnectionFactory

public javax.jms.XAQueueConnectionFactory getXAQueueConnectionFactory()
Get Default XAQueueConnectionFactory
Specified by:
getXAQueueConnectionFactory in interface JmsManager

getQueue

public javax.jms.Queue getQueue(java.lang.String name)
                         throws java.lang.Exception
Get Queue (creates it if not exist)
Specified by:
getQueue in interface JmsManager

getTopic

public javax.jms.Topic getTopic(java.lang.String name)
                         throws java.lang.Exception
Get Topic (creates it if not exist)
Specified by:
getTopic in interface JmsManager

getTopicsNames

public java.util.Enumeration getTopicsNames()
Get Topic Names
Specified by:
getTopicsNames in interface JmsManager

getQueuesNames

public java.util.Enumeration getQueuesNames()
Get Queue Names
Specified by:
getQueuesNames in interface JmsManager

stop

public void stop()
          throws java.lang.Exception
Terminate the administering process
Specified by:
stop in interface JmsManager

getCurrentNumberOfJmsTopicConnectionFactory

public int getCurrentNumberOfJmsTopicConnectionFactory()
Description copied from interface: JmsJmxManagement
Management method
Specified by:
getCurrentNumberOfJmsTopicConnectionFactory in interface JmsJmxManagement
Returns:
the current number of Topic Jms Connection Factory

getCurrentNumberOfJmsQueueConnectionFactory

public int getCurrentNumberOfJmsQueueConnectionFactory()
Description copied from interface: JmsJmxManagement
Management method
Specified by:
getCurrentNumberOfJmsQueueConnectionFactory in interface JmsJmxManagement
Returns:
the current number of Queue Jms Connection Factory

getCurrentNumberOfJmsTopicDestination

public int getCurrentNumberOfJmsTopicDestination()
Description copied from interface: JmsJmxManagement
Management method
Specified by:
getCurrentNumberOfJmsTopicDestination in interface JmsJmxManagement
Returns:
the current number of Topic Jms Destination

getCurrentNumberOfJmsQueueDestination

public int getCurrentNumberOfJmsQueueDestination()
Description copied from interface: JmsJmxManagement
Management method
Specified by:
getCurrentNumberOfJmsQueueDestination in interface JmsJmxManagement
Returns:
the current number of Queue Jms Destination

removeJmsDestination

public void removeJmsDestination(java.lang.String jndiName)
                          throws java.lang.Exception
Remove a Jms destination
Specified by:
removeJmsDestination in interface JmsJmxManagement
Parameters:
String - jndi name

getDefaultQueueConnectionFactoryName

public java.lang.String getDefaultQueueConnectionFactoryName()
Description copied from interface: JmsJmxManagement
Management method
Specified by:
getDefaultQueueConnectionFactoryName in interface JmsJmxManagement
Returns:
String name of default Queue Connection factory

getDefaultTopicConnectionFactoryName

public java.lang.String getDefaultTopicConnectionFactoryName()
Description copied from interface: JmsJmxManagement
Management method
Specified by:
getDefaultTopicConnectionFactoryName in interface JmsJmxManagement
Returns:
String name of default Topic Connection factory