Package org.apache.activemq.jndi
Class ActiveMQWASInitialContextFactory
java.lang.Object
org.apache.activemq.jndi.ActiveMQInitialContextFactory
org.apache.activemq.jndi.ActiveMQWASInitialContextFactory
- All Implemented Interfaces:
InitialContextFactory
A InitialContextFactory for WebSphere Generic JMS Provider.
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
.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetInitialContext
(Hashtable environment) protected Hashtable
transformEnvironment
(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.connectionxxx=value) -> (connectionxxx=value) (java.naming.provider.url=url1;url2) -> (java.naming.provider.url=url1,url2)Methods inherited from class org.apache.activemq.jndi.ActiveMQInitialContextFactory
createConnectionFactory, createConnectionFactory, createContext, createQueue, createQueues, createTopic, createTopics, getConnectionFactoryNames, getConnectionPrefix, getQueuePrefix, getTopicPrefix, needsXA, setConnectionPrefix, setQueuePrefix, setTopicPrefix
-
Constructor Details
-
ActiveMQWASInitialContextFactory
public ActiveMQWASInitialContextFactory()
-
-
Method Details
-
getInitialContext
- Specified by:
getInitialContext
in interfaceInitialContextFactory
- Overrides:
getInitialContext
in classActiveMQInitialContextFactory
- Throws:
NamingException
- See Also:
-
transformEnvironment
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.connectionxxx=value) -> (connectionxxx=value)
- (java.naming.provider.url=url1;url2) -> (java.naming.provider.url=url1,url2)
- Parameters:
environment
- properties for transformation- Returns:
- environment after transformation
-