org.ow2.jotm.jms
Class JmsManagerImpl

java.lang.Object
  extended by org.ow2.jotm.jms.JmsManagerImpl
All Implemented Interfaces:
JmsManager

public class JmsManagerImpl
extends Object
implements JmsManager

JmsManager implementation This singleton class must exist in each jvm that want to use JMS. It relies on another class that implements JmsAdministration for example: JmsAdminForJoram.


Method Summary
 Queue createQueue(String name)
          Creation of an administered Object Queue and bind it in the registry
 Topic createTopic(String name)
          Creation of an administered Object Topic and bind it in the registry
 ConnectionFactory getConnectionFactory()
          Get the unique ConnectionFactory
static JmsManager getInstance()
          Get the JmsManager.
 QueueConnectionFactory getQueueConnectionFactory()
           
 TopicConnectionFactory getTopicConnectionFactory()
          Get the unique TopicConnectionFactory
static TransactionManager getTransactionManager()
           
 void init(Class cl, boolean collocated, String url, TransactionManager trm)
          Initialization of the JmsManager
 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

getInstance

public static JmsManager getInstance()
Get the JmsManager.

Returns:
the unique instance of the JmsManager

getTransactionManager

public static TransactionManager getTransactionManager()

init

public void init(Class cl,
                 boolean collocated,
                 String url,
                 TransactionManager trm)
          throws Exception
Initialization of the JmsManager

Specified by:
init in interface JmsManager
Parameters:
cl - JmsAdministration class
collocated - true if collocated, false if remote.
url - In case of remote: the URL.
trm - TransactionManager
Throws:
Exception - could not init the JmsManager

createQueue

public Queue createQueue(String name)
                  throws Exception
Creation of an administered Object Queue and bind it in the registry

Specified by:
createQueue in interface JmsManager
Parameters:
name - JNDI name.
Returns:
the created Queue
Throws:
Exception

createTopic

public Topic createTopic(String name)
                  throws Exception
Creation of an administered Object Topic and bind it in the registry

Specified by:
createTopic in interface JmsManager
Parameters:
name - JNDI name.
Returns:
the created Topic
Throws:
Exception

getConnectionFactory

public ConnectionFactory getConnectionFactory()
                                       throws Exception
Get the unique ConnectionFactory

Specified by:
getConnectionFactory in interface JmsManager
Throws:
Exception

getQueueConnectionFactory

public QueueConnectionFactory getQueueConnectionFactory()
                                                 throws Exception
Specified by:
getQueueConnectionFactory in interface JmsManager
Throws:
Exception

getTopicConnectionFactory

public TopicConnectionFactory getTopicConnectionFactory()
                                                 throws Exception
Get the unique TopicConnectionFactory

Specified by:
getTopicConnectionFactory in interface JmsManager
Returns:
the TopicConnectionFactory (TCF)
Throws:
Exception

stop

public void stop()
          throws Exception
Terminate the administering process

Specified by:
stop in interface JmsManager
Throws:
Exception


Copyright ? 2005-2010 OW2 Consortium. All Rights Reserved.