I'm working with Camel, Spring, and Flex - using BlazeDS to interface
with my flex clients. The server is running on tomcat.
BlazeDS has support out of the box for adapting a JMS channel to a
flex client and handling messages passed back and forth to the flex
client. The default way to use the BlazeDS JMS adapter invovles
retrieving the endpoints from JNDI.
What's the best way to get Camel to register activemq jms endpoints in
JNDI?
Here's a snippet of what the JMS configuration looks like in the XML
file that configures the BlazeDS server:
----
<destination id="some-jms-destination">
<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/jms/SomeJMSEndpoint</
destination-jndi-name>
<delivery-mode>NON_PERSISTENT</delivery-mode>
<message-priority>DEFAULT_PRIORITY</message-priority>
<acknowledge-mode>AUTO_ACKNOWLEDGE</acknowledge-mode>
<initial-context-environment>
<property>
<name>Context.INITIAL_CONTEXT_FACTORY</name>
<value>org.apache.activemq.jndi.ActiveMQInitialContextFactory</value>
</property>
<property>
<name>Context.PROVIDER_URL</name>
<value>tcp://localhost:61616</value>
</property>
</initial-context-environment>
</jms>
</properties>
<adapter ref="jms"/>
</destination>
-----
So the easiest thing would be if I could get my endpoints to be
registered in JNDI so that the line:
<destination-jndi-name>java:comp/env/jms/SomeJMSEndpoint</
destination-jndi-name>
would just find the JMS queue and I'd be good to go.
Any tips from those more familiar with JMS than I am? (which is most
anyone on this list, I'm sure)
Ryan