private String topicPrefix = "topic.";
public Context getInitialContext(Hashtable environment) throws NamingException {
// lets create a factory
Map data = new ConcurrentHashMap();
ActiveMQConnectionFactory factory = createConnectionFactory(environment);
String[] names = getConnectionFactoryNames(environment);
for (int i = 0; i < names.length; i++) {
String name = names[i];
data.put(name, factory);
}
// Bind jms/DURABLE_SUB_CONNECTION_FACTORY to be a ConnectionFactory that can be used for durable subscriptions.
ActiveMQConnectionFactory durableFactory = createDurableConnectionFactory(environment);
Map jmsContext = new ConcurrentHashMap();
jmsContext.put("DURABLE_SUB_CONNECTION_FACTORY", durableFactory);
data.put("jms", new ReadOnlyContext(environment, jmsContext));
createQueues(data, environment);