org.fusesource.stompjms.jndi
Class WasStompJmsInitialContextFactory

java.lang.Object
  extended by org.fusesource.stompjms.jndi.StompJmsInitialContextFactory
      extended by org.fusesource.stompjms.jndi.WasStompJmsInitialContextFactory
All Implemented Interfaces:
javax.naming.spi.InitialContextFactory

public class WasStompJmsInitialContextFactory
extends StompJmsInitialContextFactory

This implementation of InitialContextFactory should be used when StompJms is used as WebSphere Generic JMS Provider. It is proved that it works on WebSphere 5.1. The reason for using this class is that custom property defined for Generic JMS Provider are passed to InitialContextFactory only if it begins with java.naming or javax.naming prefix. Additionally provider url for the JMS provider can not contain ',' character that is necessary when the list of nodes is provided. So the role of this class is to transform properties before passing it to ActiveMQInitialContextFactory.

Author:
Pawel Tucholski

Constructor Summary
WasStompJmsInitialContextFactory()
           
 
Method Summary
 javax.naming.Context getInitialContext(java.util.Hashtable environment)
           
protected  java.util.Hashtable transformEnvironment(java.util.Hashtable environment)
          Performs following transformation of properties: (java.naming.queue.xxx.yyy,value)=>(queue.xxx/yyy,value) (java.naming.topic.xxx.yyy,value)=>(topic.xxx/yyy,value) (java.naming.connectionFactoryNames,value)=>(connectionFactoryNames,value) (java.naming.provider.url,url1;url2)=>java.naming.provider.url,url1,url1)
 
Methods inherited from class org.fusesource.stompjms.jndi.StompJmsInitialContextFactory
createConnectionFactory, createConnectionFactory, createContext, createQueue, createTopic, getConnectionFactoryNames, getConnectionPrefix, setConnectionPrefix
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WasStompJmsInitialContextFactory

public WasStompJmsInitialContextFactory()
Method Detail

getInitialContext

public javax.naming.Context getInitialContext(java.util.Hashtable environment)
                                       throws javax.naming.NamingException
Specified by:
getInitialContext in interface javax.naming.spi.InitialContextFactory
Overrides:
getInitialContext in class StompJmsInitialContextFactory
Throws:
javax.naming.NamingException
See Also:
InitialContextFactory.getInitialContext(java.util.Hashtable)

transformEnvironment

protected java.util.Hashtable transformEnvironment(java.util.Hashtable environment)
Performs following transformation of properties:


Copyright © 2010-2011 FuseSource, Corp.. All Rights Reserved.