Re: An issue with NotifyBuilder on nested routes

2016-02-15 Thread Claus Ibsen
from is the first route the message was received into Camel. So in
your use-case it would always be "direct:a" as that is where you send
the message into Camel.



On Tue, Feb 16, 2016 at 8:08 AM, SHTherkildsen
 wrote:
> I seem to be having an issue with using NotifyBuilder on a nested route, when
> using "direct:..." consumer. fromRoute(...).whenDone(..) and
> from(...).whenDone(...) do not seem to Work in my case.
>
> I am running camel 2.16.2 on a windows 8 box.
>
> The test below fails on the  testFromRouteDirect and testFromEndpointDirect
> test cases. Is that a bug or intended behaviour?
>
> ---
> import org.apache.camel.Exchange;
> import org.apache.camel.LoggingLevel;
> import org.apache.camel.builder.NotifyBuilder;
> import org.apache.camel.builder.RouteBuilder;
> import org.apache.camel.impl.DefaultExchange;
> import org.apache.camel.test.junit4.CamelTestSupport;
> import org.junit.Test;
>
> import java.util.concurrent.TimeUnit;
>
> public class NotifyWhenNestedRouteIsDone extends CamelTestSupport {
>
> @Override
> protected RouteBuilder createRouteBuilder() throws Exception {
> return new RouteBuilder() {
> @Override
> public void configure() throws Exception {
>
> from("direct:a")
> .routeId("A")
> .to("seda:doStuffLater")
> .to("direct:doStuffNow")
> .log(LoggingLevel.INFO, "Did stuff");
>
> from("seda:doStuffLater")
> .routeId("B")
> .log(LoggingLevel.INFO, "Procrastinating");
>
> from("direct:doStuffNow")
> .routeId("C")
> .log(LoggingLevel.INFO, "Doing stuff");
> }
> };
> }
>
> @Test
> public void testFromRouteSeda() {
> NotifyBuilder nb = new
> NotifyBuilder(context).fromRoute("B").whenDone(1).create();
> Exchange exchange = new DefaultExchange(context);
> exchange = template.send("direct:a", exchange);
> boolean done = nb.matches(5, TimeUnit.SECONDS);
> assertTrue("Timed out waiting for notify builder fromRoute(B)",
> done);
> }
>
> @Test
> public void testFromEndpointSeda() {
> NotifyBuilder nb = new
> NotifyBuilder(context).from("seda:doStuffLater").whenDone(1).create();
> Exchange exchange = new DefaultExchange(context);
> exchange = template.send("direct:a", exchange);
> boolean done = nb.matches(5, TimeUnit.SECONDS);
> assertTrue("Timed out waiting for notify builder
> from(seda:doStuffLater)", done);
> }
>
> @Test
> public void testFromRouteDirect() {
> NotifyBuilder nb = new
> NotifyBuilder(context).fromRoute("C").whenDone(1).create();
> Exchange exchange = new DefaultExchange(context);
> exchange = template.send("direct:a", exchange);
> boolean done = nb.matches(5, TimeUnit.SECONDS);
> assertTrue("Timed out waiting for notify builder fromRoute(C)",
> done);
> }
>
> @Test
> public void testFromEndpointDirect() {
> NotifyBuilder nb = new
> NotifyBuilder(context).from("direct:doStuffNow").whenDone(1).create();
> Exchange exchange = new DefaultExchange(context);
> exchange = template.send("direct:a", exchange);
> boolean done = nb.matches(5, TimeUnit.SECONDS);
> assertTrue("Timed out waiting for notify builder
> from(seda:doStuffNow)", done);
> }
> }
> ---
>
> Kind regards
> Søren
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/An-issue-with-NotifyBuilder-on-nested-routes-tp574.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


Re: Camel-xmlsecurity :No XML schema found

2016-02-15 Thread Franz Paul Forsthofer
Hi Jack,

the XML Signature component does not support the KeyInfo content you
need. But what you could do is that you create the KeyInfo element on
your own before you call the XML Signature component.

Then I think it is better to use enveloped Signature than the detached
Signature mode. You have to provide an XSD for the total XML document
with soapenv:Envelope as root element. And you can use the option
"contentReferenceUri" to point to the element which should be signed.
In your example above the value of the contentReferenceUri must be
"#id-181AC833A9A23E3A2E14545684427885". See also the description of
the option in http://camel.apache.org/xml-security-component.html

Best Regards Franz

On Wed, Feb 10, 2016 at 2:15 AM, Jack Ding  wrote:
> Thanks Claus,
> My ultimate goal is to create a soap secure header with signature in it.   I 
> am thinking to use detached mode plus referring the schemaResourceUri to the 
> schema "http://schemas.xmlsoap.org/soap/envelope/";.  Now the problem seems to 
> be the location of x509 certificate, which needs to be in the 
> BinarySecurityToken element and referenced by SecurityTokenReference  in the 
> KeyInfo.
> Could you advise if the current camel-xmlsecurity  supports this kind of soap 
> secure header?   If so, could you check if my above approach is feasible?
> For example, below is the format of the secure soap header we need.
>  xmlns:oas="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
>  xmlns:ser="http://webservices.cashedge.com/services"; 
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";>
>   xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
>  
> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";>
>   EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary";
>  
> ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3";
>  
> wsu:Id="X509-181AC833A9A23E3A2E145461038308455">MIIE4jCCA8qgAwIBAg...
>   xmlns:ds="http://www.w3.org/2000/09/xmldsig#";> 
>Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#";>  
>  xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#"/>   
> Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>   
>   
>   Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#";>
>  xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#"/> 
> 
> http://www.w3.org/2000/09/xmldsig#sha1"/> 
>  cermnLLbtJrCVJ2wtmj4OmFOD3M=
>
> nrBdXPCD9PHkPep+icdOcQ==   
> 
>   
>  ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"/>
>
>wsu:Id="TS-181AC833A9A23E3A2E145461038306854">
> 2016-02-04T18:26:23Z
> 2016-02-04T18:36:23Z   
>wsu:Id="id-181AC833A9A23E3A2E14545684427885" > .   
> 
> Thanks in advance.
>
>
> On Tuesday, February 9, 2016 1:01 AM, Claus Ibsen  
> wrote:
>
>
>  You need to put the test.xsd file together with your Camel application
> so they are in the same OSGi bundle, so the classloder can find the
> file.
>
> Look at some of the other osgi examples that are in the examples of Camel.
> https://github.com/apache/camel/tree/master/examples
>
> On Tue, Feb 9, 2016 at 6:16 AM, Jack Ding  wrote:
>> Hello,
>>
>> I am testing the  XML Security component according to the example from the 
>> camel-xmlsecurity website. For example the following producer refers to the 
>> Test.xsd:
>>
>> > uri="xmlsecurity:sign://detached?keyAccessor=#keyAccessorBean&xpathsToIdAttributes=#xpathsToIdAttributesBean&schemaResourceUri=Test.xsd"
>>  />
>>
>> I am testing this in the karaf and I have put the Test.xsd in the following 
>> folder:
>>
>> apache-karaf-2.3.11/instances/mytestinstance/
>> However I am getting this error:
>> org.apache.camel.component.xmlsecurity.api.XmlSignatureException: XML 
>> Signature component is wrongly configured: No XML schema found for specified 
>> schema resource URI Test.xsd
>>
>> My camel version is 2.14.3.
>>
>> According to the document it is the classpath:
>> schemaResourceUri: Since 2.14.0. Classpath to the XML Schema file
>>
>> Could anybody advise what the classpath exactly is and where I should I put 
>> the Test.xsd in Karaf container for xmlsecurity endpoint to access it?
>>
>> Thanks in advance
>>
>
>
>
> --
> Claus Ibsen
> -
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>
>
>


An issue with NotifyBuilder on nested routes

2016-02-15 Thread SHTherkildsen
I seem to be having an issue with using NotifyBuilder on a nested route, when
using "direct:..." consumer. fromRoute(...).whenDone(..) and
from(...).whenDone(...) do not seem to Work in my case.

I am running camel 2.16.2 on a windows 8 box.

The test below fails on the  testFromRouteDirect and testFromEndpointDirect
test cases. Is that a bug or intended behaviour?

---
import org.apache.camel.Exchange;
import org.apache.camel.LoggingLevel;
import org.apache.camel.builder.NotifyBuilder;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.impl.DefaultExchange;
import org.apache.camel.test.junit4.CamelTestSupport;
import org.junit.Test;

import java.util.concurrent.TimeUnit;

public class NotifyWhenNestedRouteIsDone extends CamelTestSupport {

@Override
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
@Override
public void configure() throws Exception {

from("direct:a")
.routeId("A")
.to("seda:doStuffLater")
.to("direct:doStuffNow")
.log(LoggingLevel.INFO, "Did stuff");

from("seda:doStuffLater")
.routeId("B")
.log(LoggingLevel.INFO, "Procrastinating");

from("direct:doStuffNow")
.routeId("C")
.log(LoggingLevel.INFO, "Doing stuff");
}
};
}

@Test
public void testFromRouteSeda() {
NotifyBuilder nb = new
NotifyBuilder(context).fromRoute("B").whenDone(1).create();
Exchange exchange = new DefaultExchange(context);
exchange = template.send("direct:a", exchange);
boolean done = nb.matches(5, TimeUnit.SECONDS);
assertTrue("Timed out waiting for notify builder fromRoute(B)",
done);
}

@Test
public void testFromEndpointSeda() {
NotifyBuilder nb = new
NotifyBuilder(context).from("seda:doStuffLater").whenDone(1).create();
Exchange exchange = new DefaultExchange(context);
exchange = template.send("direct:a", exchange);
boolean done = nb.matches(5, TimeUnit.SECONDS);
assertTrue("Timed out waiting for notify builder
from(seda:doStuffLater)", done);
}

@Test
public void testFromRouteDirect() {
NotifyBuilder nb = new
NotifyBuilder(context).fromRoute("C").whenDone(1).create();
Exchange exchange = new DefaultExchange(context);
exchange = template.send("direct:a", exchange);
boolean done = nb.matches(5, TimeUnit.SECONDS);
assertTrue("Timed out waiting for notify builder fromRoute(C)",
done);
}

@Test
public void testFromEndpointDirect() {
NotifyBuilder nb = new
NotifyBuilder(context).from("direct:doStuffNow").whenDone(1).create();
Exchange exchange = new DefaultExchange(context);
exchange = template.send("direct:a", exchange);
boolean done = nb.matches(5, TimeUnit.SECONDS);
assertTrue("Timed out waiting for notify builder
from(seda:doStuffNow)", done);
}
}
---

Kind regards
Søren



--
View this message in context: 
http://camel.465427.n5.nabble.com/An-issue-with-NotifyBuilder-on-nested-routes-tp574.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Disruptor concurrentConsumers

2016-02-15 Thread prabhuj
I set the following route,

this.from("netty4:tcp://localhost:7000?sync=true&synchronous=false&encoder=#myEncoder&decoder=#myDecoder").to("disruptor:myDisruptor");

this.from("disruptor:myDisruptor?concurrentConsumers=20").to("bean:myHandler");

My transactions are processed sequentially even after having
concurrentConsumers=20 on disruptor. What might be the reason ? How can i
make message handler asynchronous ? The below route works for me,

this.from("netty4:tcp://localhost:7000?sync=true&synchronous=false&encoder=#myEncoder&decoder=#myDecoder").threads(20).to("bean:myHandler");



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


Re: How to create a camel spring webservice ?

2016-02-15 Thread hoboy
Tks I use Fuse jboss-fuse-6.2.0.redhat-133



--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-create-a-camel-spring-webservice-tp5777688p570.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: How to create a camel spring webservice ?

2016-02-15 Thread hoboy
Tak very much  SHTherkildsen.
Bellow is my example of the code I have deployed on ServiceWork.
That mean I can not create JAX-RS  webservice like bellow ?


@ApplicationPath("tests")
public class ApplicationActivator extends Application {
   
}
@Path("/test")
public class Resource {

@GET
@Path("/getTest")
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
@Consumes({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
public Response getResource(@Context Request req) {
} 
--
I have to follow the procedure you have ?
That mean an interface ?
then a Routebuilder ?

@Path("/")
public interface IsAliveServiceEndpoint {

@GET
@Path("isAlive")
@Produces("text/json")
Response isAlive();

}
---

A routebuilder:
---
public class IsAliveServiceRouteBuilder extends RouteBuilder {

@Override
public void configure() throws Exception {
from("cxfrs:bean:isAliveService?bindingStyle=SimpleConsumer")
.to(...do stuff...);
}

}
--- 



--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-create-a-camel-spring-webservice-tp5777688p567.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: CamelBlueprintTestSupport version

2016-02-15 Thread Grzegorz Grzybek
Hello

See http://ggrzybek.blogspot.com/2015/12/camel-blueprint-test-support.html
for the details on:
 - what was the original problem
 - how it was fixed in newer versions (and in which versions)
 - how the solution evolved over time and what were the timing issues you've hit

You're right, it *was* thread race/deadlock problem.

regards
Grzegorz Grzybek

2016-02-16 4:54 GMT+01:00 Ranx :
> For whatever it's worth for whomever might run into a similar problem, I
> think I've identified at least one trigger.
>
> My blueprint-properties.xml is defined with:
> 
>
> By creating a test-blueprint-properties.xml with the same information in it
> but no reload strategy the intermittent hang seems to have stopped.
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/CamelBlueprintTestSupport-version-tp564p572.html
> Sent from the Camel - Users mailing list archive at Nabble.com.


Re: CamelBlueprintTestSupport version

2016-02-15 Thread Ranx
For whatever it's worth for whomever might run into a similar problem, I
think I've identified at least one trigger.  

My blueprint-properties.xml is defined with:


By creating a test-blueprint-properties.xml with the same information in it
but no reload strategy the intermittent hang seems to have stopped.  



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


Re: Query relating to the Rest Component

2016-02-15 Thread gilboy
Thanks for the response Matt

My camel based application is going to be deployed in to an existing apache
tomcat container. Hence, I am thinking it probably makes more sense just to
use the camel-servlet component and leverage its rest dsl support.

However, would there be any any advantage of using the Restlet component
which I am overlooking

Thanks
Joe



--
View this message in context: 
http://camel.465427.n5.nabble.com/Query-relating-to-the-Rest-Component-tp526p569.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: How to create a camel spring webservice ?

2016-02-15 Thread SHTherkildsen
Hi.

I don't have experience with Fuse Service Works (if that is what your
using). So i can't say what you can do there.

You can use both classes and interfaces as service class for your CXFRS
endpoint. It  does not matter. Also you can define your route in spring XML
or Java DSL. Both should Work.





--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-create-a-camel-spring-webservice-tp5777688p568.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: How to create a camel spring webservice ?

2016-02-15 Thread SHTherkildsen
I have a simple example from my own code here:

Endpoint interface:
---
package com.mycompany.monitoring

@Path("/")
public interface IsAliveServiceEndpoint {

@GET
@Path("isAlive")
@Produces("text/json")
Response isAlive();

}
---

A routebuilder:
---
public class IsAliveServiceRouteBuilder extends RouteBuilder {

@Override
public void configure() throws Exception {
from("cxfrs:bean:isAliveService?bindingStyle=SimpleConsumer")
.to(...do stuff...);
}

}
---

Spring XML:
---
http://0.0.0.0:80/status";
 
serviceClass="com.mycompany.monitoring.IsAliveServiceEndpoint">








---

Then my service is available on http://localhost/status/isAlive




--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-create-a-camel-spring-webservice-tp5777688p566.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Using NotifyBuilder

2016-02-15 Thread SHTherkildsen
Upgrading from 2.15.3 to 2.16.2 did the trick. 

Thanks.



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


CamelBlueprintTestSupport version

2016-02-15 Thread Ranx
I believe Quinn mentioned that a new snapshot version of CBTS is out that
fixes a race problem.  I'm getting errors in 2.15 that definitely have the
smell of a threading problem.  Most of the time my tests run fine but then,
every once in awhile, it will just hang when I go to call getOSGiService. 
If I re-run the build immediately it will usually pass.  

This isn't a timeout issue as I can jack that up to whatever number I want
and the tests will either pass with flying colors or it'll just hit one that
hangs every now and again.  I can't reliably replicate the behavior and
that's why I think it has the smell of a thread race/deadlock.



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


Re: Using NotifyBuilder

2016-02-15 Thread Claus Ibsen
Hi

Try upgrading Camel if you are not using a new version.

See some pointers here
http://camel.apache.org/support.html

On Mon, Feb 15, 2016 at 7:38 PM, Søren Heintzelmann Therkildsen
 wrote:
> Hi.
>
> I am trying to use NotifyBuilder, but I just don't understand it. I have a 
> simple example below that is failing (matches() times out).
>
> Can anyone tell me what I am doing wrong. It must be something simple. :)
>
> import org.apache.camel.Exchange;
> import org.apache.camel.builder.NotifyBuilder;
> import org.apache.camel.builder.RouteBuilder;
> import org.apache.camel.impl.DefaultExchange;
> import org.apache.camel.test.junit4.CamelTestSupport;
> import org.junit.Test;
>
> import java.util.concurrent.TimeUnit;
>
> public class RouteNotDone extends CamelTestSupport {
>
> @Override
> protected RouteBuilder createRouteBuilder() throws Exception {
> return new RouteBuilder() {
> @Override
> public void configure() throws Exception {
>
> from("direct:a")
> .routeId("a")
> .log("Finished route a");
> }
> };
> }
>
> @Test
> public void testNotDone() {
> NotifyBuilder nb = new 
> NotifyBuilder(context).fromRoute("a").whenDone(1).create();
> Exchange exchange = new DefaultExchange(context);
> exchange = template.send("direct:a", exchange);
> boolean done = nb.matches(10, TimeUnit.SECONDS);
> assertTrue("Not done in 10 seconds", done);
> }
> }



-- 
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


Using NotifyBuilder

2016-02-15 Thread Søren Heintzelmann Therkildsen
Hi.

I am trying to use NotifyBuilder, but I just don't understand it. I have a 
simple example below that is failing (matches() times out). 

Can anyone tell me what I am doing wrong. It must be something simple. :)

import org.apache.camel.Exchange;
import org.apache.camel.builder.NotifyBuilder;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.impl.DefaultExchange;
import org.apache.camel.test.junit4.CamelTestSupport;
import org.junit.Test;

import java.util.concurrent.TimeUnit;

public class RouteNotDone extends CamelTestSupport {

@Override
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
@Override
public void configure() throws Exception {

from("direct:a")
.routeId("a")
.log("Finished route a");
}
};
}

@Test
public void testNotDone() {
NotifyBuilder nb = new 
NotifyBuilder(context).fromRoute("a").whenDone(1).create();
Exchange exchange = new DefaultExchange(context);
exchange = template.send("direct:a", exchange);
boolean done = nb.matches(10, TimeUnit.SECONDS);
assertTrue("Not done in 10 seconds", done);
}
}


Re: How to create a camel spring webservice ?

2016-02-15 Thread hoboy
Am I asking unclear question ?




--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-create-a-camel-spring-webservice-tp5777688p557.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: JMX Management

2016-02-15 Thread ursouca
Dear Claus,

I think you spotted exactly the issue. Therefore I will wait for the new
release 8-).

Thanks a lot,
Cataldo.



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


Re: JMX Management

2016-02-15 Thread Claus Ibsen
But how do you stop the Camel route? Do you just undeploy the
application in weblogic, or do you call some Camel API to stop a
routue, and remove it or what do you do?



On Mon, Feb 15, 2016 at 4:51 PM, ursouca  wrote:
> Hi Claus,
>
> Sorry I forgot to mention it!
> This is the 2.16.2 and i am deploying in Weblogic 12.1.1.
>
> Br,
> Cataldo.
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/JMX-Management-tp550p552.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


Re: JMX Management

2016-02-15 Thread ursouca
Hi Claus,

Sorry I forgot to mention it!
This is the 2.16.2 and i am deploying in Weblogic 12.1.1.

Br,
Cataldo.



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


Re: JMX Management

2016-02-15 Thread Claus Ibsen
What version of Camel do you use?

And what do you mean by "not more used", eg do you remove a route or
what do you do?

And btw I spotted an issue with camel-jpa and logged that ought to help
https://issues.apache.org/jira/browse/CAMEL-9604

On Mon, Feb 15, 2016 at 3:49 PM, ursouca  wrote:
> Dears,
>
> I activated the JMXAgent for monitoring purpose.
> But I have a problem because I am using a JPA endpoint as 'TO' (defined as
> XML route), and when the route is activated, it creates a new instance of
> JPAProducer and it is visible via JMX but when is not more used is stays
> register as mbean and stays is memory. Therefore useless instances of
> JPAProducer are accumulated in memory and in the mbean tree.
> Is there a way to either ask to not register a stopped producers or either
> any producer?
>
> Br,
> Cataldo.
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/JMX-Management-tp550.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


JMX Management

2016-02-15 Thread ursouca
Dears,

I activated the JMXAgent for monitoring purpose.
But I have a problem because I am using a JPA endpoint as 'TO' (defined as
XML route), and when the route is activated, it creates a new instance of
JPAProducer and it is visible via JMX but when is not more used is stays
register as mbean and stays is memory. Therefore useless instances of
JPAProducer are accumulated in memory and in the mbean tree.
Is there a way to either ask to not register a stopped producers or either
any producer?

Br,
Cataldo.




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


Re: FTP producer - prevent from listing the destination folder

2016-02-15 Thread Claus Ibsen
See the stepwise option and also the useList as well.
http://camel.apache.org/ftp2

On Mon, Feb 15, 2016 at 2:48 PM, Laurentiu Trica
 wrote:
> Hello,
>
> Can you help me? Anyone?
>
> Thanks!
> Laurentiu
>
> On Fri, Jan 22, 2016 at 3:38 PM, Laurentiu Trica <
> laurentiu.tr...@moredevs.ro> wrote:
>
>> Hello,
>>
>> I'm using Camel 2.13 and I have an issue when producing files on a FTP
>> folder with a lot of files. It seems to try to list the content of the
>> folder, despite the fact that I used options to prevent this:
>> fileExist=TryRename
>> tempFileName=...
>>
>> Is this even possible?
>>
>> Thank you in advance!
>> Laurentiu
>>



-- 
Claus Ibsen
-
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2


Re: FTP producer - prevent from listing the destination folder

2016-02-15 Thread Laurentiu Trica
Hello,

Can you help me? Anyone?

Thanks!
Laurentiu

On Fri, Jan 22, 2016 at 3:38 PM, Laurentiu Trica <
laurentiu.tr...@moredevs.ro> wrote:

> Hello,
>
> I'm using Camel 2.13 and I have an issue when producing files on a FTP
> folder with a lot of files. It seems to try to list the content of the
> folder, despite the fact that I used options to prevent this:
> fileExist=TryRename
> tempFileName=...
>
> Is this even possible?
>
> Thank you in advance!
> Laurentiu
>


Re: How to create a camel spring webservice ?

2016-02-15 Thread hoboy
Please somebody help.



--
View this message in context: 
http://camel.465427.n5.nabble.com/How-to-create-a-camel-spring-webservice-tp5777688p546.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: blueprint/nettyencoderfactory

2016-02-15 Thread Walzer, Thomas
Quinn, thanks for looking into this:

However, the encoding parameter only works with the textline codec. The docs 
say (and I say it too, because I tested it):

>>>The encoding (a charset name) to use for the textline codec. If not 
>>>provided, Camel will use the JVM default Charset.<<<

I worked around this by not sending a string to netty4 but a byte-array.

Cheers, Thomas.

> Am 12.02.2016 um 17:13 schrieb Quinn Stevenson :
> 
> The Netty4 encoder/decoder don’t have a “Charset” property - this is 
> controlled by the “encoding” URI parameter.
> 
> 
> 
>> On Feb 12, 2016, at 5:36 AM, Walzer, Thomas  
>> wrote:
>> 
>> Hi there,
>> 
>> I tried (on camel 2.15.2):
>> 
>> 
>> > class="org.apache.camel.component.hl7.HL7MLLPNettyEncoderFactory“>
>>  
>> 
>> 
>> and 
>> 
>> > class="org.apache.camel.component.hl7.HL7MLLPNettyEncoderFactory" 
>> factory-method="setCharset">
>>  
>> 
>> 
>> Both do not work.
>> 
>> Any ideas/suggestions?
>> 
>> Cheers, Thomas.
> 



Re: SJMS transaction

2016-02-15 Thread d1x
Yes, you are right.
As far as I know, you are able to do JMS transactions based on single JMS
session (with only once delivery).

So the problem is that I cannot find the way how to configure SJMS to do the
JMS transaction (use same JMS session) for IN-OUT scenario described. And I
must admit it is kinda weird because JMS transaction is one of the most
important constraints.



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


Salesforce Component Reliable Streaming API

2016-02-15 Thread kag
Hello,

Are there any plans on supporting the Reliable Messaging capabilities on the
the Spring 16 release?
Quote: 
/*Replay Generic Streaming Events (Generally Available)*
You no longer have to worry about missed generic streaming events when
subscribers are disconnected. You can now retrieve and
replay past events with Durable Generic Streaming! Salesforce stores events
for 24 hours and allows you to retrieve stored and new
events. Subscribers can choose which events to receive by using replay
options.
*Replay PushTopic Streaming Events (Beta)*
You can now replay PushTopic-based streaming events! Salesforce stores
events for 24 hours and allows you to retrieve stored and
new events. Subscribers can choose which events to receive by using replay
options./

The pdf can be found here: 
https://resources.docs.salesforce.com/200/latest/en-us/sfdc/pdf/salesforce_spring16_release_notes.pdf

  





--
View this message in context: 
http://camel.465427.n5.nabble.com/Salesforce-Component-Reliable-Streaming-API-tp542.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel Salesforce Component

2016-02-15 Thread kag
Hi All,

I unsure wheter this is a bug or not, and where to post it if it is.

We are using the Salesforce Component, to integrate to our Salesforce
instance.
We are running behind a httpproxy, and it works fine where using the Rest
API.

When we try to use the Streaming API we ran into an issue.
The underlying ComedD client a "Invalid Client ID" error in the "connect"
phase (after completing the Handshake step successfully). 

We spend quite a lot of time on this, until we finally went back to basics
and added

System.setProperty("http.proxyUser", "proxyUser");
System.setProperty("http.proxyPassword", "proxyPassword");

Then the problem vanished.

This leads us to believe that somewhere in the CometD wrapping, the HTTP
Proxy information is forgotten or lost.






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


Re: camel-salesforce-maven-plugin picklist to enum generation

2016-02-15 Thread kag
Any news on this?

Spwaned by this issue, we were having some discussions around the best way
to handle picklists. 

The default behaviour in salesforce is to allow any String to be added to a
PickList field (as far as I know),
regardless of whether the String is in the picklist or not. This means that
a Backend System can introduce a new PickList value, before it is added in
Salesforce.

Mapping the PickList to Enums in effect creates a hard coupling between the
backend system mapping and salesforce.

If you mapped PickList to String fields, would allow both the backend system
and salesforce to evolve "out of sync".
The String approach wouldn't be able to convey information on which values
are expected.

The Enum approach makes sense when you care more for the correctness of the
data, rather than getting the data saved.

We would like to have an option to whether picklist should be mapped to
String or Enums.

Have you had any discussions on this issue?
What are your thoughts on this?




--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-salesforce-maven-plugin-picklist-to-enum-generation-tp5776908p540.html
Sent from the Camel - Users mailing list archive at Nabble.com.