Re: Move does not work with file polling

2011-10-07 Thread Claus Ibsen
Hi

You are doing a bit low level coding by creating producer/consumer etc.
Often people just use routes.

Anyway the problem is when you do like this, you need to trigger the
done of the exchange, which will
cause the file to be moved.

See the javadoc for PollingConsumer

/**
 * Represents a a
 * href=http://camel.apache.org/polling-consumer.html;Polling
 * Consumer/a where the caller polls for messages when it is ready.
 * p/
 * When you are done with the returned {@link Exchange} you must
ensure to invoke
 * {@link org.apache.camel.spi.UnitOfWork#done(Exchange)} to signal to
Camel that the {@link Exchange} is done.
 * p/
 * This is needed to ensure any {@link
org.apache.camel.spi.Synchronization} works is being executed.
 * For example if you consumed from a file endpoint, then the consumed
file is only moved/delete when
 * you done the {@link Exchange}.
 *
 * @version
 */

You can do this something like

consumerX.getUnitOfWork().done(consumerX);



On Thu, Oct 6, 2011 at 4:13 PM, ebinsingh
ebenezer.si...@verizonwireless.com wrote:
 Hi,

 I am having trouble moving a file to a back up location after it's consumed
 and it's contents sent to a queue.

 I am new to Camle world and exploring it. Below is the code am using.

 *Spring config:*

 bean id=routeProperties
 class=com.verizon.learn.camel.utils.RoutingProperties
                constructor-arg
 index=0valuefile:C:\\camelProject\\data\\inbox?move=C:\\camelProject\\data\\inbox\\bkp/value/constructor-arg
                constructor-arg
 index=1valuefile:C:\\camelProject\\data\\outbox\\bkp/value/constructor-arg
                constructor-arg
 index=2valuejms:queue:test_queue/value/constructor-arg
        /bean


 Code snippet:

                        System.out.println(Starting Polloer: 
 +consumerEndpoint);
                        PollingConsumer consumer = 
 consumerEndpoint.createPollingConsumer();
                        Producer producer = targetEndpoint.createProducer();
                        consumer.start();
                        while(true){
                                Exchange consumerX = consumer.receive(timeout);
                                while(consumerX != null){
                                        System.out.println(Received message: 
  + consumerX.getIn().getBody());
                                        Exchange newExchange = 
 producer.createExchange(consumerX);
                                        
 newExchange.getIn().setBody(consumerX.getIn().getBody());
                                        
 newExchange.getIn().setHeaders(consumerX.getIn().getHeaders());
                                        producer.process(newExchange);

                                        consumerX = consumer.receive(timeout);
                                }
                                Thread.sleep(1000);
                        }
                }catch(Exception ex){
                        ex.printStackTrace();
                }

 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/Move-does-not-work-with-file-polling-tp4876472p4876472.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.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/


Configuring cxfEndpoint to make secure (HTTPS) : need help

2011-10-07 Thread amarnath.chavva
Hi every one,
Am using cxfEndpoint to expose my services as web services, now I would like
make this as secure by marking those HTTPS.

the following is my spring context file, 


cxf:cxfEndpoint id=httpEndpoint
address=https://0.0.0.0:9001/MyService;
serviceClass=com.mycompany.WebServiceInerface
endpointName=httpttrans:httptransferServiceEndpoint   
serviceName=httpttrans:httptransferService
xmlns:httpttrans=https://httptransfer.mycompany.com/;
/cxf:cxfEndpoint

httpj:engine-factory bus=cxf
httpj:identifiedTLSServerParameters id=secure
httpj:tlsServerParameters
sec:keyManagers keyPassword=password
sec:keyStore type=JKS 
password=password file=server.jks /
/sec:keyManagers
sec:trustManagers
sec:keyStore type=JKS 
password=password file=truststore.jks /
/sec:trustManagers
/httpj:tlsServerParameters
/httpj:identifiedTLSServerParameters

httpj:engine port=0
httpj:tlsServerParametersRef id=secure /
httpj:threadingParameters minThreads=5   
maxThreads=10 /
httpj:connector
beans:bean 
class=org.mortbay.jetty.bio.SocketConnector
beans:property name=port 
value=9001 /
/beans:bean
/httpj:connector 
httpj:handlers
beans:bean 
class=org.mortbay.jetty.handler.DefaultHandler /
/httpj:handlers
httpj:sessionSupporttrue/httpj:sessionSupport
/httpj:engine
/httpj:engine-factory


When trying to run as server to publish my serivices, the following error is
observed.

Protocol mismatch for port 9001: engine's protocol is http, the url
protocol is https 

Please guide me to resolve this issue ASAP.

Regards,
Chavva.




--
View this message in context: 
http://camel.465427.n5.nabble.com/Configuring-cxfEndpoint-to-make-secure-HTTPS-need-help-tp4879695p4879695.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Configuring cxfEndpoint to make secure (HTTPS) : need help

2011-10-07 Thread Glen Mazza
Looking here[1] in a CXF example its httpj:engine port value is 9001, 
while you have yours set to 0 (see arrows below).  Could that be the 
problem?


Glen


[1] 
http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/wsdl_first_https/src/main/java/demo/hw_https/server/CherryServer.xml?revision=1173027view=markup



On 10/07/2011 07:02 AM, amarnath.chavva wrote:

Hi every one,
Am using cxfEndpoint to expose my services as web services, now I would like
make this as secure by marking those HTTPS.

the following is my spring context file,


cxf:cxfEndpoint id=httpEndpoint
address=https://0.0.0.0:9001/MyService;
serviceClass=com.mycompany.WebServiceInerface
endpointName=httpttrans:httptransferServiceEndpoint
serviceName=httpttrans:httptransferService
xmlns:httpttrans=https://httptransfer.mycompany.com/;
/cxf:cxfEndpoint

httpj:engine-factory bus=cxf
httpj:identifiedTLSServerParameters id=secure
httpj:tlsServerParameters
sec:keyManagers keyPassword=password
sec:keyStore type=JKS password=password 
file=server.jks /
/sec:keyManagers
sec:trustManagers
sec:keyStore type=JKS password=password 
file=truststore.jks /
/sec:trustManagers
/httpj:tlsServerParameters
/httpj:identifiedTLSServerParameters

httpj:engine port=0-
httpj:tlsServerParametersRef id=secure /
httpj:threadingParameters minThreads=5  maxThreads=10 
/
httpj:connector
beans:bean 
class=org.mortbay.jetty.bio.SocketConnector
beans:property name=port value=9001 
/
/beans:bean
/httpj:connector
httpj:handlers
beans:bean 
class=org.mortbay.jetty.handler.DefaultHandler /
/httpj:handlers
httpj:sessionSupporttrue/httpj:sessionSupport
/httpj:engine
/httpj:engine-factory


When trying to run as server to publish my serivices, the following error is
observed.

Protocol mismatch for port 9001: engine's protocol is http, the url
protocol is https

Please guide me to resolve this issue ASAP.

Regards,
Chavva.




--
View this message in context: 
http://camel.465427.n5.nabble.com/Configuring-cxfEndpoint-to-make-secure-HTTPS-need-help-tp4879695p4879695.html
Sent from the Camel - Users mailing list archive at Nabble.com.



--
Glen Mazza
Talend - http://www.talend.com/apache
Blog - http://www.jroller.com/gmazza
Twitter - glenmazza



Re: Configuring cxfEndpoint to make secure (HTTPS) : need help

2011-10-07 Thread chavva2...@gmail.com
I have tried with 9001 also.. there was no luck.

Zero i got it from  http://cxf.apache.org/docs/jetty-configuration.html
Jetty Configurations   under the The engine element as

/You can specify a value of 0 for the port attribute. Any threading
properties specified in an httpj:engine element with its port attribute set
to 0 are used as the configuration for all Jetty listeners that are not
explicitly configured/

Regards.

--
View this message in context: 
http://camel.465427.n5.nabble.com/Configuring-cxfEndpoint-to-make-secure-HTTPS-need-help-tp4879695p4879788.html
Sent from the Camel - Users mailing list archive at Nabble.com.


JMX Management

2011-10-07 Thread Alfred Hiebl
Hi,

We are running Camel in a webapp container, which allows us to bundle a
little admin webapp to configure and monitor the routes (among other stuff). 

Camel JMX support works great for a lot of this! But what I did not find so
far is this:
- sendBody in MBean org.apache.camel:type=context,name=camel does not
support headers. Is there another way to start a route?
- Is there a way to create a new route through JMX?

I could do all this by exporting my own MBean (e.g. Spring MBeanExporter).
Not sure, though, how it would get access to CamelContext which I obiously
need to create routes?

Can someone give me a sample how this can be done or if these things can
already be done?

Thanks in advance,
Alfred

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


Re: JMX Management

2011-10-07 Thread Claus Ibsen
On Fri, Oct 7, 2011 at 2:13 PM, Alfred Hiebl a.hi...@mic-cust.com wrote:
 Hi,

 We are running Camel in a webapp container, which allows us to bundle a
 little admin webapp to configure and monitor the routes (among other stuff).

 Camel JMX support works great for a lot of this! But what I did not find so
 far is this:
 - sendBody in MBean org.apache.camel:type=context,name=camel does not
 support headers. Is there another way to start a route?
 - Is there a way to create a new route through JMX?

Yeah there should be API to add/update routes from an XML description
of the routes.



 I could do all this by exporting my own MBean (e.g. Spring MBeanExporter).
 Not sure, though, how it would get access to CamelContext which I obiously
 need to create routes?

 Can someone give me a sample how this can be done or if these things can
 already be done?

 Thanks in advance,
 Alfred

 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/JMX-Management-tp4879844p4879844.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.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/


Re: JMX Management

2011-10-07 Thread ahiebl
The routes are defined using Java DSL. So I was looking for something like
camelContext.addRoutes(rb), just as a JMX operation that I can invoke on my
MBeanServer.

Thanks,
Alfred


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


Re: recipientList inside SEDA route with CXF

2011-10-07 Thread Achim Nierbeck
Ok, this only solved half of my problem or better it postponed it.

Now I do have the following scenario:


Call for Service on Host A works as expected,
the Endpoint is stored in the cache.

Call for Service on Host B does create a new Endpoint
and this one is also stored in the cache.

Now a third call to a service on Host A ends up on endpoint B
somehow the Cache returns endpoint B for requesting EndpointKey made up of
URI for Host A.

Any help is welcome since this now is turning into a Major bug for me :(

Thanx, Achim


2011/9/30 Achim Nierbeck bcanh...@googlemail.com

 The suggested workaround by Jon really does the trick.

 instead of using the recipientlist inside the spring route:

camel:recipientList parallelProcessing=true


 camel:simplecxf:bean:productionServer?address=${header.address}/camel:simple
/camel:recipientList

 I used a std. bean which looks like the following:

 public class WebServiceRecipientListBean {

@RecipientList(parallelProcessing=true)
public String route(@Header(address) String address) {
if (address == null)
return null;

return cxf:bean:productionServer?address=+address;
}

 }

 This pretty much did the trick.

 Thanks a lot for the fast help and regards, Achim

 2011/9/29 Jon Anstey jans...@gmail.com:
  FYI created https://issues.apache.org/jira/browse/CAMEL-4503 for the
  recipient list bug and Achim is trying out another approach to workaround
  this issue.
 
  On Thu, Sep 29, 2011 at 11:46 AM, Achim Nierbeck 
 bcanh...@googlemail.comwrote:
 
  I did take a look at the sources and I think I found the
  root of my problem, though I'm not sure how to get around it:
 
  RecipientList class contains a producer cache,
  in this cache the RecipientListProcessor class does store the
  endpoints depending on the uri as key.
  Now since only my header changes I don't know how to get around this.
  Any ideas?
 
  Thanks in advance, Achim
 
  2011/9/29 Achim Nierbeck bcanh...@googlemail.com:
   Ok,
  
   some more worrying details.
  
   Right now I have two Remote Hosts
   After a successful run on Host A a second run is done (not parallel
   but sequential) on Host B.
   And I'm able to see that the header.address is set to host B still I
   see that the request is made on Host A.
  
   Is this intentional, are there any ways of not remembering which
   call did go to which Host?
  
   Thanks again, Achim
  
   2011/9/29 Achim Nierbeck bcanh...@googlemail.com:
   Hi
  
   using Camel 2.8.0 I'm having the following scenario.
   I'm using the CXF for connecting to a couple .NET Webservices.
  
  !-- CXF config --
  cxf:cxfEndpoint id=productionServer
  
   serviceClass=net.testservices.productionservice._2011_07.IService
  endpointName=s:basicHttpProductionService
  serviceName=s:ProductionService
  wsdlURL=classpath:/wsdl/_1.wsdl xmlns:s=
  http://tempuri.org/;
  xmlns:a=
  http://schemas.microsoft.com/2003/10/Serialization/Arrays;
  xmlns:i=http://www.w3.org/2001/XMLSchema-instance;
  cxf:properties
  entry key=dataFormat value=POJO /
  /cxf:properties
  cxf:outInterceptors
  ref bean=loggingOutInterceptor /
  /cxf:outInterceptors
  /cxf:cxfEndpoint
  
  
   Now I have a route for looking up some data in the DB for example
 also
   looking for a free
   WebService to call:
  
  camel:route id=pollQueue
  camel:from
  uri=timer://pollQueueTimer?fixedRate=trueamp;period=3 /
  
   ... do preparation 
   ... also set the address of the remote host into the header of the
  exchange ...
   ... call the production route ...
  
  camel:to
 uri=seda:production
  /
  /camel:route
  
   the production route does call the Webservice on the available remote
   host as follows
  
   ... again a couple of preparations beforehand 
  
  !-- Altering Body to contain no data --
  camel:setBody
  camel:mvel[ ]/camel:mvel
  /camel:setBody
  
  !-- service call --
  camel:setHeader headerName=operationName
  
   camel:constantProduceData/camel:constant
  /camel:setHeader
  
   ... the address of the remote webservice was previously added to the
   header in the starting route ...
  
  
   ... I needed to set the parallelProcessing to true, if not everything
   fails because the Timer Route tries to start another recipientList
 ...
  
  camel:recipientList
 parallelProcessing=true
  
 
  
 camel:simplecxf:bean:productionServer?address=${header.address}/camel:simple

Query part of HTTP_URI header ignored

2011-10-07 Thread wing-tung Leung
We use a HttpProducer (http4) which receives a URL via the CamelHttpUri
header, and fetches the data from that URL. The http4 endpoint configuration
does not contain any URL at all, because this is all determined based on
dynamic message content.

Problem is that I initially expected that the query part of the URL would be
taken into account, but the HTTP producer IGNORES the query parameter
segment when the CamelHttpQuery header is not set. It seems to fallback to
the query part of the endpoint, but that does not work for us since it's
empty.

So, setting URL directly on endpoint should respect the query part, but only
setting it via the header, does NOT use the query part. I did not expect
this behavior, and find it a little confusing. Wouldn't it be better to
include the query part in BOTH cases?

For the moment, I implemented a workaround by setting the CamelHttpQuery
header as well, but this feels like a small hack.


http://camel.apache.org/http4.html

Using camel 2.5, but code seems to be unchanged in latest trunk, see line
331 in HttpProducer.createMethod() :

https://github.com/apache/camel/blob/trunk/components/camel-http4/src/main/java/org/apache/camel/component/http4/HttpProducer.java#L331

Regards,

Tung


Re: Exception not getting caught and multiple consumers getting the same message

2011-10-07 Thread Aaron Doyle
I tried the handleFault=true attribute and that did not enable the exceptions 
to get caught.  
 
The exceptions are caught when running one consumer, as soon as I increase the 
number of consumers, exceptions are not caught and messages start getting 
lost. I noticed that all 50 consumers are sharing the same connection, whereas 
I would think that all consumers get there own connection...  Adding a 
doTry/doCatch around the 'to' section of my route, does catch most of the 
exceptions but still some messages seem to get lost... Is there any way with 1 
consumer that I can process multiple messages asynchronously?  Or that I can 
force each consumer to get its own connection?  Has anyone else experienced 
problems running multiple consumers off a message queue and sending the 
messages to a spring-ws component?
 
 
Here is my latest configuration:
** Note below 2 lines from my properites 
file.tcploaderServiceURIspring-ws:http://localhost:8080/LoaderService=://localhost:61616?jms.prefetchPolicy.queuePrefetch=1
 
bean id=propertyConfigurer 
class=org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
    property name=placeholderPrefix value=${ /
    property name=placeholderSuffix value=} /
    property name=locations
    valueclasspath:environment.properties/value
    /property
    /bean
 
    bean id=jmsConnectionFactory 
class=org.apache.activemq.ActiveMQConnectionFactory
   property name=brokerURL value=${messageQueueURI} /
    /bean
 
    bean id=pooledConnectionFactory 
class=org.apache.activemq.pool.PooledConnectionFactory
   property name=maxConnections value=50 /
   property name=maximumActive value=500 /
   property name=connectionFactory ref=jmsConnectionFactory /
    /bean
 
    bean id=jmsConfig 
class=org.apache.camel.component.jms.JmsConfiguration
   property name=connectionFactory ref=pooledConnectionFactory/
   property name=concurrentConsumers value=50/
    /bean
 
    bean id=activemq
    class=org.apache.activemq.camel.component.ActiveMQComponent
    property name=configuration ref=jmsConfig/
    /bean
 
    camelContext id=camel handleFault=true 
xmlns=http://camel.apache.org/schema/spring;
 
    endpoint id=loaderService uri=${loaderServiceURI} /
 
    onException
    exceptionjava.lang.Exception/exception
    redeliveryPolicy redeliveryDelay=1000 
maximumRedeliveries=2 /
    handledconstanttrue/constant/handled
    to uri=activemq:queue:loadableFailure /
    /onException
 
    route id=loaderWS
    from uri=activemq:queue:loadable /
    to ref=loaderService /
    /route
 
    /camelContext



From: Claus Ibsen claus.ib...@gmail.com
To: users@camel.apache.org users@camel.apache.org
Sent: Tuesday, October 4, 2011 11:50 AM
Subject: Re: Exception not getting caught and multiple consumers getting the 
same message

Could it be the spring-ws client returns a SOAP Fault and not an exception?
Camel error handler only reacts upon exceptions.

There is a flag you can enable on the route, handleFault=true, that
turns SOAP faults into exceptions,
and allow Camel error handler to react then.

On Mon, Oct 3, 2011 at 2:16 PM, Aaron Doyle a_r_do...@yahoo.com wrote:
 Hello,

 That did not seem to help fix my problem.  If I change my route to the
 following, the exception is caught and sent to the loadable failure queue.

 route id=loaderRoute
  from uri=activemq:queue:loadable
  doTry
  to uri=bean:loaderServiceClient?method=invokeService
  doCatch
 to uri=activemq:queue:loadableFailure /
  /doCatch
 /doTry
  route
 Is there any way to do a redelivery with the doTry/doCatch?

 Back to the onException problem
 The problem seems to be specific to a spring ws client.  The bean
 'loaderServiceClient' is a spring ws client and the exceptions do not get
 handled, if I replace the 'to' uri with
 'spring-ws:http://server.com:8080/service' the exception does not get
 handled either.  If I replace the 'to' uri with a test pojo where the method
 being called explicitly throws an exception, the exceptions are caught and
 handled by the onException.  Is it possible that there is something in the
 Spring WS Client that is eating the exception

 Lastly, on the second part of my question from first email, does it seem
 possible that I have multiple consumers grabbing the same message off of the
 queue to load (which is what is causing the exception to be thrown.)  If I
 run with 1 consumer, it runs without exceptions.

 -Aaron
 From: Claus Ibsen claus.ib...@gmail.com
 To: 

Re: Exception not getting caught and multiple consumers getting the same message

2011-10-07 Thread Aaron Doyle
my properties values did not display correctly, they are
messageQueueURI=tcp://localhost:61616?jms.prefetchPolicy.queuePrefetch=1
loaderServiceURI=spring-ws:http://localhost:8080/LoaderService
 



From: Aaron Doyle a_r_do...@yahoo.com
To: users@camel.apache.org users@camel.apache.org
Sent: Friday, October 7, 2011 11:55 AM
Subject: Re: Exception not getting caught and multiple consumers getting the 
same message

I tried the handleFault=true attribute and that did not enable the exceptions 
to get caught.  
 
The exceptions are caught when running one consumer, as soon as I increase the 
number of consumers, exceptions are not caught and messages start getting 
lost. I noticed that all 50 consumers are sharing the same connection, whereas 
I would think that all consumers get there own connection...  Adding a 
doTry/doCatch around the 'to' section of my route, does catch most of the 
exceptions but still some messages seem to get lost... Is there any way with 1 
consumer that I can process multiple messages asynchronously?  Or that I can 
force each consumer to get its own connection?  Has anyone else experienced 
problems running multiple consumers off a message queue and sending the 
messages to a spring-ws component?
 
 
Here is my latest configuration:
** Note below 2 lines from my properites 
file.tcploaderServiceURIspring-ws:http://localhost:8080/LoaderService=://localhost:61616?jms.prefetchPolicy.queuePrefetch=1
 
bean id=propertyConfigurer 
class=org.springframework.beans.factory.config.PropertyPlaceholderConfigurer
    property name=placeholderPrefix value=${ /
    property name=placeholderSuffix value=} /
    property name=locations
    valueclasspath:environment.properties/value
    /property
    /bean
 
    bean id=jmsConnectionFactory 
class=org.apache.activemq.ActiveMQConnectionFactory
   property name=brokerURL value=${messageQueueURI} /
    /bean
 
    bean id=pooledConnectionFactory 
class=org.apache.activemq.pool.PooledConnectionFactory
   property name=maxConnections value=50 /
   property name=maximumActive value=500 /
   property name=connectionFactory ref=jmsConnectionFactory /
    /bean
 
    bean id=jmsConfig 
class=org.apache.camel.component.jms.JmsConfiguration
   property name=connectionFactory ref=pooledConnectionFactory/
   property name=concurrentConsumers value=50/
    /bean
 
    bean id=activemq
    class=org.apache.activemq.camel.component.ActiveMQComponent
    property name=configuration ref=jmsConfig/
    /bean
 
    camelContext id=camel handleFault=true 
xmlns=http://camel.apache.org/schema/spring;
 
    endpoint id=loaderService uri=${loaderServiceURI} /
 
    onException
    exceptionjava.lang.Exception/exception
    redeliveryPolicy redeliveryDelay=1000 
maximumRedeliveries=2 /
    handledconstanttrue/constant/handled
    to uri=activemq:queue:loadableFailure /
    /onException
 
    route id=loaderWS
    from uri=activemq:queue:loadable /
    to ref=loaderService /
    /route
 
    /camelContext



From: Claus Ibsen claus.ib...@gmail.com
To: users@camel.apache.org users@camel.apache.org
Sent: Tuesday, October 4, 2011 11:50 AM
Subject: Re: Exception not getting caught and multiple consumers getting the 
same message

Could it be the spring-ws client returns a SOAP Fault and not an exception?
Camel error handler only reacts upon exceptions.

There is a flag you can enable on the route, handleFault=true, that
turns SOAP faults into exceptions,
and allow Camel error handler to react then.

On Mon, Oct 3, 2011 at 2:16 PM, Aaron Doyle a_r_do...@yahoo.com wrote:
 Hello,

 That did not seem to help fix my problem.  If I change my route to the
 following, the exception is caught and sent to the loadable failure queue.

 route id=loaderRoute
  from uri=activemq:queue:loadable
  doTry
  to uri=bean:loaderServiceClient?method=invokeService
  doCatch
 to uri=activemq:queue:loadableFailure /
  /doCatch
 /doTry
  route
 Is there any way to do a redelivery with the doTry/doCatch?

 Back to the onException problem
 The problem seems to be specific to a spring ws client.  The bean
 'loaderServiceClient' is a spring ws client and the exceptions do not get
 handled, if I replace the 'to' uri with
 'spring-ws:http://server.com:8080/service' the exception does not get
 handled either.  If I replace the 'to' uri with a test pojo where the method
 being called explicitly throws an exception, the exceptions are caught and
 handled by the 

Re: ProducerTemplate batch commits?

2011-10-07 Thread David Karlsen
He was on holidays this week - back next - update then.
Den 5. okt. 2011 02:36 skrev David Karlsen davidkarl...@gmail.com
følgende:

 I http://twitter.com/#!/davidkarlsen asked them on twitter:
 http://twitter.com/#!/runepeter

 2011/10/4 aedwards a...@middleware360.com

 I am using ActiveMQ.   Same, also interested on the consuming side.  But
 the
 more urgent one for me is producing at the moment.

 The link doesn't work for me, get this guinee pig show up. ;-)

 Is it released under Apache license?  have they considered donating it
 back?

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




 --
 --
 David J. M. Karlsen - http://www.linkedin.com/in/davidkarlsen




How do I set up an AMQP/QPid connection?

2011-10-07 Thread Gregg Carrier
Hi - seriously new to this, so forgive the basic questions. I'm trying
to set up a connection to QPid and based on some examples I've seen, I
have something like this:

val context = new DefaultCamelContext
context.addComponent(qpid,
amqpComponent(amqp://guest:gu...@myserver.myhost.com?brokerList='tcp://myhost.com:5672'))
context.addRoutes(new AmqpRouteBuilder)
context.start

class AmqpRouteBuilder extends RouteBuilder {
  qpid:topic:pam_logEntry_request -- file://test2
}

First off, is this generally the correct way to go?

Secondly, could someone explain the nature of the URI that is passed
to amqpComponent:
 amqp://guest:gu...@myserver.myhost.com?brokerList='tcp://myhost.com:5672'

Could someone break down the parts of that URI for me?

Are guest/guest login credentials for the machine QPid is running on?
Or are they credentials for the QPid server itself? My QPid setup
requires no credentials, so what should the URI look like in that
case?

It seems odd to me that the examples I have seen have an amqp:// uri
with a brokerList query parameter. Is that the correct way to do it? I
would have expected to just put in a URL pointing to the QPID host and
port. What are the two parts of the URI for if it is indeed the
correct format?

Of course I'm writing this because I haven't been able to get any
connection to work.

Thanks for any help.

Gregg


running a CAMEL exmple

2011-10-07 Thread newbiee
I would like to first thank for prompt replies. CAMEL is a great product and
through this site, I'm learning and making my concenpts clear.

Here is my question:

I am successfully running examples using MAVEN. MAVEN compiles the java code
and retrieved all the dependencies. Now suppose I want to take the compiled
code and  run on a different machine. I need to know what else will I need
to copy besides the CLASS files in order to be able to successfully run the
compiled code on a different machine.

Thank you


--
View this message in context: 
http://camel.465427.n5.nabble.com/running-a-CAMEL-exmple-tp4881222p4881222.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: running a CAMEL exmple

2011-10-07 Thread Gregg Carrier
mvn install

Should build you a jar in target/ that contains your dependencies. You probably 
want to package your projects in this way rather than manually copying class 
files and jar dependencies around manually.

On Oct 7, 2011, at 12:42 PM, newbiee m_ess...@hotmail.com wrote:

 I would like to first thank for prompt replies. CAMEL is a great product and
 through this site, I'm learning and making my concenpts clear.
 
 Here is my question:
 
 I am successfully running examples using MAVEN. MAVEN compiles the java code
 and retrieved all the dependencies. Now suppose I want to take the compiled
 code and  run on a different machine. I need to know what else will I need
 to copy besides the CLASS files in order to be able to successfully run the
 compiled code on a different machine.
 
 Thank you
 
 
 --
 View this message in context: 
 http://camel.465427.n5.nabble.com/running-a-CAMEL-exmple-tp4881222p4881222.html
 Sent from the Camel - Users mailing list archive at Nabble.com.


Re: running a CAMEL exmple

2011-10-07 Thread Willem Jiang
If you just want to run the example by copy the class file, you need up 
setup the class path yourself, if you don't want to use maven.


If you are using maven ,  I suggest you to run maven install with the 
example source code first.


On Sat Oct  8 03:42:17 2011, newbiee wrote:

I would like to first thank for prompt replies. CAMEL is a great product and
through this site, I'm learning and making my concenpts clear.

Here is my question:

I am successfully running examples using MAVEN. MAVEN compiles the java code
and retrieved all the dependencies. Now suppose I want to take the compiled
code and  run on a different machine. I need to know what else will I need
to copy besides the CLASS files in order to be able to successfully run the
compiled code on a different machine.

Thank you


--
View this message in context: 
http://camel.465427.n5.nabble.com/running-a-CAMEL-exmple-tp4881222p4881222.html
Sent from the Camel - Users mailing list archive at Nabble.com.





--
Willem
--
FuseSource
Web: http://www.fusesource.com
Blog:http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang 
Weibo: willemjiang 



Re: Configuring cxfEndpoint to make secure (HTTPS) : need help

2011-10-07 Thread Willem Jiang

Which version of Camel are you using?
I can see you are still using Jetty6 from the configuration.
Can you change the engine port to 9001 and try it again?

On 10/7/11 7:02 PM, amarnath.chavva wrote:

Hi every one,
Am using cxfEndpoint to expose my services as web services, now I would like
make this as secure by marking those HTTPS.

the following is my spring context file,


cxf:cxfEndpoint id=httpEndpoint
address=https://0.0.0.0:9001/MyService;
serviceClass=com.mycompany.WebServiceInerface
endpointName=httpttrans:httptransferServiceEndpoint
serviceName=httpttrans:httptransferService
xmlns:httpttrans=https://httptransfer.mycompany.com/;
/cxf:cxfEndpoint

httpj:engine-factory bus=cxf
httpj:identifiedTLSServerParameters id=secure
httpj:tlsServerParameters
sec:keyManagers keyPassword=password
sec:keyStore type=JKS password=password 
file=server.jks /
/sec:keyManagers
sec:trustManagers
sec:keyStore type=JKS password=password 
file=truststore.jks /
/sec:trustManagers
/httpj:tlsServerParameters
/httpj:identifiedTLSServerParameters

httpj:engine port=0
httpj:tlsServerParametersRef id=secure /
httpj:threadingParameters minThreads=5  maxThreads=10 
/
httpj:connector
beans:bean 
class=org.mortbay.jetty.bio.SocketConnector
beans:property name=port value=9001 
/
/beans:bean
/httpj:connector
httpj:handlers
beans:bean 
class=org.mortbay.jetty.handler.DefaultHandler /
/httpj:handlers
httpj:sessionSupporttrue/httpj:sessionSupport
/httpj:engine
/httpj:engine-factory


When trying to run as server to publish my serivices, the following error is
observed.

Protocol mismatch for port 9001: engine's protocol is http, the url
protocol is https

Please guide me to resolve this issue ASAP.

Regards,
Chavva.




--
View this message in context: 
http://camel.465427.n5.nabble.com/Configuring-cxfEndpoint-to-make-secure-HTTPS-need-help-tp4879695p4879695.html
Sent from the Camel - Users mailing list archive at Nabble.com.




--
Willem
--
FuseSource
Web: http://www.fusesource.com
Blog:http://willemjiang.blogspot.com (English)
 http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang