Re: Using EJB 3.1 @Startup to start Camel

2012-06-13 Thread Charles Moulliard
As JBoss AS7 uses Weld (CDI injection), you should not have any issues

On Wed, Jun 13, 2012 at 8:39 PM, Bruno Borges wrote:

> We will probably put the application under JBoss AS 7, because the Ops team
> is already skilled and manages JBoss v5.1 instances around here.
>
> Is there something I should be aware of?
>
> *Bruno Borges*
> (21) 7672-7099
> *www.brunoborges.com*
>
>
>
> On Wed, Jun 13, 2012 at 1:20 PM, Charles Moulliard  >wrote:
>
> > Project runs in Glassfish + Weld.
> >
> > In which J2EE App Server do you plan to deploy camel - cdi ?
> >
> > On Wed, Jun 13, 2012 at 6:14 PM, Bruno Borges  > >wrote:
> >
> > > Awesome! Thanks!
> > >
> > > *Bruno Borges*
> > > (21) 7672-7099
> > > *www.brunoborges.com*
> > >
> > >
> > >
> > > On Wed, Jun 13, 2012 at 12:59 PM, Charles Moulliard <
> > cmoulli...@gmail.com
> > > >wrote:
> > >
> > > > Hi Bruno,
> > > >
> > > > You can find an example here :
> > > > https://github.com/cmoulliard/cdi-camel-example/
> > > >
> > > > Regards,
> > > >
> > > > Charles Moulliard
> > > >
> > > > Apache Committer
> > > >
> > > > Blog : http://cmoulliard.blogspot.com
> > > > Twitter : http://twitter.com/cmoulliard
> > > > Linkedin : http://www.linkedin.com/in/charlesmoulliard
> > > > Skype: cmoulliard
> > > >
> > > >
> > > > On Wed, Jun 13, 2012 at 5:56 PM, Bruno Borges <
> bruno.bor...@gmail.com
> > > > >wrote:
> > > >
> > > > > Has anyone done this before?
> > > > >
> > > > > This it work to start / stop Camel?
> > > > >
> > > > > Really looking forward to NOT using a web module just to load Camel
> > :-)
> > > > >
> > > > > *Bruno Borges*
> > > > > (21) 7672-7099
> > > > > *www.brunoborges.com*
> > > > >
> > > >
> > >
> >
>


RE: Split, filter, aggregate zero messages

2012-06-13 Thread Gordienko, Max
Hi Claus,

> In the aggregation strategy you can decide whatever you want and how
you want to join the pieces together.
> If some of those pieces should not, due to a filter, then just skip
that, and return the old exchange.

This approach works, thank you!

But dont you think we are asking AggregationStrategy do too much - MERGE
and FILTER the pieces?
Breaks the single responsibility principle...

  Max

"This e-mail and any attachments to it (the "Communication") is, unless 
otherwise stated, confidential,  may contain copyright material and is for the 
use only of the intended recipient. If you receive the Communication in error, 
please notify the sender immediately by return e-mail, delete the Communication 
and the return e-mail, and do not read, copy, retransmit or otherwise deal with 
it. Any views expressed in the Communication are those of the individual sender 
only, unless expressly stated to be those of Australia and New Zealand Banking 
Group Limited ABN 11 005 357 522, or any of its related entities including ANZ 
National Bank Limited (together "ANZ"). ANZ does not accept liability in 
connection with the integrity of or errors in the Communication, computer 
virus, data corruption, interference or delay arising from or in respect of the 
Communication."


Re: dynamic property keys

2012-06-13 Thread Claus Ibsen
On Wed, Jun 13, 2012 at 7:29 PM, paramjyotsingh wrote:

> I am trying to read a property with dynamic property key
>
> i have property like
>
> 1234_host=
> 1234_port=
>
> where "1234" is group code, and it it dynamic, i will extract it from input
> file i receive and consume service running at this host
>
> i have configuration like
>
> 
>  
>  
>  
>{{${in.header.groupID}_host}}
>  
>  
>{{${in.header.groupID}_port}}
>  
>  
>
>
Can you try with simple instead of the constant
${properties:${header.groupID}_host}




> cxfrs://http://
> ${header.groupHost}:${header.groupPort}/item/${in.header.itemId}
>  
> 
>
> But reading property with dynamic key does not works this way.
>
> Can someone please help me about how to read properties with dynamic keys
> in
> camel spring DSL.
>
> Thanks and Regards,
> Paramjyot Singh
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/dynamic-property-keys-tp5714449.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: testing: intercept route and process() *after* its completion?

2012-06-13 Thread Claus Ibsen
On Thu, Jun 14, 2012 at 2:54 AM, twelve17  wrote:

> Hello,
>
> I've been diving into Camel testing lately, which, I'm not gonna lie, has
> been quite fun.  Thanks to the Camel book for assistance. :)
>
> I did run into one hangup in which I am not sure what the best
> pattern/practice is.
>
> For my integration testing, I am using adviceWith() to "inject" processing
> into an existing route.  The routebuilder class looks something like:
>
>  @Override
>  public void configure() throws Exception {
> interceptSendToEndpoint("bean:someEndpointToBeTested").process(new
> DoSomeAssertionProcessor());
> }
>
> The code above runs the processor before the intercepted endpoint.   What I
> would like to do is call a processor *after* the intercepted bean is
> completed, so I can verify that the data it produced matches some expected
> data set.  For the moment, I am using the above pattern to intercept the
> endpoint that follows the actual one I want to test, which seems a little
> fragile to me.
>
> I tried using "interceptFrom", but it does not get triggered, which makes
> me
> believe it is only triggered if you are intercepting an input route, versus
> matching an output route as if it were "from", from the perspective of when
> the pipeline moves to the following route.
>
> Am I making any sense here? :)
>
> Any help would be appreciated.
>
>
I read this as you want to do some kind of AOP around the sending a message
to a given endpoint?
We could possible make that a bit easier from testing point of view.

What you can do with the advice with, and code you posted above is to
- enable the skip sending to endpoint option
- do assertion before
- send manually to the endpoint
- do assertion afterwards





> Thanks,
>
> Alex
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/testing-intercept-route-and-process-after-its-completion-tp5714460.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: [Discuss] Camel routes - java based needs maximumredeliveries configurable @ runtime

2012-06-13 Thread Claus Ibsen
Hi

Yes the Camel error handlers is enlisted in JMX, where you can change their
settings at runtime.


On Wed, Jun 13, 2012 at 8:02 PM, appleongo  wrote:

> Camel version 2.8.3
>
> Routes - java based
>
> Request for info:
> Are there any options for making maximumredeliveries# configurable @ run
> Time through jMX or external properties file without restarting the
> camelContext?
>
> Only option i have seen so far is using only retrywhile -> bean set the
> @Header(REDELIVERY_COUNTER).
>
> Are there any better/other option?
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Discuss-Camel-routes-java-based-needs-maximumredeliveries-configurable-runtime-tp5714451.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Camel IMAP

2012-06-13 Thread Claus Ibsen
Hi

If you use Camel to send the email, you can use interceptors to do some
work before sending.
http://camel.apache.org/intercept

This requires you are using Camel routes, to let the interceptors be able
to kick-in.


On Wed, Jun 13, 2012 at 9:23 PM, Dokkana  wrote:

> can i intercept using Camel between the mail client and mail server. in a
> case that when the client send smtp i change message contenet apply some
> rules to define the (TO,CC) before go's to the smtp server also when the
> client request emails through IMAP or POP3 i can change the mail Continent
> before it go's to the clien
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-IMAP-tp5714453.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Camel Lifecycle question

2012-06-13 Thread Claus Ibsen
Hi

See this page
http://camel.apache.org/lifecycle.html

When Camel starts a route, it starts the
components/endpoints/producers/services first.
And the route consumer itself afterwards. So that is why you see that given
order.

But a person can manually create a consumer from the endpoint, and start
that, before
he/she creates a producer and starts that. So there is no guarantee. It
depends on the use-case.


On Wed, Jun 13, 2012 at 9:52 PM, gilboy  wrote:

> Hi
>
> I have a custom endpoint which has both a consumer and a producer.
>
> When a new instance of the endpoint and its producer and consumer is
> created
> I want to perform a particular action.
>
> I am trying to determine if there is any callback method on the endpoint,
> consumer and producer which might indicate this state has been reached.
> From
> debugging through the code I see the doStart() methods invoked in the
> following flow:
>
> (1) Endpoint.doStart()
> (2) Producer.doStart()
> (3) Consumer.doStart()
>
> Hence, I am thinking I could invoke the action in the Consumer.doStart()
> method.
>
> Am I guaranteed that the Consumer.doStart() will always be invoked after
> the
> Producer.doStart()?
>
> Thanks
> Joe
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-Lifecycle-question-tp5714458.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


testing: intercept route and process() *after* its completion?

2012-06-13 Thread twelve17
Hello,

I've been diving into Camel testing lately, which, I'm not gonna lie, has
been quite fun.  Thanks to the Camel book for assistance. :)

I did run into one hangup in which I am not sure what the best
pattern/practice is.  

For my integration testing, I am using adviceWith() to "inject" processing
into an existing route.  The routebuilder class looks something like:

 @Override
 public void configure() throws Exception {
 interceptSendToEndpoint("bean:someEndpointToBeTested").process(new
DoSomeAssertionProcessor());
}

The code above runs the processor before the intercepted endpoint.   What I
would like to do is call a processor *after* the intercepted bean is
completed, so I can verify that the data it produced matches some expected
data set.  For the moment, I am using the above pattern to intercept the
endpoint that follows the actual one I want to test, which seems a little
fragile to me. 

I tried using "interceptFrom", but it does not get triggered, which makes me
believe it is only triggered if you are intercepting an input route, versus
matching an output route as if it were "from", from the perspective of when
the pipeline moves to the following route.

Am I making any sense here? :)

Any help would be appreciated.

Thanks,

Alex 


--
View this message in context: 
http://camel.465427.n5.nabble.com/testing-intercept-route-and-process-after-its-completion-tp5714460.html
Sent from the Camel - Users mailing list archive at Nabble.com.


[Discuss] Camel routes - java based needs maximumredeliveries configurable @ runtime

2012-06-13 Thread appleongo
Camel version 2.8.3

Routes - java based 

Request for info:
Are there any options for making maximumredeliveries# configurable @ run
Time through jMX or external properties file without restarting the
camelContext? 

Only option i have seen so far is using only retrywhile -> bean set the
@Header(REDELIVERY_COUNTER).

Are there any better/other option?

--
View this message in context: 
http://camel.465427.n5.nabble.com/Discuss-Camel-routes-java-based-needs-maximumredeliveries-configurable-runtime-tp5714451.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel Component - Consumer Threading Question

2012-06-13 Thread Claus Ibsen
On Wed, Jun 13, 2012 at 9:21 PM, gilboy  wrote:

> Thanks for your input on this thread Claus.
>
> Just to confirm I understand you correctly, the Consumer would look
> something like:
>
> /class CustomConsumer extends DefaultConsumer implements Runnable{
>
>   ExecutorService service;
>
>   CustomConsumer(EndPoint endPoint, Processor processor){
>  super(endPoint, processor);
>   }
>
>   protected void doStart() throws Exception{
>  super.doStart();
>  executor = getCamelContext().getExecutorServiceManager()
>  .newFixedThreadPool(this, "ConsumerThread", 1)
>  executor.execute(this);
>   }
>
>   public void run(){
>   //Do Processing
>   }
> }/
>
>
Yes and then stop the executor in the doStop method, there is a method on
executor service manager to do that (eg shutdown)


> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-Component-Consumer-Threading-Question-tp5714233p5714452.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Camel IMAP

2012-06-13 Thread Dokkana
can i intercept using Camel between the mail client and mail server. in a
case that when the client send smtp i change message contenet apply some
rules to define the (TO,CC) before go's to the smtp server also when the
client request emails through IMAP or POP3 i can change the mail Continent
before it go's to the clien

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


dynamic property keys

2012-06-13 Thread paramjyotsingh
I am trying to read a property with dynamic property key

i have property like 

1234_host=
1234_port=

where "1234" is group code, and it it dynamic, i will extract it from input
file i receive and consume service running at this host

i have configuration like


  
  
  
{{${in.header.groupID}_host}}
  
  
{{${in.header.groupID}_port}}
  
   
   
cxfrs://http://${header.groupHost}:${header.groupPort}/item/${in.header.itemId}
  


But reading property with dynamic key does not works this way. 

Can someone please help me about how to read properties with dynamic keys in
camel spring DSL.

Thanks and Regards,
Paramjyot Singh

--
View this message in context: 
http://camel.465427.n5.nabble.com/dynamic-property-keys-tp5714449.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: XPath Filter not working

2012-06-13 Thread paramjyotsingh
I am getting this email from external source, Is there any other way to
resolve this issue. Other wise i have to make some code tweaks/ or have to
come up with some logic in bean it self.

--
View this message in context: 
http://camel.465427.n5.nabble.com/XPath-Filter-not-working-tp5714310p5714448.html
Sent from the Camel - Users mailing list archive at Nabble.com.


HTTP4 component cannot resolve DNS

2012-06-13 Thread Diyko
I have HTTP4 endpoint which works fine for all addresses except one (throw
Exhausted after delivery attempt: 1 caught:
java.lang.IllegalArgumentException: Invalid uri: 
http://weburl.net:8080/handler.jsp)
For this one endpoint works only URL contains IP not domain name
Similar behavior for http(throw timeout connection) and jetty components
(throw null pointer)

--
View this message in context: 
http://camel.465427.n5.nabble.com/HTTP4-component-cannot-resolve-DNS-tp5714441.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel Lifecycle question

2012-06-13 Thread gilboy
Hi

I have a custom endpoint which has both a consumer and a producer. 

When a new instance of the endpoint and its producer and consumer is created
I want to perform a particular action.

I am trying to determine if there is any callback method on the endpoint,
consumer and producer which might indicate this state has been reached. From
debugging through the code I see the doStart() methods invoked in the
following flow:

(1) Endpoint.doStart()
(2) Producer.doStart()
(3) Consumer.doStart()

Hence, I am thinking I could invoke the action in the Consumer.doStart()
method.

Am I guaranteed that the Consumer.doStart() will always be invoked after the
Producer.doStart()?

Thanks
Joe

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


Re: Using EJB 3.1 @Startup to start Camel

2012-06-13 Thread Bruno Borges
We will probably put the application under JBoss AS 7, because the Ops team
is already skilled and manages JBoss v5.1 instances around here.

Is there something I should be aware of?

*Bruno Borges*
(21) 7672-7099
*www.brunoborges.com*



On Wed, Jun 13, 2012 at 1:20 PM, Charles Moulliard wrote:

> Project runs in Glassfish + Weld.
>
> In which J2EE App Server do you plan to deploy camel - cdi ?
>
> On Wed, Jun 13, 2012 at 6:14 PM, Bruno Borges  >wrote:
>
> > Awesome! Thanks!
> >
> > *Bruno Borges*
> > (21) 7672-7099
> > *www.brunoborges.com*
> >
> >
> >
> > On Wed, Jun 13, 2012 at 12:59 PM, Charles Moulliard <
> cmoulli...@gmail.com
> > >wrote:
> >
> > > Hi Bruno,
> > >
> > > You can find an example here :
> > > https://github.com/cmoulliard/cdi-camel-example/
> > >
> > > Regards,
> > >
> > > Charles Moulliard
> > >
> > > Apache Committer
> > >
> > > Blog : http://cmoulliard.blogspot.com
> > > Twitter : http://twitter.com/cmoulliard
> > > Linkedin : http://www.linkedin.com/in/charlesmoulliard
> > > Skype: cmoulliard
> > >
> > >
> > > On Wed, Jun 13, 2012 at 5:56 PM, Bruno Borges  > > >wrote:
> > >
> > > > Has anyone done this before?
> > > >
> > > > This it work to start / stop Camel?
> > > >
> > > > Really looking forward to NOT using a web module just to load Camel
> :-)
> > > >
> > > > *Bruno Borges*
> > > > (21) 7672-7099
> > > > *www.brunoborges.com*
> > > >
> > >
> >
>


Re: Camel Component - Consumer Threading Question

2012-06-13 Thread gilboy
Thanks for your input on this thread Claus.

Just to confirm I understand you correctly, the Consumer would look
something like:

/class CustomConsumer extends DefaultConsumer implements Runnable{

   ExecutorService service;

   CustomConsumer(EndPoint endPoint, Processor processor){
  super(endPoint, processor);
   }

   protected void doStart() throws Exception{
  super.doStart();
  executor = getCamelContext().getExecutorServiceManager()
  .newFixedThreadPool(this, "ConsumerThread", 1)
  executor.execute(this);  
   }

   public void run(){
   //Do Processing
   }
}/

--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Component-Consumer-Threading-Question-tp5714233p5714452.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Using EJB 3.1 @Startup to start Camel

2012-06-13 Thread Charles Moulliard
Project runs in Glassfish + Weld.

In which J2EE App Server do you plan to deploy camel - cdi ?

On Wed, Jun 13, 2012 at 6:14 PM, Bruno Borges wrote:

> Awesome! Thanks!
>
> *Bruno Borges*
> (21) 7672-7099
> *www.brunoborges.com*
>
>
>
> On Wed, Jun 13, 2012 at 12:59 PM, Charles Moulliard  >wrote:
>
> > Hi Bruno,
> >
> > You can find an example here :
> > https://github.com/cmoulliard/cdi-camel-example/
> >
> > Regards,
> >
> > Charles Moulliard
> >
> > Apache Committer
> >
> > Blog : http://cmoulliard.blogspot.com
> > Twitter : http://twitter.com/cmoulliard
> > Linkedin : http://www.linkedin.com/in/charlesmoulliard
> > Skype: cmoulliard
> >
> >
> > On Wed, Jun 13, 2012 at 5:56 PM, Bruno Borges  > >wrote:
> >
> > > Has anyone done this before?
> > >
> > > This it work to start / stop Camel?
> > >
> > > Really looking forward to NOT using a web module just to load Camel :-)
> > >
> > > *Bruno Borges*
> > > (21) 7672-7099
> > > *www.brunoborges.com*
> > >
> >
>


Re: Using EJB 3.1 @Startup to start Camel

2012-06-13 Thread Bruno Borges
Awesome! Thanks!

*Bruno Borges*
(21) 7672-7099
*www.brunoborges.com*



On Wed, Jun 13, 2012 at 12:59 PM, Charles Moulliard wrote:

> Hi Bruno,
>
> You can find an example here :
> https://github.com/cmoulliard/cdi-camel-example/
>
> Regards,
>
> Charles Moulliard
>
> Apache Committer
>
> Blog : http://cmoulliard.blogspot.com
> Twitter : http://twitter.com/cmoulliard
> Linkedin : http://www.linkedin.com/in/charlesmoulliard
> Skype: cmoulliard
>
>
> On Wed, Jun 13, 2012 at 5:56 PM, Bruno Borges  >wrote:
>
> > Has anyone done this before?
> >
> > This it work to start / stop Camel?
> >
> > Really looking forward to NOT using a web module just to load Camel :-)
> >
> > *Bruno Borges*
> > (21) 7672-7099
> > *www.brunoborges.com*
> >
>


Re: Using EJB 3.1 @Startup to start Camel

2012-06-13 Thread Charles Moulliard
Hi Bruno,

You can find an example here :
https://github.com/cmoulliard/cdi-camel-example/

Regards,

Charles Moulliard

Apache Committer

Blog : http://cmoulliard.blogspot.com
Twitter : http://twitter.com/cmoulliard
Linkedin : http://www.linkedin.com/in/charlesmoulliard
Skype: cmoulliard


On Wed, Jun 13, 2012 at 5:56 PM, Bruno Borges wrote:

> Has anyone done this before?
>
> This it work to start / stop Camel?
>
> Really looking forward to NOT using a web module just to load Camel :-)
>
> *Bruno Borges*
> (21) 7672-7099
> *www.brunoborges.com*
>


KeepAlive for HttpComponent

2012-06-13 Thread Diyko
Is it possible set keepAlive=false fro http request
I have to close connection immediately after sending it


--
View this message in context: 
http://camel.465427.n5.nabble.com/KeepAlive-for-HttpComponent-tp5714436.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Adding Dependencies in pom.xml

2012-06-13 Thread Christian Schneider

You have to add the ojdbc jar to your local maven repo:

mvn install:install-file 
-Dfile="C:\oraclexe\app\oracle\product\11.2.0\server\jdbc\lib\ojdbc6.jar" -DgroupId=ojdbc 
-DartifactId=ojdbc -Dversion=11.2.0.2.0 -Dpackaging=jar


Christian

Am 13.06.2012 14:27, schrieb Subhanjan:



I am creating a project which will have database at its back end. For that I
need ojdbc.jar. The problem is whenever I add ojdbc14.jar dependency and
save in pom.xml (I use m2eclipse plugin) it gives me a weird error 'Missing
artifact com.oracle:ojdbc14:jar:10.2.0.3.0:compile'. whenever I remove this
jar file from pom.xml the error disappears. I don't get why this is
happening ?? What is the solution for this ???

Somepne plz give me any solution.


--
View this message in context: 
http://camel.465427.n5.nabble.com/Adding-Dependencies-in-pom-xml-tp5714425.html
Sent from the Camel - Users mailing list archive at Nabble.com.



--
Christian Schneider
http://www.liquid-reality.de

Open Source Architect
Talend Application Integration Division http://www.talend.com



Re: classloading in jboss and activemq component

2012-06-13 Thread Claus Ibsen
On Wed, Jun 13, 2012 at 3:43 PM, anoordover  wrote:

> Can you explain how the cache level is shared among several war's?
> I can not find any static fields that contain this level.
> In what class can I find this?
>
>
You can set it on the JmsComponent, so you need to set that in each WAR.
But then you only need to do that once per WAR


>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/classloading-in-jboss-and-activemq-component-tp5714418p5714433.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: classloading in jboss and activemq component

2012-06-13 Thread anoordover
Can you explain how the cache level is shared among several war's?
I can not find any static fields that contain this level.
In what class can I find this?


--
View this message in context: 
http://camel.465427.n5.nabble.com/classloading-in-jboss-and-activemq-component-tp5714418p5714433.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel annotations broken under JDK7?

2012-06-13 Thread Claus Ibsen
On Wed, Jun 13, 2012 at 3:07 PM, Emil  wrote:

> Hi Claus,
>
> Thanks for the quick reply!
>
> I took the latest snapshot of 2.10 and tested with that, and everything
> seems to work as expected under JDK7. I must've missed the snapshot
> availability, but I'll stick with that one.
>
>
Camel 2.10 is expected to be released later this month. So its around the
corner.



> Thanks again,
> Emil
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-annotations-broken-under-JDK7-tp5714427p5714431.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Camel annotations broken under JDK7?

2012-06-13 Thread Emil
Hi Claus,

Thanks for the quick reply! 

I took the latest snapshot of 2.10 and tested with that, and everything
seems to work as expected under JDK7. I must've missed the snapshot
availability, but I'll stick with that one. 

Thanks again,
Emil

--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-annotations-broken-under-JDK7-tp5714427p5714431.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel annotations broken under JDK7?

2012-06-13 Thread Claus Ibsen
You need to use 2.10 to have JDK7 supported.
So what version of Camel do you use?

The annotations works fine for us, all the unit tests passes. As well the
examples works.


On Wed, Jun 13, 2012 at 2:36 PM, Emil  wrote:

> Hi Camel Users,
>
> In a proof of concept I was setting up on JDK7, I was having major issues
> trying to get things to work under JDK7 (using Camel & Gigaspaces). I
> assumed at first that something was wrong with my routes, my annotations,
> my
> config etc, but after seeing the following on the Camel Jira;
>
> https://issues.apache.org/jira/browse/CAMEL-4955
>
> I decided to test everything under JDK6 and suddenly everything worked as
> intended.
>
> In essence, the issue was that a XML-configured bean that has a
> @Consumer(uri = "direct:messageConsumer") method would not be detected by
> Camel as a consumer, and Camel would thus throw exceptions claiming there's
> no consumer on that route. However under JDK6 the exact same thing works
> without a hitch.
>
> So, I was wondering if anyone else has run into issues with Camel
> annotations under JDK7 and/or if the Camel team is aware of it? I don't see
> anything specific in that Jira that talks about annotations, so I thought
> I'd make a post and check with others before I raise it higher.
>
> Cheers,
> Emil
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-annotations-broken-under-JDK7-tp5714427.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: classloading in jboss and activemq component

2012-06-13 Thread Claus Ibsen
On Wed, Jun 13, 2012 at 12:58 PM, anoordover  wrote:

> I recall that allthough the classloading in camel 2.8 is resolved in camel
> for JBoss that in that version of activemq there still remained an issue
> with classloading in the activemq component.
> I recall that there was an jira issue created. Can anybody help me to find
> it.
> This issue is a blocker for us to easily migrate to another camel version.
> I
> want to find out whether this is solved or not and in what version.
>
>
Its fixed in AMQ 5.6.0, not in 5.5.1 or older.



> We also have an issue with our asynch redelivered routes in newer versions
> of camel.
> This issue is about the cachelevel having another default setting. Can we
> set this using a system wide system-property?
> If we can't do that we need to redeploy all our camel war's.
> see https://issues.apache.org/jira/browse/CAMEL-3828
>
>
No, you can set the cache levels on the component level though, so you only
need to sett it once.



>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/classloading-in-jboss-and-activemq-component-tp5714418.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Camel annotations broken under JDK7?

2012-06-13 Thread Emil
Hi Camel Users,

In a proof of concept I was setting up on JDK7, I was having major issues
trying to get things to work under JDK7 (using Camel & Gigaspaces). I
assumed at first that something was wrong with my routes, my annotations, my
config etc, but after seeing the following on the Camel Jira;

https://issues.apache.org/jira/browse/CAMEL-4955

I decided to test everything under JDK6 and suddenly everything worked as
intended. 

In essence, the issue was that a XML-configured bean that has a
@Consumer(uri = "direct:messageConsumer") method would not be detected by
Camel as a consumer, and Camel would thus throw exceptions claiming there's
no consumer on that route. However under JDK6 the exact same thing works
without a hitch.

So, I was wondering if anyone else has run into issues with Camel
annotations under JDK7 and/or if the Camel team is aware of it? I don't see
anything specific in that Jira that talks about annotations, so I thought
I'd make a post and check with others before I raise it higher.

Cheers,
Emil

--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-annotations-broken-under-JDK7-tp5714427.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: How to tirgger camel after inserting a row into a database?

2012-06-13 Thread James Carman
You can poll the database using the jpa component
On Jun 13, 2012 7:54 AM, "semecamel"  wrote:

> I would like to know how I can trigger my route after inserting a row. My
> situation is that I need to listen for insert after I need to generate hl7
> message.
>
> Any idea how to trigger route after database insert?
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/How-to-tirgger-camel-after-inserting-a-row-into-a-database-tp5714423.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


Re: Adding Dependencies in pom.xml

2012-06-13 Thread Achim Nierbeck
well, it's not really camel related, but do you have a maven artefact
for the oracle driver,
cause there is no official released oracle driver available on maven
repositories (AFAIK)

regards, Achim

2012/6/13 Subhanjan :
>
>
>
> I am creating a project which will have database at its back end. For that I
> need ojdbc.jar. The problem is whenever I add ojdbc14.jar dependency and
> save in pom.xml (I use m2eclipse plugin) it gives me a weird error 'Missing
> artifact com.oracle:ojdbc14:jar:10.2.0.3.0:compile'. whenever I remove this
> jar file from pom.xml the error disappears. I don't get why this is
> happening ?? What is the solution for this ???
>
> Somepne plz give me any solution.
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Adding-Dependencies-in-pom-xml-tp5714425.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 

Apache Karaf  Committer & PMC
OPS4J Pax Web 
Committer & Project Lead
OPS4J Pax for Vaadin
 Commiter & Project
Lead
blog 


Adding Dependencies in pom.xml

2012-06-13 Thread Subhanjan



I am creating a project which will have database at its back end. For that I
need ojdbc.jar. The problem is whenever I add ojdbc14.jar dependency and
save in pom.xml (I use m2eclipse plugin) it gives me a weird error 'Missing
artifact com.oracle:ojdbc14:jar:10.2.0.3.0:compile'. whenever I remove this
jar file from pom.xml the error disappears. I don't get why this is
happening ?? What is the solution for this ???

Somepne plz give me any solution.


--
View this message in context: 
http://camel.465427.n5.nabble.com/Adding-Dependencies-in-pom-xml-tp5714425.html
Sent from the Camel - Users mailing list archive at Nabble.com.


How to tirgger camel after inserting a row into a database?

2012-06-13 Thread semecamel
I would like to know how I can trigger my route after inserting a row. My
situation is that I need to listen for insert after I need to generate hl7
message.

Any idea how to trigger route after database insert?

--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-tirgger-camel-after-inserting-a-row-into-a-database-tp5714423.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: No hit during Multicast

2012-06-13 Thread kenhans
this is turning into a farce and I might end up being the stupidest kid on
earth :-)

Anyway, when aggregating, I do not seem to be able to fetch relevant data
from neither the oldExchange nor the newExchange. I am not able to see any
Exchange.TO_ENPOINT, and all headers I set within the bean or filter are not
visible when doing aggregation. It seems like the local copies of the
exchange which are multicasted, loose their values before aggregation. The
only way I was able to preserv anything, was to set the properties directly
on the CamelContext of the Exchange
exchange.getContext().getProperties().put("foo", "bar");
Then I am able to access that property when doing the aggregation as defined
below. However, this seems to be a bit dirty as I need to remove the
property after using it etc.

MulticastDefinition multicastDefinition = route.multicast(); 
for (Producer producer : producers) { 
  multicastDefinition 
  .filter().method(producer, "filter")   
  .bean(producer, "createEvent") 
  .to(EndPointUri.INCOMING_EVENT_QUEUE); 
} 
multicastDefinition.aggregate(constant(true) , new
MyAggregationStrategy()).completionTimeout(3000).to("log:dummy");

--
View this message in context: 
http://camel.465427.n5.nabble.com/No-hit-during-Multicast-tp5683138p5714419.html
Sent from the Camel - Users mailing list archive at Nabble.com.


classloading in jboss and activemq component

2012-06-13 Thread anoordover
I recall that allthough the classloading in camel 2.8 is resolved in camel
for JBoss that in that version of activemq there still remained an issue
with classloading in the activemq component.
I recall that there was an jira issue created. Can anybody help me to find
it.
This issue is a blocker for us to easily migrate to another camel version. I
want to find out whether this is solved or not and in what version.

We also have an issue with our asynch redelivered routes in newer versions
of camel.
This issue is about the cachelevel having another default setting. Can we
set this using a system wide system-property?
If we can't do that we need to redeploy all our camel war's.
see https://issues.apache.org/jira/browse/CAMEL-3828


--
View this message in context: 
http://camel.465427.n5.nabble.com/classloading-in-jboss-and-activemq-component-tp5714418.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: No hit during Multicast

2012-06-13 Thread Claus Ibsen
On Wed, Jun 13, 2012 at 10:32 AM, kenhans  wrote:

> great, thanks. Would the AggreagtionStrategy work if I add
> parallelProcessing
> to the MulticastDefinition as well? Like this
>
> MulticastDefinition multicastDefinition =
> route.multicast().*parallelProcessing().timeout(1).*onPrepare(new
> DocumentDeepClone());
>
>
Yes, but why dont you just try it out?



>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/No-hit-during-Multicast-tp5683138p5714407.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Split, filter, aggregate zero messages

2012-06-13 Thread Claus Ibsen
On Wed, Jun 13, 2012 at 9:52 AM, Gordienko, Max wrote:

> Thank you Claus,
>
> > See the example with only splitter, where you dont need the aggregator
> EIP
>
> I tried to do as you suggested
>
>from("direct:from")
>.split(body().tokenize("\n"), new
> ListAggregationStrategy())
>.filter(body().isNotEqualTo(""))
>.log(LoggingLevel.INFO, "processing")
>.end()
>.log(LoggingLevel.INFO, "compleated").stop();
>
> Looks like it does solve my problem:
> split to zero is still silently dropped,
> split to more elements does not aggregate the result, each message is
> processed in its own flow (compleated multiple times).
>
> Or do I missing something?
>
>
Read and learn the EIP patterns, and figure out what you want.
The Composed Message Processor is like a fork/join process.

In the aggregation strategy you can decide whatever you want and how you
want to join the pieces together.
If some of those pieces should not, due to a filter, then just skip that,
and return the old exchange.




> Thanks
>
> "This e-mail and any attachments to it (the "Communication") is, unless
> otherwise stated, confidential,  may contain copyright material and is for
> the use only of the intended recipient. If you receive the Communication in
> error, please notify the sender immediately by return e-mail, delete the
> Communication and the return e-mail, and do not read, copy, retransmit or
> otherwise deal with it. Any views expressed in the Communication are those
> of the individual sender only, unless expressly stated to be those of
> Australia and New Zealand Banking Group Limited ABN 11 005 357 522, or any
> of its related entities including ANZ National Bank Limited (together
> "ANZ"). ANZ does not accept liability in connection with the integrity of
> or errors in the Communication, computer virus, data corruption,
> interference or delay arising from or in respect of the Communication."
>



-- 
Claus Ibsen
-
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: No hit during Multicast

2012-06-13 Thread kenhans
great, thanks. Would the AggreagtionStrategy work if I add parallelProcessing
to the MulticastDefinition as well? Like this

MulticastDefinition multicastDefinition =
route.multicast().*parallelProcessing().timeout(1).*onPrepare(new
DocumentDeepClone());



--
View this message in context: 
http://camel.465427.n5.nabble.com/No-hit-during-Multicast-tp5683138p5714407.html
Sent from the Camel - Users mailing list archive at Nabble.com.


RE: Split, filter, aggregate zero messages

2012-06-13 Thread Gordienko, Max
Thank you Claus,

> See the example with only splitter, where you dont need the aggregator
EIP

I tried to do as you suggested

from("direct:from")
.split(body().tokenize("\n"), new
ListAggregationStrategy())
.filter(body().isNotEqualTo(""))
.log(LoggingLevel.INFO, "processing")
.end()
.log(LoggingLevel.INFO, "compleated").stop();

Looks like it does solve my problem:
split to zero is still silently dropped,
split to more elements does not aggregate the result, each message is
processed in its own flow (compleated multiple times).

Or do I missing something?

Thanks

"This e-mail and any attachments to it (the "Communication") is, unless 
otherwise stated, confidential,  may contain copyright material and is for the 
use only of the intended recipient. If you receive the Communication in error, 
please notify the sender immediately by return e-mail, delete the Communication 
and the return e-mail, and do not read, copy, retransmit or otherwise deal with 
it. Any views expressed in the Communication are those of the individual sender 
only, unless expressly stated to be those of Australia and New Zealand Banking 
Group Limited ABN 11 005 357 522, or any of its related entities including ANZ 
National Bank Limited (together "ANZ"). ANZ does not accept liability in 
connection with the integrity of or errors in the Communication, computer 
virus, data corruption, interference or delay arising from or in respect of the 
Communication."