Results 1 to 5 of 5

Thread: How to using activemq in spring

  1. #1
    Join Date
    Apr 2005
    Posts
    2

    Default How to using activemq in spring

    Hi All,
    Now i using activemq3.0 in spring to provider a jms server for my application, this is my current problem:

    1. I want to start activemq when my application start and create some topic and queue defined in config file, who can I write the config file?

    2. I want use mysql as activemq's persistence type to store the message, who can I write the config file?

    3. In runtime, I want send & receive message from topic/queue in my application, and I want using JNDI to send & receive message from same topic/queue in a standalone program, what issue should be noticed in config file, have some examples I can reference?

    otherwise, if I want using activemq jca feature, who can I write the config file?

    Appreciate any help, thanks
    good good study, day day up

  2. #2
    Join Date
    Aug 2004
    Location
    Southampton, UK
    Posts
    826

    Default

    Check out the docs on the ActiveMQ website that cover Spring integration and JCA.

    Rob
    Rob Harrop
    Lead Engineer, dm Server
    SpringSource
    http://www.springsource.com

    Co-Author - Pro Spring

  3. #3
    Join Date
    Aug 2004
    Location
    London
    Posts
    164

    Default Re: How to using activemq in spring

    I'll answer these in reverse order a little.

    3. To use JNDI to setup topics/queues inside JNDI along with the required connection factories, see...

    http://activemq.org/JNDI+Support

    2. To configure a different JDBC database, see the activemq.xml that comes with the binary distribution of ActiveMQ; it just uses straight Spring to setup the JDBC connection itself, refer to the Spring manuals for more details.

    1. If you want the activemq broker to start when your application starts you can do a few things. If you use an embedded broker, then ActiveMQ will start the broker when you start a JMS connection...

    http://activemq.org/How+do+I+embed+a...e+a+Connection

    Or you could use a servlet to initialise ActiveMQ from inside your servlet engine if you wish. (The 3.1-SNAPSHOT binary has an example WAR for doing this - if you download the snapshot then type 'ant war' in the example directory it'll make a self-starting WAR for you).

    Finally, you might want to use the Spring based JCA container in ActiveMQ to manage your subscriptions using connection/session/thread/bean pooling...

    http://activemq.org/JCA+Container
    James Strachan
    ------------------
    Open Source Integration
    Iona

  4. #4
    Join Date
    Apr 2005
    Posts
    2

    Default

    thanks, but I want a config file solve all above questions, what shall I do? are there have a example? If I only use vm://hostname as brokerURL and vmPersistence mode when useEmbeddedBroker property is true?
    good good study, day day up

  5. #5
    Join Date
    Aug 2004
    Location
    London
    Posts
    164

    Default

    Quote Originally Posted by joyheros
    thanks, but I want a config file solve all above questions, what shall I do? are there have a example? If I only use vm://hostname as brokerURL and vmPersistence mode when useEmbeddedBroker property is true?
    Each of the comments and links above refers to a configuration file example. So you'll have a jndi.properties for JNDI, an activemq.xml for the broker configuration and the spring.xml for the JCA Container configuration.
    James Strachan
    ------------------
    Open Source Integration
    Iona

Similar Threads

  1. Spring MVC Web Framework versus Struts
    By biguniverse in forum Web Flow
    Replies: 27
    Last Post: Aug 29th, 2012, 03:57 AM
  2. Replies: 5
    Last Post: Aug 9th, 2008, 05:30 AM
  3. A Spring Class Loader?
    By azzoti in forum Architecture
    Replies: 8
    Last Post: May 7th, 2005, 04:02 AM
  4. No one hires for Spring expertise
    By ctassoni in forum Meta
    Replies: 13
    Last Post: May 5th, 2005, 04:29 PM
  5. Replies: 14
    Last Post: Feb 21st, 2005, 05:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •