No, just call setMessageListener() on the consumer http://java.sun.com/j2ee/1.4/docs/api/javax/jms/MessageConsumer.html#setMessageListener(javax.jms.MessageListener)
On 10/31/06, jxie <[EMAIL PROTECTED]> wrote:
I can create a producer and consumer on a queue. But I want to use MessageListener as a consumer, I must have a way to register it so standalone activemq can invoke it. I think MessageListener is a J2EE container feature, may standalone activemq not support it? am I right? Thanks. James.Strachan wrote: > > Just use the default activemq.xml file to configure the stand alone > ActiveMQ broker - then that configuration can be reused to talk to > it. > > On 10/31/06, jxie <[EMAIL PROTECTED]> wrote: >> >> >> Before I used embedded ActiveMQ in Tomcat, now I want to seperate >> activeMQ >> from Tomcat. I want to run standalone ActiveMQ and I want to use a >> DataSource, How do I convert the following two configurations in Tomcat >> into >> ones in ActiveMQ. >> >> <Resource name="jdbc/OracleSamh" auth="Container" >> type="javax.sql.DataSource" >> >> factory="org.apache.commons.dbcp.BasicDataSourceFactory" >> maxActive="40" >> maxIdle="2" >> maxWait="10000" >> username="admin" >> password="99" >> driverClassName="oracle.jdbc.driver.OracleDriver" >> url="jdbc:oracle:thin:@localhost:1521:dev" >> removeAbandoned="true" >> removeAbandonedTimeout="60" >> logAbandoned="true" /> >> >> <Resource name="jms/ConnectionFactory" auth="Container" >> type="org.apache.activemq.ActiveMQConnectionFactory" >> description="JMS Connection Factory" >> >> factory="org.apache.activemq.jndi.JNDIReferenceFactory" >> brokerURL="tcp://localhost:61616" >> brokerName="LocalActiveMQBroker"/> >> >> >> I appreciate your help. >> >> >> >> jxie wrote: >> > >> > How do I make activemq to start a message listener (onMessage) >> > automatically afte it is started? Now I embedded ActiveMQ with Tomcat, >> I >> > want to seperate ActiveMQ from Tomcat so I can run one Tomcat instance >> and >> > one ActiveMQ instance in a multiple CPU machine. >> > >> > >> > >> > James >> > >> >> -- >> View this message in context: >> http://www.nabble.com/start-message-listener-tf2542136.html#a7094194 >> Sent from the ActiveMQ - User mailing list archive at Nabble.com. >> >> > > > -- > > James > ------- > http://radio.weblogs.com/0112098/ > > -- View this message in context: http://www.nabble.com/start-message-listener-tf2542136.html#a7103029 Sent from the ActiveMQ - User mailing list archive at Nabble.com.
-- James ------- http://radio.weblogs.com/0112098/
