On Wed, Jun 17, 2009 at 1:32 PM, chu_man_fu <[email protected]> wrote:
>
> Would it be fair in saying that not many people intergrate ActiveMQ and Camel
> into JBoss?

I do think many use ActiveMQ as a JMS broker. So there should be a
fair share of users with JBoss.
But deploying as a resource adapter is the J2ee land and people are
migrating away from this to lighter alternatives.
If you use resource adapter then you cannot as a standalone ActiveMQ
borker just toss in your own .jars in a /lib folder.
Then you need to figure out how to get that deployed in j2ee JBoss
server and that is well JBoss specific.
As Camel is very agile you can use a plain proven WAR deployment for
your routing.
What you need in your WAR is just camel + activemq client jars
Then you can keep the AMQ broker (AMQ server) as a resoruce adapter in JBoss.
And you routes deployed as a WAR file. Then they are nicely separated.
How to use Camel as WAR
http://camel.apache.org/tutorial-on-using-camel-in-a-web-application.html

And to get the ActiveMQ client and needed .jars you just use maven to depend on

<dependency>
  <groupId>org.apache.activemq</groupId>
  <artifactId>activemq-camel</artifactId>
  <version>5.2.0</version>
</dependency>

See more here:

http://camel.apache.org/activemq.html




>
> Is it quicker/better/easier to use the standalone ActiveMQ server or an
> embedded solution?

It really depends on a use-case basis. Often the operations team and
companies have invested into existing hardware and software.
So sometimes throwing in a new server platform they should figure out
to host and start/stop/maintain is not always ideal.
So if you use JBoss and have AMQ embedded as a resource adapter, that
is perfect.


>
> Whats the difference between using Camel and Spring? I though Camel was
> built using the Spring framework.

Camel leverages spring where it makes sense instead of building our
own. But Camel is very light-weight and the camel-core is not
dependent on Spring at all.
In fact camel-core.jar only requires commons-logging.jar for logging.
You can run Camel 100% standalone or how you like it.
http://camel.apache.org/running-camel-standalone.html

But combining Camel and Spring is very much used. So you can use
Spring as the IoC container.
http://camel.apache.org/spring.html

Camel uses spring-jms, spring-mail, spring-tx etc. instead of writing
it ourself.
So when you use JMS its spring-jms under the covers.

But people that are into Guice for instance, then Camel also
integrates well with Guice
http://camel.apache.org/guice.html


>
>
> Claus Ibsen-2 wrote:
> >
> > On Wed, Jun 17, 2009 at 12:25 PM, chu_man_fu <[email protected]> wrote:
> >
> >>
> >> Thanks for the reply.
> >>
> >> When looking at the the second link I noticed this:
> >> "If you want to include some Java routing rules, then just add your jar
> >> to
> >> somewhere inside ActiveMQ's lib directory."
> >>
> >
> > Well you could forget about this and use the Spring XML file to do your
> > routing rules.
> > Try to get a simple sample working, eg using a timer to print to a log or
> > something else.
> >
> >
> >
> >>
> >> Where is this lib directory. In my JBoss deploy directory I have a dir
> >> called activemq-ra-1.4.rar as explained here
> >> http://activemq.apache.org/integrating-apache-activemq-with-jboss.html
> >> http://activemq.apache.org/integrating-apache-activemq-with-jboss.html .
> >> This doesn't contain a lib directory or an activemq.xml file. Is it a
> >> case
> >> of dropping any jars in the activemq-ra-1.4.rar dir or the activemq.xml
> >> file
> >> to get this to work?
> >>
> >
> > I guess this is more a question to JBoss how to deploy .jar files that
> > Resource Adapters (ra)
> > can see and use. That can be tricky as classloading and classpath in J2EE
> > containers can be a nightmare.
> >
> >
> >
> >
> >>
> >>
> >> Claus Ibsen-2 wrote:
> >> >
> >> > Hi
> >> > Camel is shipped out of the box with ActiveMQ.
> >> >
> >> > There should be an active mq configuraiton file that is a spring XML
> >> file.
> >> > In this XML file you just add a camelcontext and then you get Camel
> >> > started.
> >> > If not mistaking there might be a Camel sample already in this file.
> >> >
> >> > Something like this:
> >> > http://activemq.apache.org/xml-configuration.html
> >> >
> >> > And a bit info on this FAQ
> >> >
> >> http://activemq.apache.org/how-should-i-package-applications-using-camel-and-activemq.html
> >> >
> >> >
> >> >
> >> > On Tue, Jun 16, 2009 at 5:36 PM, chu_man_fu <[email protected]> wrote:
> >> >
> >> >>
> >> >> Hello forum,
> >> >>
> >> >> I am a newbie to ActiveMQ and Camel and I have a few questions which I
> >> am
> >> >> unable to fathom out myself.
> >> >> Firstly I will explain what I am trying to achieve. I need to create a
> >> >> messaging system over internet protocols. The messages need to be
> >> >> filtered
> >> >> based on content and sent to the appropiate Queue/Topic.
> >> >> I want to use ActiveMQ as my messaging provider and Camel to do the
> >> >> filtering/re-routing etc... All this then needs to sit in JBoss. A
> >> client
> >> >> application will connect to the Queues/Topics and download the
> >> messages.
> >> >> In
> >> >> time this will also need to send messages back to the server.
> >> >> I have ActiveMQ installed in JBoss 4.2.2.GA and it works fine.
> >> >> How do I get intergrate Camel into it? I understand that this is
> >> already
> >> >> included in ActiveMQ but I can't see how to control Camel routing. I
> >> >> created
> >> >> an MBean to sit in JBoss and configure a simple routing based on some
> >> >> example code from the fuse project. I have noticed that this uses
> >> >> CamelContext.start(). I don't want the MBean to do this, I want JBoss
> >> to
> >> >> start this up. When this is called I get multiple exception messages,
> >> one
> >> >> of
> >> >> which is:
> >> >>
> >> >> Failed to start ActiveMQ JMS Message Broker. Reason:
> >> >> javax.management.InstanceAlreadyExistsException:
> >> >>
> >> >> JBoss has already started ActiveMQ! I never wanted Camel to start it
> >> >> also.
> >> >>
> >> >> Is there a way of attaching Camel to the current ActiveMQ broker?
> >> >>
> >> >> I appologies if this is confusing, like I say I am a newbie and maybe
> >> >> barking up the wrong tree.
> >> >>
> >> >> Best Regards
> >> >> Chris Mitchell
> >> >> --
> >> >> View this message in context:
> >> >>
> >> http://www.nabble.com/JBoss-%2B-ActiveMQ-%2B-Camel-%2B-Newbie-tp24056976p24056976.html
> >> >> Sent from the Camel - Users mailing list archive at Nabble.com.
> >> >>
> >> >>
> >> >
> >> >
> >> > --
> >> > Claus Ibsen
> >> > Apache Camel Committer
> >> >
> >> > Open Source Integration: http://fusesource.com
> >> > Blog: http://davsclaus.blogspot.com/
> >> > Twitter: http://twitter.com/davsclaus
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/JBoss-%2B-ActiveMQ-%2B-Camel-%2B-Newbie-tp24056976p24070733.html
> >> Sent from the Camel - Users mailing list archive at Nabble.com.
> >>
> >>
> >
> >
> > --
> > Claus Ibsen
> > Apache Camel Committer
> >
> > Open Source Integration: http://fusesource.com
> > Blog: http://davsclaus.blogspot.com/
> > Twitter: http://twitter.com/davsclaus
> >
> >
>
> --
> View this message in context: 
> http://www.nabble.com/JBoss-%2B-ActiveMQ-%2B-Camel-%2B-Newbie-tp24056976p24071711.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



--
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Reply via email to