Re: Apache >> Camel >> ActiveMq

2012-03-22 Thread sambardar
it is just a test for now. kpigeneratorBean simply sets a test message "From
KPI Bean" in the body of the message.

Basically it has just 1 line:  e.getOut().setBody("From KPI Bean"); In fact
if i route the message directly from netty component to the queue, i still
get the error.

--
View this message in context: 
http://camel.465427.n5.nabble.com/Apache-Camel-ActiveMq-tp5580552p5584987.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Apache >> Camel >> ActiveMq

2012-03-22 Thread Claus Ibsen
On Thu, Mar 22, 2012 at 9:00 AM, sambardar  wrote:
> it is just a test for now. kpigeneratorBean simply sets a test message "From
> KPI Bean" in the body of the message.
>
> Basically it has just 1 line:  e.getOut().setBody("From KPI Bean"); In fact
> if i route the message directly from netty component to the queue, i still
> get the error.
>

See this FAQ
http://camel.apache.org/using-getin-or-getout-methods-on-exchange.html

Rule of thumb, favor using getIn over getOut.


> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Apache-Camel-ActiveMq-tp5580552p5584987.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/


Re: org.apache.camel.RuntimeCamelException: org.apache.camel.TypeConverterLoaderException: Failed to load type converters because of: Cannot find any type converter classes from the following packages

2012-03-22 Thread soumya_sd
@Alexandre Thanks for looking into this. Can you give us an idea when the
next RC1 is planned ?  


--
View this message in context: 
http://camel.465427.n5.nabble.com/org-apache-camel-RuntimeCamelException-org-apache-camel-TypeConverterLoaderException-Failed-to-load--tp5575757p5585606.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: diagram generator

2012-03-22 Thread Nestor Urquiza
Hi Romain,

After reading
http://camel.465427.n5.nabble.com/diagram-generator-td4375588.html I said to
myself let me give a try to the plugin.

I have documented a couple of problems I have found so far:
http://code.google.com/p/rmannibucau/wiki/MavenRepository
http://code.google.com/p/rmannibucau/wiki/CamelDiagramGenerator

Thanks in advance. Your help with this is really appreciated.

Best,
-Nestor

--
View this message in context: 
http://camel.465427.n5.nabble.com/diagram-generator-tp4375588p5586112.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: diagram generator

2012-03-22 Thread Romain Manni-Bucau
Hi Nestor,

i think th eissues you ran into was mainly due to the fact i was using m2
last year and with m3 defaults changed.

regarding the generation from java it should work since the plugin simply
need to be able to load classes (did you run it after compile phase?)

- Romain


2012/3/22 Nestor Urquiza 

> Hi Romain,
>
> After reading
> http://camel.465427.n5.nabble.com/diagram-generator-td4375588.html I said
> to
> myself let me give a try to the plugin.
>
> I have documented a couple of problems I have found so far:
> http://code.google.com/p/rmannibucau/wiki/MavenRepository
> http://code.google.com/p/rmannibucau/wiki/CamelDiagramGenerator
>
> Thanks in advance. Your help with this is really appreciated.
>
> Best,
> -Nestor
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/diagram-generator-tp4375588p5586112.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Re: EJB and RSS Component in JBoss 7

2012-03-22 Thread Claus Ibsen
Hi

Sad to hear that using EJBs is still a  in 2012.

Have you configured the EjbComponent to specify the JndiContext it
need to lookup the EJBs?
http://camel.apache.org/ejb

And in the old EJB days you needed to have container specific
deployment configuration files.
I assume this is no longer needed, but you never know if there is
something there you can do.



On Wed, Mar 21, 2012 at 7:39 PM, Adrianos  Dadis  wrote:
> Hi all,
>
> I am trying to use RSS and EJB components together, inside new JBoss 7.1. I
> want the RSS component to consume some data from a real rss location and
> call an EJB with this data (using the EJB component).
>
> I have written 2 different routes that both of them call the same EJB, using
> its "name" value [@Stateless(name="MyEJBServiceImplName")].
> 1) SimpleRoute1:
> from("direct:myroute1").log("I got:
> ${body}").to("ejb:java:module/MyEJBServiceImplName?method=echo");
>
> 2) PollRoute2:
> from("rss:http://sample.com/feed/?consumer.delay=3";).log("I got:
> ${body}").to("ejb:java:module/MyEJBServiceImplName?method=echo");
>
> Both Camel context and EJB are in the same WAR. As you can see both Routes
> try to call the same EJB.
>
> I trigger SimpleRoute1, within another EJB, using the following code:
> myCamelContext.createProducerTemplate().requestBody("direct:myroute1", msg);
> This works and my "MyEJBServiceImplName" is called successfully.
>
> The PollRoute2 is triggered by itself as RSS component extends
> "ScheduledPollConsumer". This route fails with the following exception:
> org.apache.camel.NoSuchBeanException: No bean could be found in the registry
> for: java:module/MyEJBServiceImplName
>
> When SimpleRoute1 is invoked by another EJB, the JNDI Context contains the
> EJB that I want to call. But when PollRoute2 triggered, the JNDI Context
> does not contain the same EJB. Both Routes and both EJBs are in the same WAR
> file. The difference is that the first time the method
> "org.apache.camel.impl.JndiRegistry.createContext()" returns a JNDI Context
> that contains all the EJB of the WAR, but on the PollRoute2 case, the same
> method returns another Context that does NOT contain any EJB of the WAR.
>
> Do you have any idea why is this happening?
> The only thing that I suspect is the JBoss Modules, which have changed the
> Classloading procedure in JBoss.
>
> Notes: The prefix "java:module/" before EJB name ("
> java:module/MyEJBServiceImplName") is correct. This is how JBoss works.
>
> Environment:
> JDK: HotSpot 1.6.0_26
> Camel: 2.9
> JBoss AS: 7.1
> OS: GNU/Linux Debian wheezy
>
>
> Thanks in advance,
> Adrianos Dadis.
> --
> Democracy requires Free Software
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/EJB-and-RSS-Component-in-JBoss-7-tp5583762p5583762.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
CamelOne 2012 Conference, May 15-16, 2012: http://camelone.com
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/


Re: diagram generator

2012-03-22 Thread Nestor Urquiza
I see. I now run the example using:
mvn clean package exec:java -Dexec.mainClass=camelinaction.OrderRouter2


And at least I got:
[INFO] Trace
fr.rmannibucau.loader.spi.DiagramGeneratorRuntimeException: can't find
route inside camelinaction.OrderRouteBuilder directory.
at
fr.rmannibucau.camel.loader.CamelLoader.camelContextToDiagram(CamelLoader.java:73)
at fr.rmannibucau.camel.loader.CamelLoader.load(CamelLoader.java:31)
at fr.rmannibucau.DiagramGeneratorMojo.execute(DiagramGeneratorMojo.java:96)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: java.lang.Exception: can't find route inside
camelinaction.OrderRouteBuilder directory.
... 22 more

I then tested with other options:
src/main/java/camelinaction
src/main/java/camelinaction/OrderRouteBuilder.java

Without luck again. For the first case get for example:
[INFO] Trace
fr.rmannibucau.loader.spi.DiagramGeneratorRuntimeException: can't find
route inside src/main/java/camelinaction directory.





On Thu, Mar 22, 2012 at 10:42 AM, Romain Manni-Bucau [via Camel] <
ml-node+s465427n558620...@n5.nabble.com> wrote:

> Hi Nestor,
>
> i think th eissues you ran into was mainly due to the fact i was using m2
> last year and with m3 defaults changed.
>
> regarding the generation from java it should work since the plugin simply
> need to be able to load classes (did you run it after compile phase?)
>
> - Romain
>
>
> 2012/3/22 Nestor Urquiza <[hidden 
> email]>
>
>
> > Hi Romain,
> >
> > After reading
> > http://camel.465427.n5.nabble.com/diagram-generator-td4375588.html I
> said
> > to
> > myself let me give a try to the plugin.
> >
> > I have documented a couple of problems I have found so far:
> > http://code.google.com/p/rmannibucau/wiki/MavenRepository
> > http://code.google.com/p/rmannibucau/wiki/CamelDiagramGenerator
> >
> > Thanks in advance. Your help with this is really appreciated.
> >
> > Best,
> > -Nestor
> >
> > --
> > View this message in context:
> >
> http://camel.465427.n5.nabble.com/diagram-generator-tp4375588p5586112.html
> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >
>
>
> --
>  If you reply to this email, your message will be added to the discussion
> below:
> http://camel.465427.n5.nabble.com/diagram-generator-tp4375588p5586206.html
>  To unsubscribe from diagram generator, click 
> here
> .
> NAML
>


--
View this message in context: 
http://camel.465427.n5.nabble.com/diagram-generator-tp4375588p5586353.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to get header parameter in a to route of camel

2012-03-22 Thread Alex Anderson
> from( "jms:request")
>            .process(new AddHeader())
>            .to("cxfrs://http://abc.com/"; + < header (test)>)

Have you tried:

.to(simple("cxfrs://http://abc.com/${header.test}";))


Re: How to get header parameter in a to route of camel

2012-03-22 Thread atg roxx
Hi RNPG,

I check the links you have provided and they are really good, but they dont
seem to solve my problem.

I want to genreatet the URI in dynamic fashion. i.e  http://abc.zyz.com/

Can you suggest a way how to generate this uri.


--Regards,
atg roxx



On Thu, Mar 22, 2012 at 12:22 PM, Reuben Garrett wrote:

> atg,
>
> your use case reminds me of the Dynamic Router and Recipient List EIPs:
>
> http://camel.apache.org/dynamic-router.html
> http://camel.apache.org/recipient-list.html
> http://camel.apache.org/how-do-i-use-dynamic-uri-in-to.html
>
> is this helpful?
>
> ~ RNPG
>
>
> On Thursday, March 22, 2012, atg roxx  wrote:
> > I am doing some processing in a route before sending it to next end
> point.
> > and in that processor I am setting some header parameter which I want to
> > use to form the next route URL.
>


Re: How to get header parameter in a to route of camel

2012-03-22 Thread atg roxx
Hi Alex,

I doubt that we can  use simple within to. I am getting compilation error
for it.

Regards,
-atg roxx

On Thu, Mar 22, 2012 at 2:59 PM, Alex Anderson wrote:

> > from( "jms:request")
> >.process(new AddHeader())
> >.to("cxfrs://http://abc.com/"; + < header (test)>)
>
> Have you tried:
>
>.to(simple("cxfrs://http://abc.com/${header.test}";))
>


Re: How to get header parameter in a to route of camel

2012-03-22 Thread Marco Westermann

Hi,

you cannot use simple language in the to endpoint-uri, but you can use 
it in the recipientList!


from( "jms:request")
   .process(new AddHeader())
   .recipientList(simple("cxfrs://http://abc.com/${header.test}";));

regards,

Marco



Am 22.03.2012 16:13, schrieb atg roxx:

Hi Alex,

I doubt that we can  use simple within to. I am getting compilation error
for it.

Regards,
-atg roxx

On Thu, Mar 22, 2012 at 2:59 PM, Alex Andersonwrote:


from( "jms:request")
.process(new AddHeader())
.to("cxfrs://http://abc.com/"; +<  header (test)>)

Have you tried:

.to(simple("cxfrs://http://abc.com/${header.test}";))





Throttling: maximumRequestsPerPeriod problem

2012-03-22 Thread garrydias
Hi!

I´m trying to use Throttle in my xml CamelContext under 2.9 Camel version,
but when I set the /maximumRequestsPerPeriod/ property my compilation fails
displaying this message:
*cvc-complex-type.3.2.2: Attribute 'maximumRequestsPerPeriod' is not allowed
to appear in element 
 'camel:throttle'.*

if I delete the /maximumRequestsPerPeriod/ property my route fails at
runtime displaying this message:
*Caused by: java.lang.IllegalStateException: The maximumRequestsPerPeriod
must be a positive number, was: 0*

I can´t solve this problem.

Please. Help.

Thanx

--
View this message in context: 
http://camel.465427.n5.nabble.com/Throttling-maximumRequestsPerPeriod-problem-tp5586898p5586898.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Throttling: maximumRequestsPerPeriod problem

2012-03-22 Thread Marco Westermann

Hi,

did you see, that the syntax changed with camel 2.8:

see: http://camel.apache.org/throttler.html


3




regards, Marco


Am 22.03.2012 16:37, schrieb garrydias:

Hi!

I´m trying to use Throttle in my xml CamelContext under 2.9 Camel version,
but when I set the /maximumRequestsPerPeriod/ property my compilation fails
displaying this message:
*cvc-complex-type.3.2.2: Attribute 'maximumRequestsPerPeriod' is not allowed
to appear in element
 'camel:throttle'.*

if I delete the /maximumRequestsPerPeriod/ property my route fails at
runtime displaying this message:
*Caused by: java.lang.IllegalStateException: The maximumRequestsPerPeriod
must be a positive number, was: 0*

I can´t solve this problem.

Please. Help.

Thanx

--
View this message in context: 
http://camel.465427.n5.nabble.com/Throttling-maximumRequestsPerPeriod-problem-tp5586898p5586898.html
Sent from the Camel - Users mailing list archive at Nabble.com.





using MessageConverter with Bean

2012-03-22 Thread Xuan Huang
Hi,

I have in my RouteBuilder something like this:

public class MyRouteBuilder extends RouteBuilder{
private static final String 
IN_QUEUE="activemq:myqueue.in?messageConverter=#myMessageConverter";

@Override
public void configure(){
from(IN_QUEUE).choice()
.when(header("JMSType").isEqualTo("CommandType"))
.inOut("bean:messageListener?method=handleMessage")
.otherwise().to("activemq:myqueue.in.DLQ")
.routeId("jms-my-route");
}

}

The handleMessage method in MessageListener processes the input and generates a 
POJO which is set to the message body, but the Type in the JMS header is not 
set to the proper return type. What is the proper way of setting the message 
converter for the reply message?

Regards,
xuan

Re: diagram generator

2012-03-22 Thread Nestor Urquiza
I commented in the project page
http://code.google.com/p/rmannibucau/wiki/CamelDiagramGenerator

I have provided a sample project to test (added a couple of classes to the
source code for chapter2/cbr of Camel in Action Book). As I stated there the
URL for the sample project is
http://nestorurquiza.googlecode.com/svn/trunk/camelinaction-based-samples/chapter2/cbr/

--
View this message in context: 
http://camel.465427.n5.nabble.com/diagram-generator-tp4375588p5587197.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Orchestration with Camel

2012-03-22 Thread Hugo
Hi everyone,

I am wondering which advantages I could have using Camel for orchestration
tasks (like sequence of webservices calls) rather than Apache ODE ?

The only point I am aware right now, it is : with Camel I can do it in java
(even if Camel wasnot initially created for orchestration) and with ODE it
uses BPEL language.

My architecture is based on the ESB ServiceMix using ActiveMQ to receive
business task, Camel to transport and Camel or ODE for orchestration.

There are some limitations using one or the other ? Could somebody provide
me a projects feedback of a similar case ?

If I've got a high traffic, there is an impact on the use of one or the
other framework ?

Thanks in advance,

Regards,

--
View this message in context: 
http://camel.465427.n5.nabble.com/Orchestration-with-Camel-tp5587114p5587114.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: diagram generator

2012-03-22 Thread Romain Manni-Bucau
did you add in the conf:

java?


- Romain


2012/3/22 Nestor Urquiza 

> I see. I now run the example using:
> mvn clean package exec:java -Dexec.mainClass=camelinaction.OrderRouter2
>
>
> And at least I got:
> [INFO] Trace
> fr.rmannibucau.loader.spi.DiagramGeneratorRuntimeException: can't find
> route inside camelinaction.OrderRouteBuilder directory.
> at
>
> fr.rmannibucau.camel.loader.CamelLoader.camelContextToDiagram(CamelLoader.java:73)
> at fr.rmannibucau.camel.loader.CamelLoader.load(CamelLoader.java:31)
> at
> fr.rmannibucau.DiagramGeneratorMojo.execute(DiagramGeneratorMojo.java:96)
> at
>
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
> at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
> at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
> at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
> at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
> at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
> at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
> at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: java.lang.Exception: can't find route inside
> camelinaction.OrderRouteBuilder directory.
> ... 22 more
>
> I then tested with other options:
> src/main/java/camelinaction
> src/main/java/camelinaction/OrderRouteBuilder.java
>
> Without luck again. For the first case get for example:
> [INFO] Trace
> fr.rmannibucau.loader.spi.DiagramGeneratorRuntimeException: can't find
> route inside src/main/java/camelinaction directory.
>
>
>
>
>
> On Thu, Mar 22, 2012 at 10:42 AM, Romain Manni-Bucau [via Camel] <
> ml-node+s465427n558620...@n5.nabble.com> wrote:
>
> > Hi Nestor,
> >
> > i think th eissues you ran into was mainly due to the fact i was using m2
> > last year and with m3 defaults changed.
> >
> > regarding the generation from java it should work since the plugin simply
> > need to be able to load classes (did you run it after compile phase?)
> >
> > - Romain
> >
> >
> > 2012/3/22 Nestor Urquiza <[hidden email]<
> http://user/SendEmail.jtp?type=node&node=5586206&i=0>>
> >
> >
> > > Hi Romain,
> > >
> > > After reading
> > > http://camel.465427.n5.nabble.com/diagram-generator-td4375588.html I
> > said
> > > to
> > > myself let me give a try to the plugin.
> > >
> > > I have documented a couple of problems I have found so far:
> > > http://code.google.com/p/rmannibucau/wiki/MavenRepository
> > > http://code.google.com/p/rmannibucau/wiki/CamelDiagramGenerator
> > >
> > > Thanks in advance. Your help with this is really appreciated.
> > >
> > > Best,
> > > -Nestor
> > >
> > > --
> > > View this message in context:
> > >
> >
> http://camel.465427.n5.nabble.com/diagram-generator-tp4375588p5586112.html
> > > Sent from the Camel - Users mailing list archive at Nabble.com.
> > >
> >
> >
> > --
> >  If you reply to this email, your message will be added to the discussion
> > below:
> >
> http://camel.465427.n5.nabble.com/diagram-generator-tp4375588p5586206.html
> >  To unsubscribe from diagram generator, click here<
> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4375588&code=bmVzdG9yLnVycXVpemFAZ21haWwuY29tfDQzNzU1ODh8LTIwNDkyODYxNjE=
> >
> > .
> > NAML<
> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> >
> >
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/diagram-generator-tp4375588p5586353.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Re: Apache >> Camel >> ActiveMq

2012-03-22 Thread sambardar
It doesn't work even if i just send the message directly from netty endpoint
without modifying the body

--
View this message in context: 
http://camel.465427.n5.nabble.com/Apache-Camel-ActiveMq-tp5580552p5587190.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Throttling: maximumRequestsPerPeriod problem

2012-03-22 Thread garrydias
Yes!

I´ve tried:


*
 20
 
 *


and


*
 garryHeader
 
 *

both are displaying:
/Caused by: java.lang.IllegalStateException: The maximumRequestsPerPeriod
must be a positive number, was: 0/


--
View this message in context: 
http://camel.465427.n5.nabble.com/Throttling-maximumRequestsPerPeriod-problem-tp5586898p5587237.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Tomcat JDK 1.6 Recommend Memory Settings

2012-03-22 Thread chrislovecnm
Hi all

We are running these setting in production right now.  

JAVA_OPTS="-XX:+HeapDumpOnOutOfMemoryError -server -Xms1024m -Xmx1024m
-XX:MaxPermSize=256m -XX:+UseConcMarkSweepGC -XX:+DisableExplicitGC
-XX:+UseCompressedOops -Xss1024K -XX:NewSize=512m -XX:+CMSIncrementalMode
-XX:CMSInitiatingOccupancyFraction=80"

Would anyone recommend anything different

Sun JDK 

java version "1.6.0_31"
Java(TM) SE Runtime Environment (build 1.6.0_31-b04)
Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01, mixed mode)

Thanks

Chris


--
View this message in context: 
http://camel.465427.n5.nabble.com/Tomcat-JDK-1-6-Recommend-Memory-Settings-tp5587242p5587242.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: How to get header parameter in a to route of camel

2012-03-22 Thread atg roxx
Hi Marco,

I am facing a strange problem when using recipientList, the processor
method where I am setting the value in header is getting the input as the
appended value of the earlier request.

from( "jms:request")
   .process(new AddHeader("test"))
   .to("cxfrs://http://abc.com/"; +<  header (test)>)


Could you please  explain this or is it bug ?


-Regards,
atg roxx

On Thu, Mar 22, 2012 at 3:36 PM, Marco Westermann wrote:

> Hi,
>
> you cannot use simple language in the to endpoint-uri, but you can use it
> in the recipientList





> from( "jms:request")
>   .process(new AddHeader())
>   .recipientList(simple("cxfrs:/**/http://abc.com/${header.test}**
> "));
>
> regards,
>
> Marco
>
>
>
> Am 22.03.2012 16:13, schrieb atg roxx:
>
>  Hi Alex,
>>
>> I doubt that we can  use simple within to. I am getting compilation error
>> for it.
>>
>> Regards,
>> -atg roxx
>>
>> On Thu, Mar 22, 2012 at 2:59 PM, Alex Anderson> >wrote:
>>
>>  from( "jms:request")
.process(new AddHeader())
.to("cxfrs://http://abc.com/"; +<  header (test)>)

>>> Have you tried:
>>>
>>>
>>> .to(simple("cxfrs://http://**abc.com/${header.test}
>>> "))
>>>
>>>
>


Re: Orchestration with Camel

2012-03-22 Thread Hadrian Zbarcea
Camel was created for message processing. One of typical usecase for 
camel is business processes. The key points are:


* use of a higher level language to describe your business process: in 
ODE you have BPEL, in camel you don't, but you have EIPs (via a DSL 
supported in a few languages, including java and xml).
* camel is payload agnostic, can be any pojo, you can even use pojos for 
processing data, ODE uses (ultimately) xsd defined types, so a bit more 
complicated.
* camel is stateless (also scales better because of that), so if you 
need state you'd have to handle that yourself. Camel offers a few 
components that can help you with that though. ODE processes otoh are 
stateful.


Bottom line, it depends on your process and what you want to do, how you 
want to define (declare) your business logic, deploy, etc.


I hope this helps.
Hadrian


On 03/22/2012 12:36 PM, Hugo wrote:

Hi everyone,

I am wondering which advantages I could have using Camel for orchestration
tasks (like sequence of webservices calls) rather than Apache ODE ?

The only point I am aware right now, it is : with Camel I can do it in java
(even if Camel wasnot initially created for orchestration) and with ODE it
uses BPEL language.

My architecture is based on the ESB ServiceMix using ActiveMQ to receive
business task, Camel to transport and Camel or ODE for orchestration.

There are some limitations using one or the other ? Could somebody provide
me a projects feedback of a similar case ?

If I've got a high traffic, there is an impact on the use of one or the
other framework ?

Thanks in advance,

Regards,

--
View this message in context: 
http://camel.465427.n5.nabble.com/Orchestration-with-Camel-tp5587114p5587114.html
Sent from the Camel - Users mailing list archive at Nabble.com.


--
Hadrian Zbarcea
Principal Software Architect
Talend, Inc
http://coders.talend.com/
http://camelbot.blogspot.com/


RE: Orchestration with Camel

2012-03-22 Thread Omar Atia
Currently I have project to replace BPEL with activemq and Camel , avoid BPEL .

Enjoy the camel ride.

Thanks,

-Original Message-
From: Hugo [mailto:the_damned_an...@voila.fr] 
Sent: Thursday, March 22, 2012 6:36 PM
To: users@camel.apache.org
Subject: Orchestration with Camel

Hi everyone,

I am wondering which advantages I could have using Camel for orchestration 
tasks (like sequence of webservices calls) rather than Apache ODE ?

The only point I am aware right now, it is : with Camel I can do it in java 
(even if Camel wasnot initially created for orchestration) and with ODE it uses 
BPEL language.

My architecture is based on the ESB ServiceMix using ActiveMQ to receive 
business task, Camel to transport and Camel or ODE for orchestration.

There are some limitations using one or the other ? Could somebody provide me a 
projects feedback of a similar case ?

If I've got a high traffic, there is an impact on the use of one or the other 
framework ?

Thanks in advance,

Regards,

--
View this message in context: 
http://camel.465427.n5.nabble.com/Orchestration-with-Camel-tp5587114p5587114.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: diagram generator

2012-03-22 Thread Nestor Urquiza
I tried that but it fails even though the class is indeed in the specified
package:
Caused by: java.lang.ClassNotFoundException: camelinaction/OrderRouteBuilder
...
$ ls src/main/java/camelinaction/OrderRouteBuilder.java
src/main/java/camelinaction/OrderRouteBuilder.java


On Thu, Mar 22, 2012 at 12:58 PM, Romain Manni-Bucau [via Camel] <
ml-node+s465427n5587203...@n5.nabble.com> wrote:

> did you add in the conf:
>
> java?
>
>
>


--
View this message in context: 
http://camel.465427.n5.nabble.com/diagram-generator-tp4375588p5587482.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: diagram generator

2012-03-22 Thread Romain Manni-Bucau
The used class is the .class not the source.

- Romain

Le 22 mars 2012 19:36, "Nestor Urquiza"  a écrit :

> I tried that but it fails even though the class is indeed in the specified
> package:
> Caused by: java.lang.ClassNotFoundException:
> camelinaction/OrderRouteBuilder
> ...
> $ ls src/main/java/camelinaction/OrderRouteBuilder.java
> src/main/java/camelinaction/OrderRouteBuilder.java
>
>
> On Thu, Mar 22, 2012 at 12:58 PM, Romain Manni-Bucau [via Camel] <
> ml-node+s465427n5587203...@n5.nabble.com> wrote:
>
> > did you add in the conf:
> >
> > java?
> >
> >
> >
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/diagram-generator-tp4375588p5587482.html
> Sent from the Camel - Users mailing list archive at Nabble.com.


Re: diagram generator

2012-03-22 Thread Nestor Urquiza
Can you please tell me what the content of input should be for a class in
package camelinaction named OrderRouteBuilder?

I have tested with .class, with .java, without extension, using package
notation, using relative and absolute path notation and I always
get java.lang.ClassNotFoundException

I must be missing something really trivial here.

Thanks for your help,
-Nestor

On Thu, Mar 22, 2012 at 2:51 PM, Romain Manni-Bucau [via Camel] <
ml-node+s465427n5587511...@n5.nabble.com> wrote:

> The used class is the .class not the source.
>
> - Romain
>
> Le 22 mars 2012 19:36, "Nestor Urquiza" <[hidden 
> email]>
> a écrit :
>
> > I tried that but it fails even though the class is indeed in the
> specified
> > package:
> > Caused by: java.lang.ClassNotFoundException:
> > camelinaction/OrderRouteBuilder
> > ...
> > $ ls src/main/java/camelinaction/OrderRouteBuilder.java
> > src/main/java/camelinaction/OrderRouteBuilder.java
> >
> >
> > On Thu, Mar 22, 2012 at 12:58 PM, Romain Manni-Bucau [via Camel] <
> > [hidden email] >
> wrote:
> >
> > > did you add in the conf:
> > >
> > > java?
> > >
> > >
> > >
> >
> >
> > --
> > View this message in context:
> >
> http://camel.465427.n5.nabble.com/diagram-generator-tp4375588p5587482.html
>
> > Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
> --
>  If you reply to this email, your message will be added to the discussion
> below:
> http://camel.465427.n5.nabble.com/diagram-generator-tp4375588p5587511.html
>  To unsubscribe from diagram generator, click 
> here
> .
> NAML
>


--
View this message in context: 
http://camel.465427.n5.nabble.com/diagram-generator-tp4375588p5587524.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: diagram generator

2012-03-22 Thread Romain Manni-Bucau
Try running compile goal before generate goal.

- Romain

Le 22 mars 2012 19:58, "Nestor Urquiza"  a écrit :

> Can you please tell me what the content of input should be for a class in
> package camelinaction named OrderRouteBuilder?
>
> I have tested with .class, with .java, without extension, using package
> notation, using relative and absolute path notation and I always
> get java.lang.ClassNotFoundException
>
> I must be missing something really trivial here.
>
> Thanks for your help,
> -Nestor
>
> On Thu, Mar 22, 2012 at 2:51 PM, Romain Manni-Bucau [via Camel] <
> ml-node+s465427n5587511...@n5.nabble.com> wrote:
>
> > The used class is the .class not the source.
> >
> > - Romain
> >
> > Le 22 mars 2012 19:36, "Nestor Urquiza" <[hidden email]<
> http://user/SendEmail.jtp?type=node&node=5587511&i=0>>
> > a écrit :
> >
> > > I tried that but it fails even though the class is indeed in the
> > specified
> > > package:
> > > Caused by: java.lang.ClassNotFoundException:
> > > camelinaction/OrderRouteBuilder
> > > ...
> > > $ ls src/main/java/camelinaction/OrderRouteBuilder.java
> > > src/main/java/camelinaction/OrderRouteBuilder.java
> > >
> > >
> > > On Thu, Mar 22, 2012 at 12:58 PM, Romain Manni-Bucau [via Camel] <
> > > [hidden email] >
> > wrote:
> > >
> > > > did you add in the conf:
> > > >
> > > > java?
> > > >
> > > >
> > > >
> > >
> > >
> > > --
> > > View this message in context:
> > >
> >
> http://camel.465427.n5.nabble.com/diagram-generator-tp4375588p5587482.html
> >
> > > Sent from the Camel - Users mailing list archive at Nabble.com.
> >
> >
> > --
> >  If you reply to this email, your message will be added to the discussion
> > below:
> >
> http://camel.465427.n5.nabble.com/diagram-generator-tp4375588p5587511.html
> >  To unsubscribe from diagram generator, click here<
> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4375588&code=bmVzdG9yLnVycXVpemFAZ21haWwuY29tfDQzNzU1ODh8LTIwNDkyODYxNjE=
> >
> > .
> > NAML<
> http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml
> >
> >
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/diagram-generator-tp4375588p5587524.html
> Sent from the Camel - Users mailing list archive at Nabble.com.


Re: diagram generator

2012-03-22 Thread Nestor Urquiza
Not sure what you mean by "generate" goal. I can see the classes are
generated (compiled) before the plugin emits the error. So the classes are
indeed in the target/classes

$ mvn clean compile package exec:java
-Dexec.mainClass=camelinaction.OrderRouter2
...
[INFO] Building jar:
/Users/nestor/Downloads/camelinaction-source/chapter2/cbr/target/chapter2-cbr-1.0.0.jar
[INFO] [diagram-generator:diagram {execution: pack}]
[INFO]

[ERROR] FATAL ERROR
[INFO]

[INFO] can't load route class
camelinaction.OrderRouteBuilder.class
[INFO]

[INFO] Trace
fr.rmannibucau.loader.spi.DiagramGeneratorRuntimeException: can't load
route class
at
fr.rmannibucau.camel.loader.CamelLoader.camelContextToDiagram(CamelLoader.java:61)
at fr.rmannibucau.camel.loader.CamelLoader.load(CamelLoader.java:31)
at fr.rmannibucau.DiagramGeneratorMojo.execute(DiagramGeneratorMojo.java:96)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: java.lang.ClassNotFoundException:
camelinaction.OrderRouteBuilder.class
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at
org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195)
at
org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:255)
at
org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:274)
at
org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java:214)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at
fr.rmannibucau.camel.loader.CamelLoader.camelContextToDiagram(CamelLoader.java:59)


$ ls -al  target/classes/camelinaction/OrderRouteBuilder.class
-rw-r--r--  1 nestor  staff  1518 Mar 22 17:30
target/classes/camelinaction/OrderRouteBuilder.class

On Thu, Mar 22, 2012 at 5:16 PM, Romain Manni-Bucau [via Camel] <
ml-node+s465427n5587812...@n5.nabble.com> wrote:

> Try running compile goal before generate goal.
>
>


--
View this message in context: 
http://camel.465427.n5.nabble.com/diagram-generator-tp4375588p5587868.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: diagram generator

2012-03-22 Thread Romain Manni-Bucau
just pushed some changes:
1) the plugin name changed a bit to follow maven convention
2) fixing some classloading issues when running the plugin from the build
when the route builder is defined

here my conf:


http://maven.apache.org/POM/4.0.0"; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance";
 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd";>
  4.0.0
  com.camelinaction
  1.0.0
  chapter2-cbr
  Camel in Action :: Chapter 2 :: Content-Based Router
  

  org.apache.camel
  camel-core
  2.9.1


  org.apache.camel
  camel-jms
  2.9.1


  org.apache.activemq
  activemq-core
  5.5.1


  log4j
  log4j
  1.2.16


  org.slf4j
  slf4j-log4j12
  1.6.4

  
  

  
fr.rmannibucau
diagram-generator-maven-plugin
0.0.1-SNAPSHOT

  
pack
package

  diagram

  


  camelinaction.OrderRouteBuilder
  false
  480
  640
  target/diagram
  camel
  java
  png
  true


  
fr.rmannibucau
camel-loader
0.0.1-SNAPSHOT
  
  
org.apache.camel
camel-core
2.9.1
  
  
org.apache.camel
camel-jms
2.9.1
  
  
org.apache.activemq
activemq-core
5.5.1
  
  
log4j
log4j
1.2.16
  
  
org.slf4j
slf4j-log4j12
1.6.4
  

  
  
  
org.codehaus.mojo
exec-maven-plugin

  false

  

  



and here what i get: http://img11.hostingpics.net/pics/623821camel.png

- Romain


2012/3/22 Nestor Urquiza 

> Not sure what you mean by "generate" goal. I can see the classes are
> generated (compiled) before the plugin emits the error. So the classes are
> indeed in the target/classes
>
> $ mvn clean compile package exec:java
> -Dexec.mainClass=camelinaction.OrderRouter2
> ...
> [INFO] Building jar:
>
> /Users/nestor/Downloads/camelinaction-source/chapter2/cbr/target/chapter2-cbr-1.0.0.jar
> [INFO] [diagram-generator:diagram {execution: pack}]
> [INFO]
> 
> [ERROR] FATAL ERROR
> [INFO]
> 
> [INFO] can't load route class
> camelinaction.OrderRouteBuilder.class
> [INFO]
> 
> [INFO] Trace
> fr.rmannibucau.loader.spi.DiagramGeneratorRuntimeException: can't load
> route class
> at
>
> fr.rmannibucau.camel.loader.CamelLoader.camelContextToDiagram(CamelLoader.java:61)
> at fr.rmannibucau.camel.loader.CamelLoader.load(CamelLoader.java:31)
> at
> fr.rmannibucau.DiagramGeneratorMojo.execute(DiagramGeneratorMojo.java:96)
> at
>
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
> at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
> at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
> at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
> at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
> at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
> at
>
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
> at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
> at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
> at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
> at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
> Caused by: java.lang.ClassNotFoundException:
> camelinaction.OrderRouteBuilder.class
> at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
> at java.security.AccessController.doPrivileged(Native Me