Re: jms ibm mq ssl connection from client

2015-12-29 Thread yogu13
Are your certs ip based ? if yes then that could be the problem

Regards,
-Yogesh



--
View this message in context: 
http://camel.465427.n5.nabble.com/jms-ibm-mq-ssl-connection-from-client-tp5775406p5775560.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: MainListenerSupport afterStop is never called (spring.Main)

2015-12-29 Thread yogu13
Hello,

Please let us know the camel version, code (if any) and logs etc

Regards,
-Yogesh



--
View this message in context: 
http://camel.465427.n5.nabble.com/MainListenerSupport-afterStop-is-never-called-spring-Main-tp5775458p5775559.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Clusturing Camel

2015-12-29 Thread yogu13
Add a load balancer to forward the request to apache camel on jetty. you can
even use Apache HTTPD with the load balancer module in it for the same.



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


Re: using Camel-JMS for HornetQ (Wildfly 9)

2015-12-29 Thread yogu13
okay any ideas how it can be achieved?



--
View this message in context: 
http://camel.465427.n5.nabble.com/using-Camel-JMS-for-HornetQ-Wildfly-9-tp5775529p5775557.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: MainListenerSupport afterStop is never called (spring.Main)

2015-12-29 Thread rno
The camel version is as follows: 2.16.1

Shutdown log after JMX "camel"/stop
2015-12-29 09:23:11,727 [Thread-5 ] INFO 
DefaultShutdownStrategy--- Graceful shutdown
of 5 routes com
pleted in 0 seconds
2015-12-29 09:23:11,739 [Thread-5 ] INFO  SpringCamelContext

--- Apache Camel 2.16.1 (CamelContext
: camel) uptime 15.556 seconds
2015-12-29 09:23:11,739 [Thread-5 ] INFO  SpringCamelContext

--- Apache Camel 2.16.1 (CamelContext
: camel) is shutdown in 0.031 seconds

This last part only appears in the log after ctrl+c:
2015-12-29 09:23:35,189 [Thread-0 ] INFO 
MainSupport$HangupInterceptor  --- Received hang up
- stopping the m
ain instance.
2015-12-29 09:23:35,189 [Thread-0 ] INFO 
ClassPathXmlApplicationContext --- Closing
org.springframework.conte
xt.support.ClassPathXmlApplicationContext@515f550a: startup date [Tue Dec 29
09:22:50 CET 2015]; root of context hierarchy

My startup code looks like this:
public class MyRouteBuilder extends RouteBuilder {

   // if you want to shutdown the program: main.setDuration(1); // in ms
   public static void main(String[] args) throws Exception {
   org.apache.camel.spring.Main main = new Main();
   main.addMainListener(new Events());
   main.enableHangupSupport();
   main.run();
   }

   public static class Events extends MainListenerSupport {   

   // this never gets called! So process hangs, routes stop though
   // if this gets called you probably do not need this :)
@Override
public void afterStop(MainSupport main) {
System.exit(1);
}
   }




--
View this message in context: 
http://camel.465427.n5.nabble.com/MainListenerSupport-afterStop-is-never-called-spring-Main-tp5775458p5775561.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: MainListenerSupport afterStop is never called (spring.Main)

2015-12-29 Thread Claus Ibsen
This is expected, a jmx stop is only stopping camel, not the jvm.

On Tue, Dec 29, 2015 at 9:25 AM, rno  wrote:
> The camel version is as follows: 2.16.1
>
> Shutdown log after JMX "camel"/stop
> 2015-12-29 09:23:11,727 [Thread-5 ] INFO
> DefaultShutdownStrategy--- Graceful shutdown
> of 5 routes com
> pleted in 0 seconds
> 2015-12-29 09:23:11,739 [Thread-5 ] INFO  SpringCamelContext
> --- Apache Camel 2.16.1 (CamelContext
> : camel) uptime 15.556 seconds
> 2015-12-29 09:23:11,739 [Thread-5 ] INFO  SpringCamelContext
> --- Apache Camel 2.16.1 (CamelContext
> : camel) is shutdown in 0.031 seconds
>
> This last part only appears in the log after ctrl+c:
> 2015-12-29 09:23:35,189 [Thread-0 ] INFO
> MainSupport$HangupInterceptor  --- Received hang up
> - stopping the m
> ain instance.
> 2015-12-29 09:23:35,189 [Thread-0 ] INFO
> ClassPathXmlApplicationContext --- Closing
> org.springframework.conte
> xt.support.ClassPathXmlApplicationContext@515f550a: startup date [Tue Dec 29
> 09:22:50 CET 2015]; root of context hierarchy
>
> My startup code looks like this:
> public class MyRouteBuilder extends RouteBuilder {
>
>// if you want to shutdown the program: main.setDuration(1); // in ms
>public static void main(String[] args) throws Exception {
>org.apache.camel.spring.Main main = new Main();
>main.addMainListener(new Events());
>main.enableHangupSupport();
>main.run();
>}
>
>public static class Events extends MainListenerSupport {
>
>// this never gets called! So process hangs, routes stop though
>// if this gets called you probably do not need this :)
> @Override
> public void afterStop(MainSupport main) {
> System.exit(1);
> }
>}
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/MainListenerSupport-afterStop-is-never-called-spring-Main-tp5775458p5775561.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: MainListenerSupport afterStop is never called (spring.Main)

2015-12-29 Thread Claus Ibsen
I logged a ticket to improve this
https://issues.apache.org/jira/browse/CAMEL-9457

On Tue, Dec 29, 2015 at 9:31 AM, Claus Ibsen  wrote:
> This is expected, a jmx stop is only stopping camel, not the jvm.
>
> On Tue, Dec 29, 2015 at 9:25 AM, rno  wrote:
>> The camel version is as follows: 2.16.1
>>
>> Shutdown log after JMX "camel"/stop
>> 2015-12-29 09:23:11,727 [Thread-5 ] INFO
>> DefaultShutdownStrategy--- Graceful shutdown
>> of 5 routes com
>> pleted in 0 seconds
>> 2015-12-29 09:23:11,739 [Thread-5 ] INFO  SpringCamelContext
>> --- Apache Camel 2.16.1 (CamelContext
>> : camel) uptime 15.556 seconds
>> 2015-12-29 09:23:11,739 [Thread-5 ] INFO  SpringCamelContext
>> --- Apache Camel 2.16.1 (CamelContext
>> : camel) is shutdown in 0.031 seconds
>>
>> This last part only appears in the log after ctrl+c:
>> 2015-12-29 09:23:35,189 [Thread-0 ] INFO
>> MainSupport$HangupInterceptor  --- Received hang up
>> - stopping the m
>> ain instance.
>> 2015-12-29 09:23:35,189 [Thread-0 ] INFO
>> ClassPathXmlApplicationContext --- Closing
>> org.springframework.conte
>> xt.support.ClassPathXmlApplicationContext@515f550a: startup date [Tue Dec 29
>> 09:22:50 CET 2015]; root of context hierarchy
>>
>> My startup code looks like this:
>> public class MyRouteBuilder extends RouteBuilder {
>>
>>// if you want to shutdown the program: main.setDuration(1); // in ms
>>public static void main(String[] args) throws Exception {
>>org.apache.camel.spring.Main main = new Main();
>>main.addMainListener(new Events());
>>main.enableHangupSupport();
>>main.run();
>>}
>>
>>public static class Events extends MainListenerSupport {
>>
>>// this never gets called! So process hangs, routes stop though
>>// if this gets called you probably do not need this :)
>> @Override
>> public void afterStop(MainSupport main) {
>> System.exit(1);
>> }
>>}
>>
>>
>>
>>
>> --
>> View this message in context: 
>> http://camel.465427.n5.nabble.com/MainListenerSupport-afterStop-is-never-called-spring-Main-tp5775458p5775561.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



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


Re: using Camel-JMS for HornetQ (Wildfly 9)

2015-12-29 Thread Claus Ibsen
Camel users dont program with the jms api, but just use the camel-jms
component. And as such it does not matter so much if its jms 1.1 or
2.0.

Is there any particular jms 2.0 functionality that you find not able
to do with camel-jms ?

Otherwise any jms broker should support jms 1.1 just fine.



On Mon, Dec 28, 2015 at 12:38 PM, yogu13  wrote:
> Hello,
>
> Based on camel (2.16.x) POM's it looks like camel does not support JMS 2.0
> spec and continues with the JMS 1.1, my question is has anyone tried
> connecting with HornetQ (JMS 2.0 spec) (available as part of Wildfly 9)
> using camel-jms or camel sjms ??
>
> finally would camel start supporting JMS 2 anytime in future?
>
> Regards,
> -Yogesh
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/using-Camel-JMS-for-HornetQ-Wildfly-9-tp5775529.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: Clusturing Camel

2015-12-29 Thread madhava pulakanti
Thanks for the reply.

Our architecture is little deferent as below.

Legacy Requests > Apache Rewrite\Reroute Proxy[Route 10g URL to 11g URL] > Load 
Balancer > Oracle HTTP > Oracle SOA
Legacy Response <  Apache Rewrite\Reroute Proxy <  Load Balancer < Oracle HTTP 
< Oracle SOA

Initially it was like below.

Legacy Requests > Load Balancer > Oracle HTTP > Oracle SOA
Legacy Response < Load Balancer < Oracle HTTP < Oracle SOA

But we had issue with URL's. old 10g URL Format which Legacy doesn't want to 
change, to rewrite or route to new 11g URL we are planning to use the apache 
camel webservie proxy functionality.

So now we need to make the Apache Camel High available, we are already using 
the Load Balancer. If keep the LB before Apache Camel as per below

Legacy Requests > Load Balancer >Apache Rewrite\Reroute Proxy[Route 10g URL to 
11g URL] > Oracle HTTP > Oracle SOA
Legacy Response <  Load Balancer mailto:yog...@gmail.com] 
Sent: Tuesday, December 29, 2015 7:04 AM
To: users@camel.apache.org
Subject: Re: Clusturing Camel

Add a load balancer to forward the request to apache camel on jetty. you can 
even use Apache HTTPD with the load balancer module in it for the same.



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


Re: MainListenerSupport afterStop is never called (spring.Main)

2015-12-29 Thread rno
thanks for the fast response :)



--
View this message in context: 
http://camel.465427.n5.nabble.com/MainListenerSupport-afterStop-is-never-called-spring-Main-tp5775458p5775566.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Deploying Camel in WebLogic(Cluser)

2015-12-29 Thread madhava pulakanti
Dears All,

Can anybody help to provide the steps to deploy camel in Web logic (preferably 
on Clustered Environment).

Thanks
Mahdava


http, authentication by 'GET' method

2015-12-29 Thread kalber
Hi, 

i want to pass this piece of code to  http4 component :

HttpGet get = new HttpGet(URL + "?" + URLEncodedUtils.format(queryParams,
"UTF-8"));

UsernamePasswordCredentials credentials =
new UsernamePasswordCredentials(USERNAME, PASSWORD);
get.addHeader(BasicScheme.authenticate(credentials, "UTF-8", false));

HttpResponse response = httpClient.execute(get);
--

My problem is the authentication, what have i done :

 .setHeader(Exchange.HTTP_METHOD, constant("GET"))
 .to("
https://x.y.it:443/transit-service/timetables/ids?authPassword=password&authUsername=username&&from=20151226&&to=20151228";)

But i get  this error :

org.apache.camel.http.common.HttpOperationFailedException: HTTP operation
failed invoking
https://x.y.it/transit-service/timetables/ids?from=20151226&to=20151228 with
statusCode: 401

How can i pass authentication correctly in this GET ?




-
kh
--
View this message in context: 
http://camel.465427.n5.nabble.com/http-authentication-by-GET-method-tp5775574.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: suppress error from Camel Route on slave

2015-12-29 Thread Mary Cochran
You can always use an Exception Handler to catch the exception.  Then just set 
handled to true.  The only issue here is that it would catch other IOExceptions 
as well.  You could do something similar to this to avoid catching all of those 
exceptions:

onException(IOException.class)
   choice()
 .when({get the exception text here}.equals("Broker named
'localhost' does not exist")
.handled(true)
 .otherwise()
.handled(false);

Another option depending on how large this part of your route is would be to 
use a try/catch and just continue on the catch. 
http://camel.apache.org/try-catch-finally.html

Mary Cochran
Red Hat Consulting
Email: mcoch...@redhat.com | c: 419-543-0531 | http://www.redhat.com 

- Original Message -
From: "mtod09" 
To: users@camel.apache.org
Sent: Monday, December 28, 2015 6:27:04 PM
Subject: suppress error from Camel Route on slave

I'm running ActiveMQ 5.13 on a leveldb cluster. 
My ActiveMQ.xml config contains a Camel route in an include file. 



I route xml from one queue to a topic but when slave is in standby mode I
keep getting this error : 

INFO   | jvm 1| 2015/12/28 18:10:26 | ERROR | Could not refresh JMS
Connection for destination 'esb.*' - retrying using
FixedBackOff{interval=5000, currentAttempts=181, maxAttempts=unlimited}.
Cause: Could not create Transport. Reason: java.io.IOException: Broker named
'localhost' does not exist. 

Is there a way to suppress this error or Non-Error due to it being a slave? 

Thanks 

Mike 



--
View this message in context: 
http://camel.465427.n5.nabble.com/suppress-error-from-Camel-Route-on-slave-tp5775556.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel CXF - Security (Authentication)

2015-12-29 Thread Mary Cochran
If you are looking for an example of the CXF with Basic Auth this is one myself 
and a co-worker put together: 
https://github.com/rhtconsulting/fuse-quickstarts/tree/jboss-fuse-6.2.1/karaf/soap_secure

Mary Cochran
Red Hat Consulting
Email: mcoch...@redhat.com | c: 419-543-0531 | http://www.redhat.com 

- Original Message -
From: "Sergey Beryozkin" 
To: users@camel.apache.org
Sent: Wednesday, December 23, 2015 8:50:15 AM
Subject: Re: Camel CXF - Security (Authentication)

Hi

One way to control it can be to register 
org.apache.cxf.jaxrs.security.JAASAuthenticationFilter - it will report 
401. Or register a custom filter that will do it. Register filters in 
cxf:rsServer/cxf:providers.

Alternatively you might want to experiment with configuring the 
underlying container to do it for you.
When CXFRS endpoint with an absolute address is used, it is CXF Jetty 
transport that supports it, so in this case may be you can configure CXF 
Jetty transport somehow:

http://cxf.apache.org/docs/jetty-configuration.html

Perhaps you might also be able to combine Camel Servlet with CXF RS 
endpoint via a camel transport

Sergey

On 22/12/15 09:47, zied123456 wrote:
>
>
> I created a webservice with apache camel using CXF component as bellow :
>
> blueprint.xml:
>
>
>
>http://localhost:9050/route";
>  serviceClass="ngtrend.ws.Testws" />
>http://camel.apache.org/schema/blueprint";>
>  
>
>
>
>  
>
>
> Testws.java:
>
> public class Testws {
>  @GET
>  @Path("/test/{id}")
>  @Produces("application/xml")
>  //@Consumes("text/xml")
>  public Integer getAssets(@PathParam("id") int id){
>  return null;
>  }
> }
>
> and I would like to secure it forcing the customer to send ( or enter on a
> dialog box if using a browser) login and password (BASIC Http
> authentication). How can i make this configuration ?
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Camel-CXF-Security-Authentication-tp5775347.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/


Camel SSH no password

2015-12-29 Thread Karts
It is possible to set up command line ssh to not require a password or file.

I can currently do this with:
uname1@server1:~$ ssh -q uname2@server2

But I can't get this to work with Camel (being run as uname1 on server1). If
I do:

.to("ssh://uname2@server2") 

I get a java.lang.NullPointerException exception.

If I try to give a blank password by just adding a colon:

.to("ssh://uname2:@server2") 

I now get org.apache.camel.RuntimeCamelException - Failed to authenticate
username uname2

Is this possible? 

FYI I'm using Camel 2.16.1

Thanks



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