Dear all,
I'm trying to send messages from and to a remote JMS (activemq) (it is on localhost now for testing purposes). However, I keep getting error messages no matter how I try. The message is:
INFO: [LCDS] [INFO] JMS consumer for JMS destination 'java:comp/env/jmz/topic/flex/simpletopic
' is being removed from the JMS adapter due to the following error: Name TopicConnectionFactory
is not bound in this Context
(more logging attached)
My tomcat/conf/server.xml looks as follows:
<Context>
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<Manager pathname=""/>
<Resource name="jms/flex/TopicConnectionFactory" auth="Container" type="org.apache.activemq.ActiveMQConnectionFactory" description="JMS Connection Factory"
factory="org.apache.activemq.jndi.JNDIReferenceFactory" brokerURL="tcp://localhost:61616" brokerName="LocalActiveMQBroker"/>
<Resource name="jmz/topic/flex/simpletopic" auth="Container" type="org.apache.activemq.command.ActiveMQTopic" description="my topic"
factory="org.apache.activemq.jndi.JNDIReferenceFactory" physicalName="APP.STOCK.MARKETDATA"/>
</Context>
My messaging config is:
<?xml version="1.0" encoding="UTF-8"?>
<service id="message-service"
class="flex.messaging.services.MessageService">
<adapters>
<adapter-definition id="actionscript" class="flex.messaging.services.messaging.adapters.ActionScriptAdapter" default="true"/>
<adapter-definition id="jms" class="flex.messaging.services.messaging.adapters.JMSAdapter"/>
</adapters>
<!-- .... another destination cut -->
<destination id="chat-topic-jms">
<properties>
<jms>
<destination-type>Topic</destination-type>
<message-type>javax.jms.TextMessage</message-type>
<connection-factory>java:comp/env/jms/flex/TopicConnectionFactory
</connection-factory>
<destination-jndi-name>java:comp/env/jmz/topic/flex/simpletopic
</destination-jndi-name>
<destination-name>APP.STOCK.MARKETDATA
</destination-name>
<delivery-mode>NON_PERSISTENT</delivery-mode>
<message-priority>DEFAULT_PRIORITY</message-priority>
<acknowledge-mode>AUTO_ACKNOWLEDGE</acknowledge-mode>
<transacted-sessions>false</transacted-sessions>
<initial-context-environment>
<property>
<name>Context.PROVIDER_URL</name>
<value>vm://localhost</value>
</property>
<property>
<name>Context.INITIAL_CONTEXT_FACTORY</name>
<!--<value>org.apache.activemq.jndi.ActiveMQInitialContextFactory</value> -->
<value>org.apache.naming.java.javaURLContextFactory</value>
</property>
<property>
<name>Context.URL_PKG_PREFIXES</name>
<value>java:org.apache.naming</value>
</property>
</initial-context-environment>
</jms>
</properties>
<channels>
<channel ref="my-rtmp"/>
</channels>
<adapter ref="jms"/>
</destination>
</service>
I have tried removing the part about the initial context factory and using the activemq initital context factory.Further I have tried changing Context.Provider_URL to localhost:61616 and the brokerURL to vm:localhost without results.
Anyone ideas?
Best regards
Bas