You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "fabian.alvarez" <fa...@ancap.com.uy> on 2010/06/03 17:20:26 UTC

ActiveMQ . Message Endpoint

Hello!
I'm working on a project in which we are using as a queue of messages:
ActiveMQ.
We need to do the following: the arrival of a message to the queue, at the
endpoint, a service is triggered automatically
that consumes the message and process the data.
According to what I was investigating the EIP that we implement is the
Message Endpoint, but we have no tutorial
guide in the implementation.
I appreciate if someone can guide me in this implementation.
Fabian
-- 
View this message in context: http://old.nabble.com/ActiveMQ-.-Message-Endpoint-tp28768956p28768956.html
Sent from the Camel Development mailing list archive at Nabble.com.


Re: ActiveMQ . Message Endpoint

Posted by "fabian.alvarez" <fa...@ancap.com.uy>.
clause, worked perfectly


Claus Ibsen-2 wrote:
> 
> Hi
> 
> You need to have the example compiled into .class files and have those
> packaged in a .jar.
> Then that .jar is to be deployed in AMQ so Spring/Camel can find that
> class at runtime.
> 
> 
> On Mon, Jun 14, 2010 at 7:53 PM, fabian.alvarez <fa...@ancap.com.uy>
> wrote:
>>
>> includes in the following routing applicationContext.xml:
>> <camelcontext id="camel"
>> xmlns="http://camel.apache.org/schema/spring"><route><from
>> uri="activemq:MQ_A_ACTIVEMQ">
>> <bean ref="pruebaFabian">
>> </bean>
>> </from>
>> </route>
>>
>> </camelcontext>
>>
>> the Bean definition is the following (inside the same xml):
>> <bean id="pruebaFabian" class="example.jmstofile.JmsToFileRoute"/>
>> and gives an error cannot find the class and not is where copy the class
>> in
>> question which is: C:\activemq\example\jmstofile\JmsToFileRoute.java
>>
>> "ERROR | Context initialization failed"
>> "org.springframework.beans.factory.BeanCreationException: error creating
>> bean with name 'camel': Invocation of init method failed; nested
>> exception
>> is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot
>> find class [example.jmstofile.JmsToFileRoute] for bean with name
>> 'pruebaFabian' defined in ServletContext
>> [/WEB-INF/applicationContext.xml];
>> nested exception is java.lang.ClassNotFoundException resource:
>> example.jmstofile.JmsToFileRoute"
>>
>>
>>
>>
>> fabian.alvarez wrote:
>>>
>>> OK!
>>>
>>>
>>> janstey wrote:
>>>>
>>>> Yeah, you need to use Java to program in Camel. No idea if anyone has
>>>> taken
>>>> on the grueling task of porting Camel to C# out there :)
>>>>
>>>> On Thu, Jun 3, 2010 at 3:25 PM, fabian.alvarez
>>>> <fa...@ancap.com.uy>wrote:
>>>>
>>>>>
>>>>> Claus,
>>>>>
>>>>> so thank you very much by the quick response.
>>>>>
>>>>> I think it's just what I need. I'll try.
>>>>> I only one question remains: Just work with Java language? or I can
>>>>> program
>>>>> in c #?
>>>>>
>>>>> Thank you very much again for the answer
>>>>>
>>>>> regards
>>>>>
>>>>> Fabian
>>>>>
>>>>>
>>>>> Claus Ibsen-2 wrote:
>>>>> >
>>>>> > Hi
>>>>> >
>>>>> > The getting started example
>>>>> > http://camel.apache.org/walk-through-an-example.html
>>>>> >
>>>>> > May inspire you a bit. All you essentially need is a route
>>>>> >
>>>>> > from(jms).to(myBeanWhichProcessTheData);
>>>>> >
>>>>> >
>>>>> >
>>>>> > On Thu, Jun 3, 2010 at 5:20 PM, fabian.alvarez
>>>>> <fa...@ancap.com.uy>
>>>>> > wrote:
>>>>> >>
>>>>> >> Hello!
>>>>> >> I'm working on a project in which we are using as a queue of
>>>>> messages:
>>>>> >> ActiveMQ.
>>>>> >> We need to do the following: the arrival of a message to the queue,
>>>>> at
>>>>> >> the
>>>>> >> endpoint, a service is triggered automatically
>>>>> >> that consumes the message and process the data.
>>>>> >> According to what I was investigating the EIP that we implement is
>>>>> the
>>>>> >> Message Endpoint, but we have no tutorial
>>>>> >> guide in the implementation.
>>>>> >> I appreciate if someone can guide me in this implementation.
>>>>> >> Fabian
>>>>> >> --
>>>>> >> View this message in context:
>>>>> >>
>>>>> http://old.nabble.com/ActiveMQ-.-Message-Endpoint-tp28768956p28768956.html
>>>>> >> Sent from the Camel Development mailing list archive at Nabble.com.
>>>>> >>
>>>>> >>
>>>>> >
>>>>> >
>>>>> >
>>>>> > --
>>>>> > Claus Ibsen
>>>>> > Apache Camel Committer
>>>>> >
>>>>> > Author of Camel in Action: http://www.manning.com/ibsen/
>>>>> > Open Source Integration: http://fusesource.com
>>>>> > Blog: http://davsclaus.blogspot.com/
>>>>> > Twitter: http://twitter.com/davsclaus
>>>>> >
>>>>> >
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://old.nabble.com/ActiveMQ-.-Message-Endpoint-tp28768956p28770926.html
>>>>> Sent from the Camel Development mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Cheers,
>>>> Jon
>>>>
>>>> Camel in Action: http://manning.com/ibsen
>>>> Blog: http://janstey.blogspot.com
>>>>
>>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/ActiveMQ-.-Message-Endpoint-tp28768956p28882665.html
>> Sent from the Camel Development mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
> 
> 

-- 
View this message in context: http://old.nabble.com/ActiveMQ-.-Message-Endpoint-tp28768956p28895762.html
Sent from the Camel Development mailing list archive at Nabble.com.


Re: ActiveMQ . Message Endpoint

Posted by falvarez <fa...@ancap.com.uy>.
Claus/Willem: I did what I was advised and it worked perfect.

-----
Todos somos muy ignorantes. Lo que ocurre es que no todos ignoramos las
mismas cosas.
-- 
View this message in context: http://camel.465427.n5.nabble.com/ActiveMQ-Message-Endpoint-tp489670p511709.html
Sent from the Camel Development mailing list archive at Nabble.com.

Re: ActiveMQ . Message Endpoint

Posted by Claus Ibsen <cl...@gmail.com>.
On Fri, Jun 25, 2010 at 4:05 PM, falvarez <fa...@ancap.com.uy> wrote:
>
> When i put de following code into my applicationcontext
>                <route>
>                        <from uri="direct:exec" />
>                        <to uri="exec:c:/creo.bat" />
>                </route>
> and run de ActiveMQ de app jump to the following error
>
> ERROR | Context initialization failed
> org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint:
> exec:///c:/creo.bat due to: No component found with scheme: exec
>
> i have two question:
> why i have to write "direct:exec" and not "activemq=mytestqueue"
> and
> it's ok put "to uri" into de route??
>

The exec component is part of Camel 2.3.0
http://camel.apache.org/exec

So you need to use Camel 2.3.0 and also you need to drop the
camel-exec.jar in the lib folder for AMQ so it can pick it up.

And + all the .jars which the camel-exec need at runtime. Eg all those
with compile below:

[INFO] Building Camel :: Exec
[INFO]    task-segment: [dependency:list]
[INFO] ------------------------------------------------------------------------
[INFO] [dependency:list]
[INFO]
[INFO] The following files have been resolved:
[INFO]    aopalliance:aopalliance:jar:1.0:test
[INFO]    com.sun.xml.bind:jaxb-impl:jar:2.1.12:compile
[INFO]    commons-io:commons-io:jar:1.4:compile
[INFO]    commons-lang:commons-lang:jar:2.5:compile
[INFO]    commons-logging:commons-logging:jar:1.1.1:test
[INFO]    commons-logging:commons-logging-api:jar:1.1:compile
[INFO]    javax.activation:activation:jar:1.1:compile
[INFO]    javax.xml.bind:jaxb-api:jar:2.1:compile
[INFO]    javax.xml.stream:stax-api:jar:1.0-2:compile
[INFO]    junit:junit:jar:4.4:test
[INFO]    log4j:log4j:jar:1.2.16:test
[INFO]    org.apache.camel:camel-core:jar:2.4-SNAPSHOT:compile
[INFO]    org.apache.camel:camel-spring:jar:2.4-SNAPSHOT:test
[INFO]    org.apache.camel:camel-test:jar:2.4-SNAPSHOT:test
[INFO]    org.apache.commons:commons-exec:jar:1.0.1:compile
[INFO]    org.fusesource.commonman:commons-management:jar:1.0:compile
[INFO]    org.springframework:spring-aop:jar:2.5.6:test
[INFO]    org.springframework:spring-beans:jar:2.5.6:test
[INFO]    org.springframework:spring-context:jar:2.5.6:test
[INFO]    org.springframework:spring-core:jar:2.5.6:test
[INFO]    org.springframework:spring-test:jar:2.5.6:test
[INFO]    org.springframework:spring-tx:jar:2.5.6:test




>
>
> -----
> Todos somos muy ignorantes. Lo que ocurre es que no todos ignoramos las
> mismas cosas.
> --
> View this message in context: http://camel.465427.n5.nabble.com/ActiveMQ-Message-Endpoint-tp489670p511341.html
> Sent from the Camel Development mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: ActiveMQ . Message Endpoint

Posted by Willem Jiang <wi...@gmail.com>.
Ah, you are using Camel inside of ActivemMQ.
Please make sure you put the camel-exec jar which is not shipped with 
ActiveMQ in you class path, otherwise you will get the below exception.


Willem
----------------------------------
Apache Camel, Apache CXF committer
Open SOA http://www.fusesource.com
Blog http://willemjiang.blogspot.com
Tiwtter http://twitter.com/willemjiang

falvarez wrote:
> When i put de following code into my applicationcontext 
> 		<route>
> 			<from uri="direct:exec" /> 
> 			<to uri="exec:c:/creo.bat" /> 
> 		</route>
> and run de ActiveMQ de app jump to the following error
> 
> ERROR | Context initialization failed
> org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint:
> exec:///c:/creo.bat due to: No component found with scheme: exec
> 
> i have two question: 
> why i have to write "direct:exec" and not "activemq=mytestqueue"
> and
> it's ok put "to uri" into de route??
> 
> 
> 
> -----
> Todos somos muy ignorantes. Lo que ocurre es que no todos ignoramos las
> mismas cosas.


Re: ActiveMQ . Message Endpoint

Posted by falvarez <fa...@ancap.com.uy>.
When i put de following code into my applicationcontext 
		<route>
			<from uri="direct:exec" /> 
			<to uri="exec:c:/creo.bat" /> 
		</route>
and run de ActiveMQ de app jump to the following error

ERROR | Context initialization failed
org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint:
exec:///c:/creo.bat due to: No component found with scheme: exec

i have two question: 
why i have to write "direct:exec" and not "activemq=mytestqueue"
and
it's ok put "to uri" into de route??



-----
Todos somos muy ignorantes. Lo que ocurre es que no todos ignoramos las
mismas cosas.
-- 
View this message in context: http://camel.465427.n5.nabble.com/ActiveMQ-Message-Endpoint-tp489670p511341.html
Sent from the Camel Development mailing list archive at Nabble.com.

Re: ActiveMQ . Message Endpoint

Posted by Claus Ibsen <cl...@gmail.com>.
On Fri, Jun 25, 2010 at 2:53 PM, falvarez <fa...@ancap.com.uy> wrote:
>
> How do I to add the following sentence in my DSL Spring
> ApplicationContext.xml language: "from (" direct: exec ")
> . To ("exec: wc? Args =-- words / usr / share / dict / words") "
>
>
> I can't find information about it

See User Guide -> Working with Camel and Spring



> --
> View this message in context: http://camel.465427.n5.nabble.com/ActiveMQ-Message-Endpoint-tp489670p511327.html
> Sent from the Camel Development mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: ActiveMQ . Message Endpoint

Posted by falvarez <fa...@ancap.com.uy>.
How do I to add the following sentence in my DSL Spring
ApplicationContext.xml language: "from (" direct: exec ") 
. To ("exec: wc? Args =-- words / usr / share / dict / words") " 


I can't find information about it 
-- 
View this message in context: http://camel.465427.n5.nabble.com/ActiveMQ-Message-Endpoint-tp489670p511327.html
Sent from the Camel Development mailing list archive at Nabble.com.

Re: ActiveMQ . Message Endpoint

Posted by Claus Ibsen <cl...@gmail.com>.
On Tue, Jun 15, 2010 at 10:55 PM, fabian.alvarez <fa...@ancap.com.uy> wrote:
>
> Claus,
>
> worked perfect.
> Another question: <bean/> label can include a .exe as a service or just use
> java classes?
>

Just java classes as its a reference to a class, eg you have to do
specify and id and class attribute
<bean id="foo" class="com.mycompany.MyFooClass"/>

And <bean> is part of Spring framework.

Camel has a new Exec component you can use to invoke .exe files
http://camel.apache.org/exec


>
> Claus Ibsen-2 wrote:
>>
>> Hi
>>
>> You need to have the example compiled into .class files and have those
>> packaged in a .jar.
>> Then that .jar is to be deployed in AMQ so Spring/Camel can find that
>> class at runtime.
>>
>>
>> On Mon, Jun 14, 2010 at 7:53 PM, fabian.alvarez <fa...@ancap.com.uy>
>> wrote:
>>>
>>> includes in the following routing applicationContext.xml:
>>> <camelcontext id="camel"
>>> xmlns="http://camel.apache.org/schema/spring"><route><from
>>> uri="activemq:MQ_A_ACTIVEMQ">
>>> <bean ref="pruebaFabian">
>>> </bean>
>>> </from>
>>> </route>
>>>
>>> </camelcontext>
>>>
>>> the Bean definition is the following (inside the same xml):
>>> <bean id="pruebaFabian" class="example.jmstofile.JmsToFileRoute"/>
>>> and gives an error cannot find the class and not is where copy the class
>>> in
>>> question which is: C:\activemq\example\jmstofile\JmsToFileRoute.java
>>>
>>> "ERROR | Context initialization failed"
>>> "org.springframework.beans.factory.BeanCreationException: error creating
>>> bean with name 'camel': Invocation of init method failed; nested
>>> exception
>>> is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot
>>> find class [example.jmstofile.JmsToFileRoute] for bean with name
>>> 'pruebaFabian' defined in ServletContext
>>> [/WEB-INF/applicationContext.xml];
>>> nested exception is java.lang.ClassNotFoundException resource:
>>> example.jmstofile.JmsToFileRoute"
>>>
>>>
>>>
>>>
>>> fabian.alvarez wrote:
>>>>
>>>> OK!
>>>>
>>>>
>>>> janstey wrote:
>>>>>
>>>>> Yeah, you need to use Java to program in Camel. No idea if anyone has
>>>>> taken
>>>>> on the grueling task of porting Camel to C# out there :)
>>>>>
>>>>> On Thu, Jun 3, 2010 at 3:25 PM, fabian.alvarez
>>>>> <fa...@ancap.com.uy>wrote:
>>>>>
>>>>>>
>>>>>> Claus,
>>>>>>
>>>>>> so thank you very much by the quick response.
>>>>>>
>>>>>> I think it's just what I need. I'll try.
>>>>>> I only one question remains: Just work with Java language? or I can
>>>>>> program
>>>>>> in c #?
>>>>>>
>>>>>> Thank you very much again for the answer
>>>>>>
>>>>>> regards
>>>>>>
>>>>>> Fabian
>>>>>>
>>>>>>
>>>>>> Claus Ibsen-2 wrote:
>>>>>> >
>>>>>> > Hi
>>>>>> >
>>>>>> > The getting started example
>>>>>> > http://camel.apache.org/walk-through-an-example.html
>>>>>> >
>>>>>> > May inspire you a bit. All you essentially need is a route
>>>>>> >
>>>>>> > from(jms).to(myBeanWhichProcessTheData);
>>>>>> >
>>>>>> >
>>>>>> >
>>>>>> > On Thu, Jun 3, 2010 at 5:20 PM, fabian.alvarez
>>>>>> <fa...@ancap.com.uy>
>>>>>> > wrote:
>>>>>> >>
>>>>>> >> Hello!
>>>>>> >> I'm working on a project in which we are using as a queue of
>>>>>> messages:
>>>>>> >> ActiveMQ.
>>>>>> >> We need to do the following: the arrival of a message to the queue,
>>>>>> at
>>>>>> >> the
>>>>>> >> endpoint, a service is triggered automatically
>>>>>> >> that consumes the message and process the data.
>>>>>> >> According to what I was investigating the EIP that we implement is
>>>>>> the
>>>>>> >> Message Endpoint, but we have no tutorial
>>>>>> >> guide in the implementation.
>>>>>> >> I appreciate if someone can guide me in this implementation.
>>>>>> >> Fabian
>>>>>> >> --
>>>>>> >> View this message in context:
>>>>>> >>
>>>>>> http://old.nabble.com/ActiveMQ-.-Message-Endpoint-tp28768956p28768956.html
>>>>>> >> Sent from the Camel Development mailing list archive at Nabble.com.
>>>>>> >>
>>>>>> >>
>>>>>> >
>>>>>> >
>>>>>> >
>>>>>> > --
>>>>>> > Claus Ibsen
>>>>>> > Apache Camel Committer
>>>>>> >
>>>>>> > Author of Camel in Action: http://www.manning.com/ibsen/
>>>>>> > Open Source Integration: http://fusesource.com
>>>>>> > Blog: http://davsclaus.blogspot.com/
>>>>>> > Twitter: http://twitter.com/davsclaus
>>>>>> >
>>>>>> >
>>>>>>
>>>>>> --
>>>>>> View this message in context:
>>>>>> http://old.nabble.com/ActiveMQ-.-Message-Endpoint-tp28768956p28770926.html
>>>>>> Sent from the Camel Development mailing list archive at Nabble.com.
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Cheers,
>>>>> Jon
>>>>>
>>>>> Camel in Action: http://manning.com/ibsen
>>>>> Blog: http://janstey.blogspot.com
>>>>>
>>>>>
>>>>
>>>>
>>>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/ActiveMQ-.-Message-Endpoint-tp28768956p28882665.html
>>> Sent from the Camel Development mailing list archive at Nabble.com.
>>>
>>>
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Author of Camel in Action: http://www.manning.com/ibsen/
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>>
>>
>
> --
> View this message in context: http://old.nabble.com/ActiveMQ-.-Message-Endpoint-tp28768956p28896234.html
> Sent from the Camel Development mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: ActiveMQ . Message Endpoint

Posted by "fabian.alvarez" <fa...@ancap.com.uy>.
Claus,

worked perfect.
Another question: <bean/> label can include a .exe as a service or just use
java classes?


Claus Ibsen-2 wrote:
> 
> Hi
> 
> You need to have the example compiled into .class files and have those
> packaged in a .jar.
> Then that .jar is to be deployed in AMQ so Spring/Camel can find that
> class at runtime.
> 
> 
> On Mon, Jun 14, 2010 at 7:53 PM, fabian.alvarez <fa...@ancap.com.uy>
> wrote:
>>
>> includes in the following routing applicationContext.xml:
>> <camelcontext id="camel"
>> xmlns="http://camel.apache.org/schema/spring"><route><from
>> uri="activemq:MQ_A_ACTIVEMQ">
>> <bean ref="pruebaFabian">
>> </bean>
>> </from>
>> </route>
>>
>> </camelcontext>
>>
>> the Bean definition is the following (inside the same xml):
>> <bean id="pruebaFabian" class="example.jmstofile.JmsToFileRoute"/>
>> and gives an error cannot find the class and not is where copy the class
>> in
>> question which is: C:\activemq\example\jmstofile\JmsToFileRoute.java
>>
>> "ERROR | Context initialization failed"
>> "org.springframework.beans.factory.BeanCreationException: error creating
>> bean with name 'camel': Invocation of init method failed; nested
>> exception
>> is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot
>> find class [example.jmstofile.JmsToFileRoute] for bean with name
>> 'pruebaFabian' defined in ServletContext
>> [/WEB-INF/applicationContext.xml];
>> nested exception is java.lang.ClassNotFoundException resource:
>> example.jmstofile.JmsToFileRoute"
>>
>>
>>
>>
>> fabian.alvarez wrote:
>>>
>>> OK!
>>>
>>>
>>> janstey wrote:
>>>>
>>>> Yeah, you need to use Java to program in Camel. No idea if anyone has
>>>> taken
>>>> on the grueling task of porting Camel to C# out there :)
>>>>
>>>> On Thu, Jun 3, 2010 at 3:25 PM, fabian.alvarez
>>>> <fa...@ancap.com.uy>wrote:
>>>>
>>>>>
>>>>> Claus,
>>>>>
>>>>> so thank you very much by the quick response.
>>>>>
>>>>> I think it's just what I need. I'll try.
>>>>> I only one question remains: Just work with Java language? or I can
>>>>> program
>>>>> in c #?
>>>>>
>>>>> Thank you very much again for the answer
>>>>>
>>>>> regards
>>>>>
>>>>> Fabian
>>>>>
>>>>>
>>>>> Claus Ibsen-2 wrote:
>>>>> >
>>>>> > Hi
>>>>> >
>>>>> > The getting started example
>>>>> > http://camel.apache.org/walk-through-an-example.html
>>>>> >
>>>>> > May inspire you a bit. All you essentially need is a route
>>>>> >
>>>>> > from(jms).to(myBeanWhichProcessTheData);
>>>>> >
>>>>> >
>>>>> >
>>>>> > On Thu, Jun 3, 2010 at 5:20 PM, fabian.alvarez
>>>>> <fa...@ancap.com.uy>
>>>>> > wrote:
>>>>> >>
>>>>> >> Hello!
>>>>> >> I'm working on a project in which we are using as a queue of
>>>>> messages:
>>>>> >> ActiveMQ.
>>>>> >> We need to do the following: the arrival of a message to the queue,
>>>>> at
>>>>> >> the
>>>>> >> endpoint, a service is triggered automatically
>>>>> >> that consumes the message and process the data.
>>>>> >> According to what I was investigating the EIP that we implement is
>>>>> the
>>>>> >> Message Endpoint, but we have no tutorial
>>>>> >> guide in the implementation.
>>>>> >> I appreciate if someone can guide me in this implementation.
>>>>> >> Fabian
>>>>> >> --
>>>>> >> View this message in context:
>>>>> >>
>>>>> http://old.nabble.com/ActiveMQ-.-Message-Endpoint-tp28768956p28768956.html
>>>>> >> Sent from the Camel Development mailing list archive at Nabble.com.
>>>>> >>
>>>>> >>
>>>>> >
>>>>> >
>>>>> >
>>>>> > --
>>>>> > Claus Ibsen
>>>>> > Apache Camel Committer
>>>>> >
>>>>> > Author of Camel in Action: http://www.manning.com/ibsen/
>>>>> > Open Source Integration: http://fusesource.com
>>>>> > Blog: http://davsclaus.blogspot.com/
>>>>> > Twitter: http://twitter.com/davsclaus
>>>>> >
>>>>> >
>>>>>
>>>>> --
>>>>> View this message in context:
>>>>> http://old.nabble.com/ActiveMQ-.-Message-Endpoint-tp28768956p28770926.html
>>>>> Sent from the Camel Development mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Cheers,
>>>> Jon
>>>>
>>>> Camel in Action: http://manning.com/ibsen
>>>> Blog: http://janstey.blogspot.com
>>>>
>>>>
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/ActiveMQ-.-Message-Endpoint-tp28768956p28882665.html
>> Sent from the Camel Development mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
> 
> 

-- 
View this message in context: http://old.nabble.com/ActiveMQ-.-Message-Endpoint-tp28768956p28896234.html
Sent from the Camel Development mailing list archive at Nabble.com.


Re: ActiveMQ . Message Endpoint

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

You need to have the example compiled into .class files and have those
packaged in a .jar.
Then that .jar is to be deployed in AMQ so Spring/Camel can find that
class at runtime.


On Mon, Jun 14, 2010 at 7:53 PM, fabian.alvarez <fa...@ancap.com.uy> wrote:
>
> includes in the following routing applicationContext.xml:
> <camelcontext id="camel"
> xmlns="http://camel.apache.org/schema/spring"><route><from
> uri="activemq:MQ_A_ACTIVEMQ">
> <bean ref="pruebaFabian">
> </bean>
> </from>
> </route>
>
> </camelcontext>
>
> the Bean definition is the following (inside the same xml):
> <bean id="pruebaFabian" class="example.jmstofile.JmsToFileRoute"/>
> and gives an error cannot find the class and not is where copy the class in
> question which is: C:\activemq\example\jmstofile\JmsToFileRoute.java
>
> "ERROR | Context initialization failed"
> "org.springframework.beans.factory.BeanCreationException: error creating
> bean with name 'camel': Invocation of init method failed; nested exception
> is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot
> find class [example.jmstofile.JmsToFileRoute] for bean with name
> 'pruebaFabian' defined in ServletContext [/WEB-INF/applicationContext.xml];
> nested exception is java.lang.ClassNotFoundException resource:
> example.jmstofile.JmsToFileRoute"
>
>
>
>
> fabian.alvarez wrote:
>>
>> OK!
>>
>>
>> janstey wrote:
>>>
>>> Yeah, you need to use Java to program in Camel. No idea if anyone has
>>> taken
>>> on the grueling task of porting Camel to C# out there :)
>>>
>>> On Thu, Jun 3, 2010 at 3:25 PM, fabian.alvarez
>>> <fa...@ancap.com.uy>wrote:
>>>
>>>>
>>>> Claus,
>>>>
>>>> so thank you very much by the quick response.
>>>>
>>>> I think it's just what I need. I'll try.
>>>> I only one question remains: Just work with Java language? or I can
>>>> program
>>>> in c #?
>>>>
>>>> Thank you very much again for the answer
>>>>
>>>> regards
>>>>
>>>> Fabian
>>>>
>>>>
>>>> Claus Ibsen-2 wrote:
>>>> >
>>>> > Hi
>>>> >
>>>> > The getting started example
>>>> > http://camel.apache.org/walk-through-an-example.html
>>>> >
>>>> > May inspire you a bit. All you essentially need is a route
>>>> >
>>>> > from(jms).to(myBeanWhichProcessTheData);
>>>> >
>>>> >
>>>> >
>>>> > On Thu, Jun 3, 2010 at 5:20 PM, fabian.alvarez <fa...@ancap.com.uy>
>>>> > wrote:
>>>> >>
>>>> >> Hello!
>>>> >> I'm working on a project in which we are using as a queue of
>>>> messages:
>>>> >> ActiveMQ.
>>>> >> We need to do the following: the arrival of a message to the queue,
>>>> at
>>>> >> the
>>>> >> endpoint, a service is triggered automatically
>>>> >> that consumes the message and process the data.
>>>> >> According to what I was investigating the EIP that we implement is
>>>> the
>>>> >> Message Endpoint, but we have no tutorial
>>>> >> guide in the implementation.
>>>> >> I appreciate if someone can guide me in this implementation.
>>>> >> Fabian
>>>> >> --
>>>> >> View this message in context:
>>>> >>
>>>> http://old.nabble.com/ActiveMQ-.-Message-Endpoint-tp28768956p28768956.html
>>>> >> Sent from the Camel Development mailing list archive at Nabble.com.
>>>> >>
>>>> >>
>>>> >
>>>> >
>>>> >
>>>> > --
>>>> > Claus Ibsen
>>>> > Apache Camel Committer
>>>> >
>>>> > Author of Camel in Action: http://www.manning.com/ibsen/
>>>> > Open Source Integration: http://fusesource.com
>>>> > Blog: http://davsclaus.blogspot.com/
>>>> > Twitter: http://twitter.com/davsclaus
>>>> >
>>>> >
>>>>
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/ActiveMQ-.-Message-Endpoint-tp28768956p28770926.html
>>>> Sent from the Camel Development mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>> --
>>> Cheers,
>>> Jon
>>>
>>> Camel in Action: http://manning.com/ibsen
>>> Blog: http://janstey.blogspot.com
>>>
>>>
>>
>>
>
> --
> View this message in context: http://old.nabble.com/ActiveMQ-.-Message-Endpoint-tp28768956p28882665.html
> Sent from the Camel Development mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: ActiveMQ . Message Endpoint

Posted by "fabian.alvarez" <fa...@ancap.com.uy>.
includes in the following routing applicationContext.xml: 
<camelcontext id="camel"
xmlns="http://camel.apache.org/schema/spring"><route><from
uri="activemq:MQ_A_ACTIVEMQ">
<bean ref="pruebaFabian">
</bean>
</from>
</route>
		
</camelcontext> 

the Bean definition is the following (inside the same xml):
<bean id="pruebaFabian" class="example.jmstofile.JmsToFileRoute"/> 
and gives an error cannot find the class and not is where copy the class in
question which is: C:\activemq\example\jmstofile\JmsToFileRoute.java

"ERROR | Context initialization failed"
"org.springframework.beans.factory.BeanCreationException: error creating
bean with name 'camel': Invocation of init method failed; nested exception
is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot
find class [example.jmstofile.JmsToFileRoute] for bean with name
'pruebaFabian' defined in ServletContext [/WEB-INF/applicationContext.xml];
nested exception is java.lang.ClassNotFoundException resource:
example.jmstofile.JmsToFileRoute"




fabian.alvarez wrote:
> 
> OK!
> 
> 
> janstey wrote:
>> 
>> Yeah, you need to use Java to program in Camel. No idea if anyone has
>> taken
>> on the grueling task of porting Camel to C# out there :)
>> 
>> On Thu, Jun 3, 2010 at 3:25 PM, fabian.alvarez
>> <fa...@ancap.com.uy>wrote:
>> 
>>>
>>> Claus,
>>>
>>> so thank you very much by the quick response.
>>>
>>> I think it's just what I need. I'll try.
>>> I only one question remains: Just work with Java language? or I can
>>> program
>>> in c #?
>>>
>>> Thank you very much again for the answer
>>>
>>> regards
>>>
>>> Fabian
>>>
>>>
>>> Claus Ibsen-2 wrote:
>>> >
>>> > Hi
>>> >
>>> > The getting started example
>>> > http://camel.apache.org/walk-through-an-example.html
>>> >
>>> > May inspire you a bit. All you essentially need is a route
>>> >
>>> > from(jms).to(myBeanWhichProcessTheData);
>>> >
>>> >
>>> >
>>> > On Thu, Jun 3, 2010 at 5:20 PM, fabian.alvarez <fa...@ancap.com.uy>
>>> > wrote:
>>> >>
>>> >> Hello!
>>> >> I'm working on a project in which we are using as a queue of
>>> messages:
>>> >> ActiveMQ.
>>> >> We need to do the following: the arrival of a message to the queue,
>>> at
>>> >> the
>>> >> endpoint, a service is triggered automatically
>>> >> that consumes the message and process the data.
>>> >> According to what I was investigating the EIP that we implement is
>>> the
>>> >> Message Endpoint, but we have no tutorial
>>> >> guide in the implementation.
>>> >> I appreciate if someone can guide me in this implementation.
>>> >> Fabian
>>> >> --
>>> >> View this message in context:
>>> >>
>>> http://old.nabble.com/ActiveMQ-.-Message-Endpoint-tp28768956p28768956.html
>>> >> Sent from the Camel Development mailing list archive at Nabble.com.
>>> >>
>>> >>
>>> >
>>> >
>>> >
>>> > --
>>> > Claus Ibsen
>>> > Apache Camel Committer
>>> >
>>> > Author of Camel in Action: http://www.manning.com/ibsen/
>>> > Open Source Integration: http://fusesource.com
>>> > Blog: http://davsclaus.blogspot.com/
>>> > Twitter: http://twitter.com/davsclaus
>>> >
>>> >
>>>
>>> --
>>> View this message in context:
>>> http://old.nabble.com/ActiveMQ-.-Message-Endpoint-tp28768956p28770926.html
>>> Sent from the Camel Development mailing list archive at Nabble.com.
>>>
>>>
>> 
>> 
>> -- 
>> Cheers,
>> Jon
>> 
>> Camel in Action: http://manning.com/ibsen
>> Blog: http://janstey.blogspot.com
>> 
>> 
> 
> 

-- 
View this message in context: http://old.nabble.com/ActiveMQ-.-Message-Endpoint-tp28768956p28882665.html
Sent from the Camel Development mailing list archive at Nabble.com.


Re: ActiveMQ . Message Endpoint

Posted by "fabian.alvarez" <fa...@ancap.com.uy>.
OK!


janstey wrote:
> 
> Yeah, you need to use Java to program in Camel. No idea if anyone has
> taken
> on the grueling task of porting Camel to C# out there :)
> 
> On Thu, Jun 3, 2010 at 3:25 PM, fabian.alvarez
> <fa...@ancap.com.uy>wrote:
> 
>>
>> Claus,
>>
>> so thank you very much by the quick response.
>>
>> I think it's just what I need. I'll try.
>> I only one question remains: Just work with Java language? or I can
>> program
>> in c #?
>>
>> Thank you very much again for the answer
>>
>> regards
>>
>> Fabian
>>
>>
>> Claus Ibsen-2 wrote:
>> >
>> > Hi
>> >
>> > The getting started example
>> > http://camel.apache.org/walk-through-an-example.html
>> >
>> > May inspire you a bit. All you essentially need is a route
>> >
>> > from(jms).to(myBeanWhichProcessTheData);
>> >
>> >
>> >
>> > On Thu, Jun 3, 2010 at 5:20 PM, fabian.alvarez <fa...@ancap.com.uy>
>> > wrote:
>> >>
>> >> Hello!
>> >> I'm working on a project in which we are using as a queue of messages:
>> >> ActiveMQ.
>> >> We need to do the following: the arrival of a message to the queue, at
>> >> the
>> >> endpoint, a service is triggered automatically
>> >> that consumes the message and process the data.
>> >> According to what I was investigating the EIP that we implement is the
>> >> Message Endpoint, but we have no tutorial
>> >> guide in the implementation.
>> >> I appreciate if someone can guide me in this implementation.
>> >> Fabian
>> >> --
>> >> View this message in context:
>> >>
>> http://old.nabble.com/ActiveMQ-.-Message-Endpoint-tp28768956p28768956.html
>> >> Sent from the Camel Development mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>> >
>> > --
>> > Claus Ibsen
>> > Apache Camel Committer
>> >
>> > Author of Camel in Action: http://www.manning.com/ibsen/
>> > Open Source Integration: http://fusesource.com
>> > Blog: http://davsclaus.blogspot.com/
>> > Twitter: http://twitter.com/davsclaus
>> >
>> >
>>
>> --
>> View this message in context:
>> http://old.nabble.com/ActiveMQ-.-Message-Endpoint-tp28768956p28770926.html
>> Sent from the Camel Development mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Cheers,
> Jon
> 
> Camel in Action: http://manning.com/ibsen
> Blog: http://janstey.blogspot.com
> 
> 

-- 
View this message in context: http://old.nabble.com/ActiveMQ-.-Message-Endpoint-tp28768956p28772523.html
Sent from the Camel Development mailing list archive at Nabble.com.


Re: ActiveMQ . Message Endpoint

Posted by Jon Anstey <ja...@gmail.com>.
Yeah, you need to use Java to program in Camel. No idea if anyone has taken
on the grueling task of porting Camel to C# out there :)

On Thu, Jun 3, 2010 at 3:25 PM, fabian.alvarez <fa...@ancap.com.uy>wrote:

>
> Claus,
>
> so thank you very much by the quick response.
>
> I think it's just what I need. I'll try.
> I only one question remains: Just work with Java language? or I can program
> in c #?
>
> Thank you very much again for the answer
>
> regards
>
> Fabian
>
>
> Claus Ibsen-2 wrote:
> >
> > Hi
> >
> > The getting started example
> > http://camel.apache.org/walk-through-an-example.html
> >
> > May inspire you a bit. All you essentially need is a route
> >
> > from(jms).to(myBeanWhichProcessTheData);
> >
> >
> >
> > On Thu, Jun 3, 2010 at 5:20 PM, fabian.alvarez <fa...@ancap.com.uy>
> > wrote:
> >>
> >> Hello!
> >> I'm working on a project in which we are using as a queue of messages:
> >> ActiveMQ.
> >> We need to do the following: the arrival of a message to the queue, at
> >> the
> >> endpoint, a service is triggered automatically
> >> that consumes the message and process the data.
> >> According to what I was investigating the EIP that we implement is the
> >> Message Endpoint, but we have no tutorial
> >> guide in the implementation.
> >> I appreciate if someone can guide me in this implementation.
> >> Fabian
> >> --
> >> View this message in context:
> >>
> http://old.nabble.com/ActiveMQ-.-Message-Endpoint-tp28768956p28768956.html
> >> Sent from the Camel Development mailing list archive at Nabble.com.
> >>
> >>
> >
> >
> >
> > --
> > Claus Ibsen
> > Apache Camel Committer
> >
> > Author of Camel in Action: http://www.manning.com/ibsen/
> > Open Source Integration: http://fusesource.com
> > Blog: http://davsclaus.blogspot.com/
> > Twitter: http://twitter.com/davsclaus
> >
> >
>
> --
> View this message in context:
> http://old.nabble.com/ActiveMQ-.-Message-Endpoint-tp28768956p28770926.html
> Sent from the Camel Development mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Jon

Camel in Action: http://manning.com/ibsen
Blog: http://janstey.blogspot.com

Re: ActiveMQ . Message Endpoint

Posted by "fabian.alvarez" <fa...@ancap.com.uy>.
Claus,

so thank you very much by the quick response.

I think it's just what I need. I'll try.
I only one question remains: Just work with Java language? or I can program
in c #?

Thank you very much again for the answer

regards

Fabian


Claus Ibsen-2 wrote:
> 
> Hi
> 
> The getting started example
> http://camel.apache.org/walk-through-an-example.html
> 
> May inspire you a bit. All you essentially need is a route
> 
> from(jms).to(myBeanWhichProcessTheData);
> 
> 
> 
> On Thu, Jun 3, 2010 at 5:20 PM, fabian.alvarez <fa...@ancap.com.uy>
> wrote:
>>
>> Hello!
>> I'm working on a project in which we are using as a queue of messages:
>> ActiveMQ.
>> We need to do the following: the arrival of a message to the queue, at
>> the
>> endpoint, a service is triggered automatically
>> that consumes the message and process the data.
>> According to what I was investigating the EIP that we implement is the
>> Message Endpoint, but we have no tutorial
>> guide in the implementation.
>> I appreciate if someone can guide me in this implementation.
>> Fabian
>> --
>> View this message in context:
>> http://old.nabble.com/ActiveMQ-.-Message-Endpoint-tp28768956p28768956.html
>> Sent from the Camel Development mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
> 
> 

-- 
View this message in context: http://old.nabble.com/ActiveMQ-.-Message-Endpoint-tp28768956p28770926.html
Sent from the Camel Development mailing list archive at Nabble.com.


Re: ActiveMQ . Message Endpoint

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

The getting started example
http://camel.apache.org/walk-through-an-example.html

May inspire you a bit. All you essentially need is a route

from(jms).to(myBeanWhichProcessTheData);



On Thu, Jun 3, 2010 at 5:20 PM, fabian.alvarez <fa...@ancap.com.uy> wrote:
>
> Hello!
> I'm working on a project in which we are using as a queue of messages:
> ActiveMQ.
> We need to do the following: the arrival of a message to the queue, at the
> endpoint, a service is triggered automatically
> that consumes the message and process the data.
> According to what I was investigating the EIP that we implement is the
> Message Endpoint, but we have no tutorial
> guide in the implementation.
> I appreciate if someone can guide me in this implementation.
> Fabian
> --
> View this message in context: http://old.nabble.com/ActiveMQ-.-Message-Endpoint-tp28768956p28768956.html
> Sent from the Camel Development mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus