camel jpa issue

2013-05-27 Thread lmanchanda75
hi,

I am having an issue in application using jpa (as consumer), following is
the camel context.


http://www.osgi.org/xmlns/blueprint/v1.0.0";
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
   xmlns:camel="http://camel.apache.org/schema/blueprint";
xmlns:jpa="http://aries.apache.org/xmlns/jpa/v1.1.0";
   xsi:schemaLocation="
   http://www.osgi.org/xmlns/blueprint/v1.0.0
http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
   http://camel.apache.org/schema/blueprint
http://camel.apache.org/schema/blueprint/camel-blueprint.xsd
   http://aries.apache.org/xmlns/jpa/v1.1.0
http://aries.apache.org/schemas/jpa/jpa_110.xsd";> 


  

  http://camel.apache.org/schema/blueprint";>
   
   
   
   


 




 
  
  
  
  
  
  
  
  
  



  






Following is the persistence.xml




http://java.sun.com/xml/ns/persistence"; 
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; version="1.0">
 
  
  
 org.apache.openjpa.persistence.PersistenceProviderImpl
   
  
osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=jdbc/postgresds
  
osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=jdbc/postgresds)
 manchanda.lalit.TestJpa.PurchaseOrder
 true


  
  
  


  






*When I start the application I get the following error, seems I am missing
something basic, though I have checked some samples but no way forward.*

22:32:25,963 | DEBUG | pa.PurchaseOrder | JpaTransactionManager|
136 - org.springframework.transaction - 3.1.3.RELEASE | Creating new
transaction with name [null]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT^M
22:32:25,963 | DEBUG | pa.PurchaseOrder | JpaTransactionManager|
136 - org.springframework.transaction - 3.1.3.RELEASE | Opened new
EntityManager
[org.apache.aries.jpa.container.impl.EntityManagerWrapper@1e2510c] for JPA
transaction^M
22:32:25,966 | DEBUG | pa.PurchaseOrder | JpaConsumer  |
244 - org.apache.camel.camel-jpa - 2.10.0.redhat-60024 | Acquiring exclusive
lock on entity: null^M
22:32:25,966 | DEBUG | pa.PurchaseOrder | JpaConsumer  |
244 - org.apache.camel.camel-jpa - 2.10.0.redhat-60024 | Failed to achieve
lock on entity: null. Reason: java.lang.IllegalArgumentException: lock can
not be invoked on "null". This entity is either detached or not persistent
or null.^M
java.lang.IllegalArgumentException: lock can not be invoked on "null". This
entity is either detached or not persistent or null.^M
at
org.apache.openjpa.persistence.EntityManagerImpl.assertValidAttchedEntity(EntityManagerImpl.java:1385)[243:org.apache.openjpa:2.2.0]^M
at
org.apache.openjpa.persistence.EntityManagerImpl.lock(EntityManagerImpl.java:1199)[243:org.apache.openjpa:2.2.0]^M
at
org.apache.openjpa.persistence.EntityManagerImpl.lock(EntityManagerImpl.java:1188)[243:org.apache.openjpa:2.2.0]^M
at
org.apache.aries.jpa.container.impl.EntityManagerWrapper.lock(EntityManagerWrapper.java:169)^M
at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source)^M
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_43]^M
at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_43]^M
at
org.springframework.orm.jpa.JpaTemplate$CloseSuppressingInvocationHandler.invoke(JpaTemplate.java:429)[242:org.springframework.orm:3.1.3.RELEASE]^M
at com.sun.proxy.$Proxy42.lock(Unknown
Source)[256:org.apache.aries.jpa.container:1.0.1.redhat-60024]^M
at
org.apache.camel.component.jpa.JpaConsumer.lockEntity(JpaConsumer.java:262)[244:org.apache.camel.camel-jpa:2.10.0.redhat-60024]^M
at
org.apache.camel.component.jpa.JpaConsumer.processBatch(JpaConsumer.java:150)[244:org.apache.camel.camel-jpa:2.10.0.redhat-60024]^M
at
org.apache.camel.component.jpa.JpaConsumer$1.doInJpa(JpaConsumer.java:97)[244:org.apache.camel.camel-jpa:2.10.0.redhat-60024]^M
at
org.apache.camel.component.jpa.JpaTemplateTransactionStrategy$1$1.doInJpa(JpaTemplateTransactionStrategy.java:82)[244:org.apache.camel.camel-jpa:2.10.0.redhat-60024]^M
at
org.springframework.orm.jpa.JpaTemplate.execute(JpaTemplate.java:187)[242:org.springframework.orm:3.1.3.RELEASE]^M
at
org.springframework.orm.jpa.JpaTemplate.execute(JpaTemplate.java:150)[242:org.springframework.orm:3.1.3.RELEASE]^M
at
org.apache.camel.component.jpa.JpaTemplateTransactionStrategy$1.doInTransaction(JpaTemplateTransactionStrategy.java:80)[244:org.apache.camel.camel-jpa:2.10.0.redhat-60024]^M
at
org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)[136:org.springframework.transaction:3.1.3.RELEASE]^M
at
org.apache.camel.component.jpa.JpaTemplateTransactionStrategy.execute(JpaTemplateTransactionStrategy.java:78)[244:org.apache.camel.camel-jpa:2.10.0.redhat-60024]^M
at
org

Re: Camel-configuration

2013-05-27 Thread Christian Müller
What's your issue?

Best,
Christian

Sent from a mobile device
Am 27.05.2013 08:45 schrieb "milan777" :

> Please help me to connect the java with sql management studio 2008...thanx
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-configuration-tp5732936p5733234.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>


camel 2.11 release with activemq-camel 5-8?

2013-05-27 Thread ltsallas
Hi all, 

Which activemq-camel artifact version  should I use with camel 2.11?

When using activemq-camel 5.8 with  camel 2.11 I get a 

I get a Caused by: java.lang.NoSuchMethodError:
org.apache.camel.util.ObjectHelper.notNull(Ljava/lang/Object;Ljava/lang/String;)V
at
org.apache.camel.component.jms.JmsBinding.makeJmsMessage(JmsBinding.java:285)
~[camel-jms-2.10.3.jar:2.10.3]

activemq-camel 5.8 depends on camel-jms 2.10.3

There is no problem when using camel 2.10.3 release






--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-2-11-release-with-activemq-camel-5-8-tp5733244.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Communication between two processes without using external messaging systems or files

2013-05-27 Thread Mohammad Shadab Ali
Hi,

We have a requirement where we are having two processes. The output of one 
process will be the input for the second one. We do not want to use the 
external messaging systems like active MQ etc and also we do not want to use 
file component.
We want something like first process will dump the message in some internal 
queue(or something else) and the second process will be polling this queue for 
the messages.
Is there any component available in camel to achieve this requirement.
Thanks in advance.

Regards,
Shadab


*** This e-mail (and any attachments), is confidential and may be privileged. 
It may be read, copied and used only
by intended recipients. Unauthorized access to this e-mail (or attachments) and 
disclosure or copying of its
contents or any action taken in reliance on it is unlawful. Unintended 
recipients must notify the sender immediately
by e-mail/phone & delete it from their system without making any copies or 
disclosing it to a third person.***

This e-mail (and any attachments), is confidential and may be privileged. It 
may be read, copied and used only
by intended recipients. Unauthorized access to this e-mail (or attachments) and 
disclosure or copying of its 
contents or any action taken in reliance on it is unlawful. Unintended 
recipients must notify the sender immediately 
by e-mail/phone & delete it from their system without making any copies or 
disclosing it to a third person.



Re: Camel-configuration

2013-05-27 Thread milan777
hi,christian I am not getting the connection with sql management studio 
2008so,i am not getting the connection with it so can u please suggest
the connection string or any better steps to get connection with it...thanx
in advance 



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


camel-cxf and synchronous vs. asynchronous endpoints

2013-05-27 Thread Jens
Hi,

I have a very simple route of the form

from("cxf:bean:router").to("cxf:bean:realEP?synchronous=true")

The "realEP" endpoint uses JMS. If the "router" endpoint uses HTTP things
work as expected (presumably because HTTP is synchronous by default) but if
the "router" endpoint is JMS as well (and therefore async by default) the
route "hangs" after calling the "realEP" and never returns the response to
the caller. Switching the "router" endpoint to synchronous operation as well
seems to fix that, but is this behaviour to be expected? Is there another
way to make it work?

Thanks,
Jens



--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-cxf-and-synchronous-vs-asynchronous-endpoints-tp5733246.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: MailComponent/MailConsumer misses Mails

2013-05-27 Thread cgiera
I have upgraded to camel 2.11.0(not all referenced libs but camel mail
component doesn't use any referenced libs) and mail 1.5.

The problem still exists in the new versions.
I will debug the MailConsumer now and I try to find out what's going on.
I believe there is something wrong with this code:



My test routes look like the following:


The missing mails can be reduces when setting maxMessagesPerPoll to a small
number, but it doesn't solve the problem.

kind regards,
Christoph
 



--
View this message in context: 
http://camel.465427.n5.nabble.com/MailComponent-MailConsumer-misses-Mails-tp5733010p5733247.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Sftp bug in Camel 2.11.0

2013-05-27 Thread Aki Yoshida
Hi Bengt,
the quoted code itself is needed for the normal case to ensure the stepwise
operation moves the path upwards from the current directory to where it
started without touching its upper directory which you potentially have no
authorization to access.

but the code does not handle the case when the path is at the root, as you
describe. In that case, this code needs to be skipped as it is not needed
(because you started out from the root and you have authorization down from
the root to the current directory).

I commented to the ticket.

regards, aki


2013/5/6 Bengt Rodehav 

> JIRA created:
>
> https://issues.apache.org/jira/browse/CAMEL-6335
>
> /Bengt
>
>
> 2013/5/6 Bengt Rodehav 
>
> > Hello Hadrian,
> >
> > I'm not really interested in the blame issue. I'm really glad that there
> > are so many competent people developing Camel which I think is a great
> > product. It might be interesting, though, to see how long the bug has
> been
> > there and what versions are affected.
> >
> > I've also been thinking why it hasn't been picked up by any tests. I
> > realize that it must be very difficult to design tests for integration
> > components like sftp. Ideally you would have a number of ftp/ftps/sftp
> > servers to perform integration tests against. But I guess that is hard to
> > maintain. I don't think unit tests (with mocking) will catch bugs like
> the
> > above. How are ftp/ftps/sftp integrations tested?
> >
> > I have noticed that some sftp servers silently ignore attempts to change
> > directory to a non-existing directory - you won't get there but you won't
> > get an error code either. But some will give you an error code (like the
> > one we are integrating to right now).
> >
> > I will create a JIRA. As for patching I guess the most important part is
> > to determine if it is necessary to change back to the home directory in a
> > stepwise fashion or not. If not, then I think we can just remove that
> code.
> > If it is necessary, then we must instead fix it.
> >
> > /Bengt
> >
> >
> >
> > 2013/5/3 Hadrian Zbarcea 
> >
> >> Bengt, many thanks for reporting this.
> >>
> >> Either svn or git tells you pretty quickly how that code got there (git
> >> blame). Do you mind raising a jira for this embarrassing bug? If you
> want
> >> to contribute a patch it'd be highly appreciated. That aside, I'll look
> >> into it in the afternoon. I'll need to check if that piece of code was
> >> meant to address another usecase or was an oversight and insufficient
> >> testing.
> >>
> >> Cheers,
> >> Hadrian
> >>
> >>
> >>
> >> On 05/03/2013 10:35 AM, Bengt Rodehav wrote:
> >>
> >>> Unfortunately I seem to have found another bug in Camel 2.11.0
> regarding
> >>> sftp. I noticed it when I removed the "stepwise=false" argument from my
> >>> routes thus enabling the default stepwise way of changing directory.
> >>>
> >>> The problematic section begins at line 404 in SftpOperations.java:
> >>>
> >>> *404:*if (getCurrentDirectory().**startsWith(path)) {
> >>> *405:*// use relative path
> >>> *406:*String p = getCurrentDirectory().**
> >>> substring(path.length());
> >>> *407:*if (p.length() == 0) {
> >>> *408:*return;
> >>> *409:*}
> >>> *410:*// the first character must be '/' and hence removed
> >>> *411:*path =
> >>> UP_DIR_PATTERN.matcher(p).**replaceAll("/..").substring(1)**;
> >>> *412:*}
> >>>
> >>>
> >>>
> >>> The problem does not arise when stepping down into the directory to
> poll
> >>> but when going back to the directory where we started. Assume that the
> >>> home
> >>> directory in the sftp server is "/" and I want to poll the directory
> "in"
> >>> relative to the root. My endpoint would look something like this:
> >>>
> >>>sftp://user@server/in?**password=secret
> >>>
> >>> What happens is that the "i" in "in" is removed and Camel attempts to
> >>> change to directory "n". Looking at the code above, the following
> >>> happens:
> >>>
> >>> - The current directory is "/in" since we have previously succeeded in
> >>> moving there and polling for files. We are now attempting to go back to
> >>> where we started, therefore "path" is "/".
> >>> - On line 406, the variable "p" will be set to "in", thus removing the
> >>> leading "/".
> >>> - On line 411 an incorrect assumption is made: It is assumed that the
> >>> first
> >>> character must be "/" but the leading "/" was removed on line 406. The
> >>> result is therefore that "path" is set to "n" instead of "in".
> >>>
> >>> I haven't investigated when this error was introduced. I did however
> >>> compare with the corresponding logic in FtpOperations.java. In that
> file
> >>> the section quoted above does not exist at all. It seems to me that the
> >>> purpose with this code is to, stepwise, change directory up to ".." -
> one
> >>> directory at a time instead of going straight to "/". It seems very
> >>> unnecessary to me but I assume there is

Re: Communication between two processes without using external messaging systems or files

2013-05-27 Thread Robert Davies
hi Shadab,

it really sounds like you really should be using ActiveMQ. You can run it 
embedded - collocated with your producing process - and you don't need to use 
persistence
see here how to set it up - 
http://activemq.apache.org/how-do-i-embed-a-broker-inside-a-connection.html and 
here's an example with camel - 
http://camel.apache.org/walk-through-an-example.html

I know you don't want to use ActiveMQ - but the best way to do what you want is 
actually with ActiveMQ :)

thanks,

Rob


On 27 May 2013, at 10:01, Mohammad Shadab Ali  wrote:

> Hi,
> 
> We have a requirement where we are having two processes. The output of one 
> process will be the input for the second one. We do not want to use the 
> external messaging systems like active MQ etc and also we do not want to use 
> file component.
> We want something like first process will dump the message in some internal 
> queue(or something else) and the second process will be polling this queue 
> for the messages.
> Is there any component available in camel to achieve this requirement.
> Thanks in advance.
> 
> Regards,
> Shadab
> 
> 
> *** This e-mail (and any attachments), is confidential and may be privileged. 
> It may be read, copied and used only
> by intended recipients. Unauthorized access to this e-mail (or attachments) 
> and disclosure or copying of its
> contents or any action taken in reliance on it is unlawful. Unintended 
> recipients must notify the sender immediately
> by e-mail/phone & delete it from their system without making any copies or 
> disclosing it to a third person.***
> 
> This e-mail (and any attachments), is confidential and may be privileged. It 
> may be read, copied and used only
> by intended recipients. Unauthorized access to this e-mail (or attachments) 
> and disclosure or copying of its 
> contents or any action taken in reliance on it is unlawful. Unintended 
> recipients must notify the sender immediately 
> by e-mail/phone & delete it from their system without making any copies or 
> disclosing it to a third person.
> 



Re: prevent CamelContext from shutting down in blueprint

2013-05-27 Thread Ioan Eugen Stan
Hello Martin,

I've managed to make it work by trimming down and simplifying my
blueprint.xml config. Looks like I was doing something the wrong way.
I'll grow slowly so things and hopefully things won't break.

Cheers,

On Thu, May 23, 2013 at 3:06 PM, Martin Stiborský
 wrote:
> yes, it is doing the same to me :) -
> http://camel.465427.n5.nabble.com/Upgrade-Camel-2-10-1-2-11-0-Camel-keeps-restarting-td5731854.html
> I'll try to find out more what is happening there...
>
> On Thu, May 23, 2013 at 1:53 PM, Ioan Eugen Stan  
> wrote:
>> Hello Martin,
>>
>> It's simple: Just after the Camel Context start it shuts down,
>> gracefully. I've pasted the logging with debug [1].
>> If it helps.
>>
>> [1] https://paste.apache.org/cnfW
>
>
>
> --
> S pozdravem / Best regards
> Martin Stiborský
>
> Jabber: st...@njs.netlab.cz
> Twitter: http://www.twitter.com/stibi



-- 
Ioan Eugen Stan
0720 898 747


RE: Communication between two processes without using external messaging systems or files

2013-05-27 Thread Diether

I'm not sure if it is possible, but perhaps you can do it with a quartz poller 
doing an enrich from a direct endpoint.
Something like this (out of my head)

from("direct:processOne")
.to("direct:processTwo");

from("quartzPoller")
.pollEnrich("direct:processTwo")
.bean(otherProcessors...);


http://camel.apache.org/content-enricher.html
http://camel.apache.org/quartz.html

It's perhaps something to try.
Otherwise I also believe you'll have to use some external mechanism (jms, file, 
database).



Van: Robert Davies [via Camel] [ml-node+s465427n5733251...@n5.nabble.com]
Verzonden: maandag 27 mei 2013 13:32
To: Wuyts Diether
Onderwerp: Re: Communication between two processes without using external 
messaging systems or files

hi Shadab,

it really sounds like you really should be using ActiveMQ. You can run it 
embedded - collocated with your producing process - and you don't need to use 
persistence
see here how to set it up - 
http://activemq.apache.org/how-do-i-embed-a-broker-inside-a-connection.html and 
here's an example with camel - 
http://camel.apache.org/walk-through-an-example.html

I know you don't want to use ActiveMQ - but the best way to do what you want is 
actually with ActiveMQ :)

thanks,

Rob


On 27 May 2013, at 10:01, Mohammad Shadab Ali <[hidden 
email]> wrote:

> Hi,
>
> We have a requirement where we are having two processes. The output of one 
> process will be the input for the second one. We do not want to use the 
> external messaging systems like active MQ etc and also we do not want to use 
> file component.
> We want something like first process will dump the message in some internal 
> queue(or something else) and the second process will be polling this queue 
> for the messages.
> Is there any component available in camel to achieve this requirement.
> Thanks in advance.
>
> Regards,
> Shadab
>
> 
> *** This e-mail (and any attachments), is confidential and may be privileged. 
> It may be read, copied and used only
> by intended recipients. Unauthorized access to this e-mail (or attachments) 
> and disclosure or copying of its
> contents or any action taken in reliance on it is unlawful. Unintended 
> recipients must notify the sender immediately
> by e-mail/phone & delete it from their system without making any copies or 
> disclosing it to a third person.***
>
> This e-mail (and any attachments), is confidential and may be privileged. It 
> may be read, copied and used only
> by intended recipients. Unauthorized access to this e-mail (or attachments) 
> and disclosure or copying of its
> contents or any action taken in reliance on it is unlawful. Unintended 
> recipients must notify the sender immediately
> by e-mail/phone & delete it from their system without making any copies or 
> disclosing it to a third person.
>




If you reply to this email, your message will be added to the discussion below:
http://camel.465427.n5.nabble.com/Communication-between-two-processes-without-using-external-messaging-systems-or-files-tp5733248p5733251.html
To start a new topic under Camel - Users, email 
ml-node+s465427n465428...@n5.nabble.com
To unsubscribe from Camel - Users, click 
here.
NAML




--
View this message in context: 
http://camel.465427.n5.nabble.com/Communication-between-two-processes-without-using-external-messaging-systems-or-files-tp5733248p5733255.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Exchanges Aggregation for batch loading to database

2013-05-27 Thread Okello Nelson
Hi Guys,

I have the following Java DSL:

from(queuePrefix + fileType + "_ValidQ?concurrentConsumers=100")
.routeId(fileType + "_ValidQ-To-DB")
.onException(Exception.class).redeliveryPolicyRef("redeliverypolicy")
.to(queuePrefix + fileType + "_DBLoading_ErrorQ").end()
.aggregate(header("CRBOriginalFileName"))
.completionSize(5000)
.parallelProcessing()
.groupExchanges()
.to("bean:keBouncedChequeLoader");

The destination is a bean. The bean is as shown below:

public void process(Exchange exchange) throws Exception {
List exchanges = exchange.getProperty(Exchange.GROUPED_EXCHANGE,
List.class);
Session session = SessionFactoryUtils.getSession(sessionFactory, true);
Transaction tx = session.beginTransaction();
 for(int i = 0; i < exchanges.size(); i++) {
KEBouncedCheque bc = (KEBouncedCheque) exchanges.get(i).getIn().getBody();
session.save(exchanges.get(i));
FileUtils.writeStringToFile(new File("C:/tmp/bc.txt"), bc.getClientNumber()
+ "\n", true);
if( i % 20 == 0) {
session.flush();
session.clear();
}
}
 tx.commit();
session.close();
 }

The message doesn't seem to reach this bean. In ActiveMQ, I'm seeing the
error

"Unknown message type [org.apache.activemq.command.ActiveMQMessage]"...

I'm not sure what I'm doing wrong. Any assistance will be appreciated very
much.

Kind Regards,
Okello Nelson.


Re: MailComponent/MailConsumer misses Mails

2013-05-27 Thread cgiera
Ok, this was a big mistake, when i set the maxMessagesPerPoll option to 1 and
the pollinginterval to 1 sec only every ~ 5th message will be processed!!
The second test route sends every second 4 messages to the inbox.

I spend a lot of time with debugging now but I wasn't able to find the code
segment where this goes wrong.


cgiera wrote
> The missing mails can be reduces when setting maxMessagesPerPoll to a
> small number, but it doesn't solve the problem.
> 
> kind regards,
> Christoph





--
View this message in context: 
http://camel.465427.n5.nabble.com/MailComponent-MailConsumer-misses-Mails-tp5733010p5733264.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Exchanges Aggregation for batch loading to database

2013-05-27 Thread Okello Nelson
Hi Guys,

I've been trying to sort this issue. I've created a custom aggregation
strategy instead of relying on the inbuilt "groupExchanges()". My
aggregation strategy is shown below:

@Service( value = "keAggregationStrategy" )
public class KEAggregationStrategy implements IKEAggregationStrategy {

public Exchange aggregate(Exchange oldExchange, Exchange newExchange) {
Object newBody = newExchange.getIn().getBody();
ArrayList list = null;
 if(oldExchange == null) {
list = new ArrayList();
list.add(newBody);
newExchange.getIn().setBody(list);
return newExchange;
 } else {
list = oldExchange.getIn().getBody(ArrayList.class);
list.add(newBody);
return oldExchange;
}
 }

}

Now, when I run the app, the following exception is thrown by ActiveMQ:
FYI: My environment is ActiveMQ 5.8, Camel 2.11.0. I'm not using embedded
ActiveMQ.

javax.jms.JMSException: Failed to build body from content.
Serializable class not available to broker. Reason:
java.lang.ClassNotFoundException:
com.package.models.bc.ke.MyEntityClass




On Mon, May 27, 2013 at 3:08 PM, Okello Nelson  wrote:

> Hi Guys,
>
> I have the following Java DSL:
>
> from(queuePrefix + fileType + "_ValidQ?concurrentConsumers=100")
> .routeId(fileType + "_ValidQ-To-DB")
>  .onException(Exception.class).redeliveryPolicyRef("redeliverypolicy")
> .to(queuePrefix + fileType + "_DBLoading_ErrorQ").end()
>  .aggregate(header("CRBOriginalFileName"))
> .completionSize(5000)
> .parallelProcessing()
>  .groupExchanges()
> .to("bean:keBouncedChequeLoader");
>
> The destination is a bean. The bean is as shown below:
>
> public void process(Exchange exchange) throws Exception {
> List exchanges = exchange.getProperty(Exchange.GROUPED_EXCHANGE,
> List.class);
>  Session session = SessionFactoryUtils.getSession(sessionFactory, true);
> Transaction tx = session.beginTransaction();
>  for(int i = 0; i < exchanges.size(); i++) {
> KEBouncedCheque bc = (KEBouncedCheque) exchanges.get(i).getIn().getBody();
>  session.save(exchanges.get(i));
> FileUtils.writeStringToFile(new File("C:/tmp/bc.txt"),
> bc.getClientNumber() + "\n", true);
>  if( i % 20 == 0) {
> session.flush();
> session.clear();
>  }
> }
>  tx.commit();
>  session.close();
>  }
>
> The message doesn't seem to reach this bean. In ActiveMQ, I'm seeing the
> error
>
> "Unknown message type [org.apache.activemq.command.ActiveMQMessage]"...
>
> I'm not sure what I'm doing wrong. Any assistance will be appreciated very
> much.
>
> Kind Regards,
> Okello Nelson.
>



-- 
Kind Regards,
Okello Nelson
+254 722 137 826
cn.oke...@gmail.com


Test route with CXF endpoint

2013-05-27 Thread Chubutin
Hi, Im trying to test a cxf route that I have. This route have a cxf endpoint
and a xslt transformation (in this example the transformation returns always
a mock result). If I deploy this route into Fuse this works great, but Im
trying to test it with Camel in differents alternatives.

Im a little confuse about Test with Camel and an OSGi environment. If I wish
test a Camel rout and the orchestation between the endpoints, should I test
with CamelBlueprintTestSupport or an approach with
CamelSpringJUnit4ClassRunner it's fine? Well, i tried with both tests.


First, I tried an approach with CamelSpringJUnit4ClassRunner and
annotations. in this way the CXF Poroducer needs a default operation, but I
putted into the test. This is my test:


@RunWith(CamelSpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:camel-context-test.xml")
@DisableJmx(true)
@DirtiesContext(classMode = ClassMode.AFTER_EACH_TEST_METHOD)
public class CamelMockedRouteTest
{

@Autowired
protected CamelContext context;

@EndpointInject(uri = "mock:result")
protected MockEndpoint resultEndpoint;

@Produce(uri = "cxf:bean:CustomersServiceConsumerEndpoint")
protected ProducerTemplate inputProducerTemplate;

@Test
public void testRespondToMessageUsingMocks() throws Exception
{
Resource xmlFile = new ClassPathResource("in.xml");
InputStream stream = xmlFile.getInputStream();
String body = IOUtils.toString(stream);
resultEndpoint.setMinimumExpectedMessageCount(1);

//   Prepare the request message for the camel-cxf procedure
 Map mapHeaders = new HashMap();
 mapHeaders.put(CxfConstants.OPERATION_NAMESPACE,
 "http:customer.service.esb.com/");
 mapHeaders.put(CxfConstants.OPERATION_NAME, 
"getCustomerByCuit");

inputProducerTemplate.requestBodyAndHeader("cxf:bean:CustomersServiceConsumerEndpoint",
 body, mapHeaders);
inputProducerTemplate.requestBody(body);
resultEndpoint.assertIsSatisfied();

}

}

and this is my camel-context-test.xml









http://camel.apache.org/schema/spring";>








No errors in my log file 

[  main] TestContextManager INFO 
@TestExecutionListeners is not present for class [class
com.tecplata.esb.test.camel.CamelMockedRouteTest]: using defaults.
[  main] CamelSpringTestContextLoader   DEBUG
Loading ApplicationContext for locations [classpath:camel-context-test.xml].
[  main] XmlBeanDefinitionReaderINFO 
Loading XML bean definitions from class path resource
[camel-context-test.xml]
[  main] CamelNamespaceHandler  DEBUG Using
org.apache.camel.spring.CamelContextFactoryBean as
CamelContextBeanDefinitionParser
[  main] CamelNamespaceHandler  DEBUG
Registered default: org.apache.camel.spring.CamelProducerTemplateFactoryBean
with id: template on camel context: contextTest
[  main] CamelNamespaceHandler  DEBUG
Registered default: org.apache.camel.spring.CamelConsumerTemplateFactoryBean
with id: consumerTemplate on camel context: contextTest
[  main] CamelSpringTestContextLoader   INFO 
Disabling Camel JMX globally as DisableJmx annotation was found and
disableJmx is set to true.
[  main] GenericApplicationContext  INFO 
Refreshing
org.springframework.context.support.GenericApplicationContext@cb6009:
startup date [Mon May 27 11:03:47 ART 2013]; root of context hierarchy
[  main] DefaultListableBeanFactory INFO 
Pre-instantiating singletons in
org.springframework.beans.factory.support.DefaultListableBeanFactory@1566a6c:
defining beans
[CustomersServiceConsumerEndpoint,template,consumerTemplate,contextTest:beanPostProcessor,contextTest,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor];
root of factory hierarchy
[  main] SpringCamelContext DEBUG Set
the application context classloader to:
sun.misc.Launcher$AppClassLoader@45a877
[  main] bstractCamelContextFactoryBean DEBUG Found
JAXB created routes:
[Route[[From[cxf:bean:CustomersServiceConsumerEndpoint]] ->
[To[xslt:xslt/mockCustomers.xslt?failOnNullBody=false], To[mock:result
[  main]

Re: MailComponent/MailConsumer misses Mails

2013-05-27 Thread cgiera
I've found the code which forces all fetched messages to get marked as SEEN
even I have set the maxMessagesPerPoll option to 1.

 

I just can't understand what is going wrong here, after flushBuffer of this
OutputStream all messages are marked as seen.

kind regards,
Christoph


cgiera wrote
> Ok, this was a big mistake, when i set the maxMessagesPerPoll option to 1
> and the pollinginterval to 1 sec only every ~ 5th message will be
> processed!!
> The second test route sends every second 4 messages to the inbox.
> 
> I spend a lot of time with debugging now but I wasn't able to find the
> code segment where this goes wrong.
> cgiera wrote
>> The missing mails can be reduces when setting maxMessagesPerPoll to a
>> small number, but it doesn't solve the problem.
>> 
>> kind regards,
>> Christoph





--
View this message in context: 
http://camel.465427.n5.nabble.com/MailComponent-MailConsumer-misses-Mails-tp5733010p5733267.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: MailComponent/MailConsumer misses Mails

2013-05-27 Thread cgiera
I'm not sure if I'm on the right way, but I've found one thing which doesn't
work correct I think:



Even if I set the maxMessagesPerPoll option to 1, the fetchsize in this case
is -1.
So all messages will be looped in this case.
In debug mode I have changed the value of the fetchSize to 1 and only one
message gets marked as SEEN.

I'm not sure if this is solving the hole problem.

kind regards,
Christoph



--
View this message in context: 
http://camel.465427.n5.nabble.com/MailComponent-MailConsumer-misses-Mails-tp5733010p5733269.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: camel jpa issue

2013-05-27 Thread lmanchanda75
I figured this out, the null was coming because of me not defining any
attribute as @Id in PurchaseOrder entity.

But now when I run this, it goes in a loop of the following, without moving
to next point it route (log). See if anybody can help me on this.


20:43:50,204 | DEBUG | pa.PurchaseOrder | JpaTransactionManager|
136 - org.springframework.transaction - 3.1.3.RELEASE | Creating new
transaction with name [null]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT^M
20:43:50,205 | DEBUG | pa.PurchaseOrder | JpaTransactionManager|
136 - org.springframework.transaction - 3.1.3.RELEASE | Opened new
EntityManager
[org.apache.aries.jpa.container.impl.EntityManagerWrapper@1e93738] for JPA
transaction^M
20:43:50,213 | DEBUG | pa.PurchaseOrder | JpaConsumer  |
244 - org.apache.camel.camel-jpa - 2.10.0.redhat-60024 | Flushing
EntityManager^M
20:43:50,213 | DEBUG | pa.PurchaseOrder | JpaTransactionManager|
136 - org.springframework.transaction - 3.1.3.RELEASE | Initiating
transaction commit^M
20:43:50,213 | DEBUG | pa.PurchaseOrder | JpaTransactionManager|
136 - org.springframework.transaction - 3.1.3.RELEASE | Committing JPA
transaction on EntityManager
[org.apache.aries.jpa.container.impl.EntityManagerWrapper@1e93738]^M
20:43:50,213 | DEBUG | pa.PurchaseOrder | JpaTransactionManager|
136 - org.springframework.transaction - 3.1.3.RELEASE | Closing JPA
EntityManager
[org.apache.aries.jpa.container.impl.EntityManagerWrapper@1e93738] after
transaction^M
20:43:50,213 | DEBUG | pa.PurchaseOrder | EntityManagerFactoryUtils|
242 - org.springframework.orm - 3.1.3.RELEASE | Closing JPA EntityManager^M
20:43:50,427 | DEBUG | heckpoint Worker | MessageDatabase  |
114 - org.apache.activemq.activemq-osgi - 5.8.0.redhat-60024 | Checkpoint
started.^M




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


Re: camel jpa issue

2013-05-27 Thread lmanchanda75
Hi Claus,

Thanks. It was the problem. I figured out that I was not using
consumeDelete=false.

Meanwhile I think that by default consumeDelete should be false than true,
as a small mistake can cause data loss in production.

Regds
Lalit




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


Re: camel jpa issue

2013-05-27 Thread Claus Ibsen
Are you sure there is data in the table? If there is no rows then
there is now data to route.
And also are you sure if there is data, that the logging level at
DEBUG is being logged in your log?

On Mon, May 27, 2013 at 5:21 PM, lmanchanda75  wrote:
> I figured this out, the null was coming because of me not defining any
> attribute as @Id in PurchaseOrder entity.
>
> But now when I run this, it goes in a loop of the following, without moving
> to next point it route (log). See if anybody can help me on this.
>
>
> 20:43:50,204 | DEBUG | pa.PurchaseOrder | JpaTransactionManager|
> 136 - org.springframework.transaction - 3.1.3.RELEASE | Creating new
> transaction with name [null]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT^M
> 20:43:50,205 | DEBUG | pa.PurchaseOrder | JpaTransactionManager|
> 136 - org.springframework.transaction - 3.1.3.RELEASE | Opened new
> EntityManager
> [org.apache.aries.jpa.container.impl.EntityManagerWrapper@1e93738] for JPA
> transaction^M
> 20:43:50,213 | DEBUG | pa.PurchaseOrder | JpaConsumer  |
> 244 - org.apache.camel.camel-jpa - 2.10.0.redhat-60024 | Flushing
> EntityManager^M
> 20:43:50,213 | DEBUG | pa.PurchaseOrder | JpaTransactionManager|
> 136 - org.springframework.transaction - 3.1.3.RELEASE | Initiating
> transaction commit^M
> 20:43:50,213 | DEBUG | pa.PurchaseOrder | JpaTransactionManager|
> 136 - org.springframework.transaction - 3.1.3.RELEASE | Committing JPA
> transaction on EntityManager
> [org.apache.aries.jpa.container.impl.EntityManagerWrapper@1e93738]^M
> 20:43:50,213 | DEBUG | pa.PurchaseOrder | JpaTransactionManager|
> 136 - org.springframework.transaction - 3.1.3.RELEASE | Closing JPA
> EntityManager
> [org.apache.aries.jpa.container.impl.EntityManagerWrapper@1e93738] after
> transaction^M
> 20:43:50,213 | DEBUG | pa.PurchaseOrder | EntityManagerFactoryUtils|
> 242 - org.springframework.orm - 3.1.3.RELEASE | Closing JPA EntityManager^M
> 20:43:50,427 | DEBUG | heckpoint Worker | MessageDatabase  |
> 114 - org.apache.activemq.activemq-osgi - 5.8.0.redhat-60024 | Checkpoint
> started.^M
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/camel-jpa-issue-tp5733238p5733268.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
www.camelone.org: The open source integration conference.

Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


staticResources for websocket in OSGi/blueprint environment

2013-05-27 Thread Martin Stiborský
Hi all,
I'm preparing a demo application for my tommorow talk about Apache
Camel for "Java morning coffee" session in the company where I'm
employed. (source codes and presentation to be releasedon github).

I have a problem with websocket component. I can't load a html file,
neither with "file:" nor with "classpath:".

Guys, how should be "staticResource" configured to get it working?

--
S pozdravem / Best regards
Martin Stiborský

Jabber: st...@njs.netlab.cz
Twitter: http://www.twitter.com/stibi


Re: Communication between two processes without using external messaging systems or files

2013-05-27 Thread Christian Müller
Have a look at the direct und the seda Camel component.

Best,
Christian

Sent from a mobile device
Am 27.05.2013 11:56 schrieb "Mohammad Shadab Ali" :

> Hi,
>
> We have a requirement where we are having two processes. The output of one
> process will be the input for the second one. We do not want to use the
> external messaging systems like active MQ etc and also we do not want to
> use file component.
> We want something like first process will dump the message in some
> internal queue(or something else) and the second process will be polling
> this queue for the messages.
> Is there any component available in camel to achieve this requirement.
> Thanks in advance.
>
> Regards,
> Shadab
>
> 
> *** This e-mail (and any attachments), is confidential and may be
> privileged. It may be read, copied and used only
> by intended recipients. Unauthorized access to this e-mail (or
> attachments) and disclosure or copying of its
> contents or any action taken in reliance on it is unlawful. Unintended
> recipients must notify the sender immediately
> by e-mail/phone & delete it from their system without making any copies or
> disclosing it to a third person.***
>
> This e-mail (and any attachments), is confidential and may be privileged.
> It may be read, copied and used only
> by intended recipients. Unauthorized access to this e-mail (or
> attachments) and disclosure or copying of its
> contents or any action taken in reliance on it is unlawful. Unintended
> recipients must notify the sender immediately
> by e-mail/phone & delete it from their system without making any copies or
> disclosing it to a third person.
>
>


Re: Communication between two processes without using external messaging systems or files

2013-05-27 Thread Robert Davies
I was assuming Shadab meant different operating system  processes ? 
On 27 May 2013, at 17:53, Christian Müller  wrote:

> Have a look at the direct und the seda Camel component.
> 
> Best,
> Christian
> 
> Sent from a mobile device
> Am 27.05.2013 11:56 schrieb "Mohammad Shadab Ali" > :
> 
>> Hi,
>> 
>> We have a requirement where we are having two processes. The output of one
>> process will be the input for the second one. We do not want to use the
>> external messaging systems like active MQ etc and also we do not want to
>> use file component.
>> We want something like first process will dump the message in some
>> internal queue(or something else) and the second process will be polling
>> this queue for the messages.
>> Is there any component available in camel to achieve this requirement.
>> Thanks in advance.
>> 
>> Regards,
>> Shadab
>> 
>> 
>> *** This e-mail (and any attachments), is confidential and may be
>> privileged. It may be read, copied and used only
>> by intended recipients. Unauthorized access to this e-mail (or
>> attachments) and disclosure or copying of its
>> contents or any action taken in reliance on it is unlawful. Unintended
>> recipients must notify the sender immediately
>> by e-mail/phone & delete it from their system without making any copies or
>> disclosing it to a third person.***
>> 
>> This e-mail (and any attachments), is confidential and may be privileged.
>> It may be read, copied and used only
>> by intended recipients. Unauthorized access to this e-mail (or
>> attachments) and disclosure or copying of its
>> contents or any action taken in reliance on it is unlawful. Unintended
>> recipients must notify the sender immediately
>> by e-mail/phone & delete it from their system without making any copies or
>> disclosing it to a third person.
>> 
>> 



RE: SSL : Server Certs and Client certificate passthrough

2013-05-27 Thread RTernier
There might be some lingo confusion - I've been a .NET guy for 13 years who
was thrown into a Java/Apache world where I have 0 experience.

When a client accesses our web services, they are accessed over TCP port 443
- where SSL is required.

The servers have their own SSL (x509) certificate for encryption, however
they also force client certificates - not for encryption but for
authentication.

For example:

If I see that a person is sending in a message with the following
certificate "_HD1", I will want to pull up a certificate from the store
that corresponds to that certificate and pass that along when I forward the
message to another web service.   I also might want to use a different
certificate if I need to forward it to another service.

This is the current architecture for this government agency, and it's not
going to change.




--
View this message in context: 
http://camel.465427.n5.nabble.com/SSL-Server-Certs-and-Client-certificate-passthrough-tp5732925p5733275.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Communication between two processes without using external messaging systems or files

2013-05-27 Thread Charles Moulliard
Shabad,

If you don't want to use a JMS broker, then you should consider to use
camel seda component (http://camel.apache.org/seda.html) which uses an
internal queue (
http://docs.oracle.com/javase/1.5.0/docs/api/java/util/concurrent/BlockingQueue.html)
for async exchange. For sync exchanges, then direct must be used (
http://camel.apache.org/direct.html)

Regards,




On Mon, May 27, 2013 at 6:57 PM, Robert Davies  wrote:

> I was assuming Shadab meant different operating system  processes ?
> On 27 May 2013, at 17:53, Christian Müller 
> wrote:
>
> > Have a look at the direct und the seda Camel component.
> >
> > Best,
> > Christian
> >
> > Sent from a mobile device
> > Am 27.05.2013 11:56 schrieb "Mohammad Shadab Ali" <
> mohammad.a...@genpact.com
> >> :
> >
> >> Hi,
> >>
> >> We have a requirement where we are having two processes. The output of
> one
> >> process will be the input for the second one. We do not want to use the
> >> external messaging systems like active MQ etc and also we do not want to
> >> use file component.
> >> We want something like first process will dump the message in some
> >> internal queue(or something else) and the second process will be polling
> >> this queue for the messages.
> >> Is there any component available in camel to achieve this requirement.
> >> Thanks in advance.
> >>
> >> Regards,
> >> Shadab
> >>
> >> 
> >> *** This e-mail (and any attachments), is confidential and may be
> >> privileged. It may be read, copied and used only
> >> by intended recipients. Unauthorized access to this e-mail (or
> >> attachments) and disclosure or copying of its
> >> contents or any action taken in reliance on it is unlawful. Unintended
> >> recipients must notify the sender immediately
> >> by e-mail/phone & delete it from their system without making any copies
> or
> >> disclosing it to a third person.***
> >>
> >> This e-mail (and any attachments), is confidential and may be
> privileged.
> >> It may be read, copied and used only
> >> by intended recipients. Unauthorized access to this e-mail (or
> >> attachments) and disclosure or copying of its
> >> contents or any action taken in reliance on it is unlawful. Unintended
> >> recipients must notify the sender immediately
> >> by e-mail/phone & delete it from their system without making any copies
> or
> >> disclosing it to a third person.
> >>
> >>
>
>


-- 
Charles Moulliard
Apache Committer / Sr. Enterprise Architect (RedHat)
Twitter : @cmoulliard | Blog : http://cmoulliard.blogspot.com


Re: Test route with CXF endpoint

2013-05-27 Thread Chubutin
I created a new Project with this example, be free to take a look. Thank you!

exampleCamelCXF.tar
  



--
View this message in context: 
http://camel.465427.n5.nabble.com/Test-route-with-CXF-endpoint-tp5733266p5733278.html
Sent from the Camel - Users mailing list archive at Nabble.com.


CamelOne

2013-05-27 Thread Christian Müller
CamelOne 2013 (http://camelone.org/) is in about two weeks!
Who will be there?
I want to meet as many Camel user/contributors/committers/PMC's as
possible. May be Sunday 06/09/2013 from 6:30 to 8:30 in the Exhibit Hall in
Hynes Convention Center [1]?

[1] http://camelone.org/apache-camel-conference-2013/camelone_agenda_2013/

Looking forward,
Christian Müller
-

Software Integration Specialist

Apache Camel committer: https://camel.apache.org/team
V.P. Apache Camel: https://www.apache.org/foundation/
Apache Member: https://www.apache.org/foundation/members.html

https://www.linkedin.com/pub/christian-mueller/11/551/642


Re: CamelOne

2013-05-27 Thread Chris Geer
I'll be there Sunday night. See you then.

Chris


On Mon, May 27, 2013 at 12:53 PM, Christian Müller <
christian.muel...@gmail.com> wrote:

> CamelOne 2013 (http://camelone.org/) is in about two weeks!
> Who will be there?
> I want to meet as many Camel user/contributors/committers/PMC's as
> possible. May be Sunday 06/09/2013 from 6:30 to 8:30 in the Exhibit Hall in
> Hynes Convention Center [1]?
>
> [1] http://camelone.org/apache-camel-conference-2013/camelone_agenda_2013/
>
> Looking forward,
> Christian Müller
> -
>
> Software Integration Specialist
>
> Apache Camel committer: https://camel.apache.org/team
> V.P. Apache Camel: https://www.apache.org/foundation/
> Apache Member: https://www.apache.org/foundation/members.html
>
> https://www.linkedin.com/pub/christian-mueller/11/551/642
>


Re: CamelOne

2013-05-27 Thread Babak Vahdat


Am 27.05.13 21:53 schrieb "Christian Müller" unter
:

>CamelOne 2013 (http://camelone.org/) is in about two weeks!
>Who will be there?

Hi Christian,

Unfortunately I will not be able to attend.

Babak

>I want to meet as many Camel user/contributors/committers/PMC's as
>possible. May be Sunday 06/09/2013 from 6:30 to 8:30 in the Exhibit Hall
>in
>Hynes Convention Center [1]?
>
>[1] http://camelone.org/apache-camel-conference-2013/camelone_agenda_2013/
>
>Looking forward,
>Christian Müller
>-
>
>Software Integration Specialist
>
>Apache Camel committer: https://camel.apache.org/team
>V.P. Apache Camel: https://www.apache.org/foundation/
>Apache Member: https://www.apache.org/foundation/members.html
>
>https://www.linkedin.com/pub/christian-mueller/11/551/642




Re: Disable chunked encoding on HTTP4 component

2013-05-27 Thread Chris Geer
On Sun, May 26, 2013 at 2:46 PM, Christian Müller <
christian.muel...@gmail.com> wrote:

> Hey Chris!
>
> I checked the API docs at [1]. It looks like you are using HTTP/1.1 and
> your entity content length is unknown. Can you confirm this? Any chance to
> determine the content length?
>

I do know the content length and was trying to set it, but it was being
ignored. After digging in deeper I realized that the FilterStrategy for
HTTP4 was stripping off any content-length headers from the exchange so
there was no way to set it. Plus, in the HttpEntityConverter, the content
length was always being set to -1. To fix this, I modified the
HttpEntityConverter to use the length of the data passed in if the payload
is a byte array (known length) and after doing that it didn't use chunked
mode and everything is happy.

The ticket is CAMEL-6402 [1] and I've uploaded a patch. I didn't modify
anything for a body that is an InputStream since I wasn't sure if we could
guarantee that the available() method would be accurate.

Chris

[1] https://issues.apache.org/jira/browse/CAMEL-6402

>
> [1]
>
> http://hc.apache.org/httpcomponents-core-ga/httpcore/apidocs/org/apache/http/entity/AbstractHttpEntity.html#setChunked%28boolean%29
>
>
> Best,
>
> Christian Müller
> -
>
> Software Integration Specialist
>
> Apache Camel committer: https://camel.apache.org/team
> V.P. Apache Camel: https://www.apache.org/foundation/
> Apache Member: https://www.apache.org/foundation/members.html
>
> https://www.linkedin.com/pub/christian-mueller/11/551/642
>
>
> On Fri, May 24, 2013 at 5:18 AM, Chris Geer  wrote:
>
> > Is there a way to disable using chunked encoding on the HTTP4 component?
> I
> > have a server that apparently doesn't like chunked messages. I was able
> to
> > switch to use the HTTP component but I know that is eventually going to
> go
> > away.
> >
> > I tried setting the CamelHttpChunked header to false but that doesn't
> seem
> > to be used by the Producer code.
> >
> > I'm using Camel 2.10.4
> >
> > Thanks,
> > Chris
> >
>


Re: Disable chunked encoding on HTTP4 component

2013-05-27 Thread Christian Müller
Applied (with a small modification)! Thanks Chris!

Best,
Christian

Christian Müller
-

Software Integration Specialist

Apache Camel committer: https://camel.apache.org/team
V.P. Apache Camel: https://www.apache.org/foundation/
Apache Member: https://www.apache.org/foundation/members.html

https://www.linkedin.com/pub/christian-mueller/11/551/642


On Mon, May 27, 2013 at 10:40 PM, Chris Geer  wrote:

> On Sun, May 26, 2013 at 2:46 PM, Christian Müller <
> christian.muel...@gmail.com> wrote:
>
> > Hey Chris!
> >
> > I checked the API docs at [1]. It looks like you are using HTTP/1.1 and
> > your entity content length is unknown. Can you confirm this? Any chance
> to
> > determine the content length?
> >
>
> I do know the content length and was trying to set it, but it was being
> ignored. After digging in deeper I realized that the FilterStrategy for
> HTTP4 was stripping off any content-length headers from the exchange so
> there was no way to set it. Plus, in the HttpEntityConverter, the content
> length was always being set to -1. To fix this, I modified the
> HttpEntityConverter to use the length of the data passed in if the payload
> is a byte array (known length) and after doing that it didn't use chunked
> mode and everything is happy.
>
> The ticket is CAMEL-6402 [1] and I've uploaded a patch. I didn't modify
> anything for a body that is an InputStream since I wasn't sure if we could
> guarantee that the available() method would be accurate.
>
> Chris
>
> [1] https://issues.apache.org/jira/browse/CAMEL-6402
>
> >
> > [1]
> >
> >
> http://hc.apache.org/httpcomponents-core-ga/httpcore/apidocs/org/apache/http/entity/AbstractHttpEntity.html#setChunked%28boolean%29
> >
> >
> > Best,
> >
> > Christian Müller
> > -
> >
> > Software Integration Specialist
> >
> > Apache Camel committer: https://camel.apache.org/team
> > V.P. Apache Camel: https://www.apache.org/foundation/
> > Apache Member: https://www.apache.org/foundation/members.html
> >
> > https://www.linkedin.com/pub/christian-mueller/11/551/642
> >
> >
> > On Fri, May 24, 2013 at 5:18 AM, Chris Geer 
> wrote:
> >
> > > Is there a way to disable using chunked encoding on the HTTP4
> component?
> > I
> > > have a server that apparently doesn't like chunked messages. I was able
> > to
> > > switch to use the HTTP component but I know that is eventually going to
> > go
> > > away.
> > >
> > > I tried setting the CamelHttpChunked header to false but that doesn't
> > seem
> > > to be used by the Producer code.
> > >
> > > I'm using Camel 2.10.4
> > >
> > > Thanks,
> > > Chris
> > >
> >
>


Camel JPA - Clustered Deployment - Quartz Scheduling

2013-05-27 Thread Patrick Bray
Hi All, 

I have a requirement to generate JMS events based on updates to JPA entities
in a database by a separate application.

I currently have a proof of concept camel route up and running using the JPA
consumer to poll the database and query for unprocessed records. 

The issue we have however is that we are deploying our Apache Camel
application into a cluster of 8 servers and need to ensure that each record
is only processed once.

As such I was hoping that I could utilise a clustered quartz scheduler with
JDBC job store to ensure that the polling only occurs on a single node
within the cluster whilst still allowing for High Availability via failover
etc.

Can you please advise if it is possible to either: 

a) Configure the polling behavior of the JPA component to be triggered from
a clustered quartz job?
b) Trigger the JPA consumer query from the camel-quartz component using a
clustered scheduler?

Any assistance you could provide would be much appreciated. 

Thanks,
Patrick Bray



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-JPA-Clustered-Deployment-Quartz-Scheduling-tp5733292.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: CamelOne

2013-05-27 Thread Scott England-Sullivan
Looking forward to it Christian. :-)

Scott England-Sullivan
blog:sully6768.blogspot.com twitter:@sully6768

On May 27, 2013, at 2:53 PM, Christian Müller  
wrote:

> CamelOne 2013 (http://camelone.org/) is in about two weeks!
> Who will be there?
> I want to meet as many Camel user/contributors/committers/PMC's as
> possible. May be Sunday 06/09/2013 from 6:30 to 8:30 in the Exhibit Hall in
> Hynes Convention Center [1]?
> 
> [1] http://camelone.org/apache-camel-conference-2013/camelone_agenda_2013/
> 
> Looking forward,
> Christian Müller
> -
> 
> Software Integration Specialist
> 
> Apache Camel committer: https://camel.apache.org/team
> V.P. Apache Camel: https://www.apache.org/foundation/
> Apache Member: https://www.apache.org/foundation/members.html
> 
> https://www.linkedin.com/pub/christian-mueller/11/551/642


Re: camel-cxf and synchronous vs. asynchronous endpoints

2013-05-27 Thread Willem Jiang
Hi 

It's a known issue, CXF jms transport doesn't support the asynchronous 
invocation well. 


发自我的 iPhone

在 2013-5-27,下午5:59,Jens  写道:

> Hi,
> 
> I have a very simple route of the form
> 
> from("cxf:bean:router").to("cxf:bean:realEP?synchronous=true")
> 
> The "realEP" endpoint uses JMS. If the "router" endpoint uses HTTP things
> work as expected (presumably because HTTP is synchronous by default) but if
> the "router" endpoint is JMS as well (and therefore async by default) the
> route "hangs" after calling the "realEP" and never returns the response to
> the caller. Switching the "router" endpoint to synchronous operation as well
> seems to fix that, but is this behaviour to be expected? Is there another
> way to make it work?
> 
> Thanks,
> Jens
> 
> 
> 
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/camel-cxf-and-synchronous-vs-asynchronous-endpoints-tp5733246.html
> Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Spring-Camel Context initialization error in weblogic 12c

2013-05-27 Thread Kulbhushan Azad
hi Frank
i added below in the weblogic.xml and tried a clean build and redeployment
, now i am seeing another new error as below


May 28, 2013 12:52:43 AM org.springframework.web.context.ContextLoader
initWebApplicationContext
INFO: Root WebApplicationContext: initialization started
May 28, 2013 12:52:43 AM
org.springframework.context.support.AbstractApplicationContext
prepareRefresh
INFO: Refreshing Root WebApplicationContext: startup date [Tue May 28
00:52:43 EDT 2013]; root of context hierarchy
May 28, 2013 12:52:43 AM
org.springframework.beans.factory.xml.XmlBeanDefinitionReader
loadBeanDefinitions
INFO: Loading XML bean definitions from ServletContext resource
[/WEB-INF/applicationContext.xml]
May 28, 2013 12:52:43 AM org.springframework.web.context.ContextLoader
initWebApplicationContext
SEVERE: Context initialization failed
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected
exception parsing XML document from ServletContext resource
[/WEB-INF/applicationContext.xml]; nested exception is
org.springframework.beans.FatalBeanException: Invalid NamespaceHandler
class [org.apache.camel.spring.handler.CamelNamespaceHandler] for namespace
[http://camel.apache.org/schema/spring]: problem with handler class file or
dependent class; nested exception is java.lang.LinkageError: loader
constraint violation: when resolving method
"org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;"
the class loader (instance of
weblogic/utils/classloaders/ChangeAwareClassLoader) of the current class,
org/slf4j/LoggerFactory, and the class loader (instance of
sun/misc/Launcher$AppClassLoader) for resolved class,
org/slf4j/impl/StaticLoggerBinder, have different Class objects for the
type org/slf4j/ILoggerFactory used in the signature
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:412)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:174)
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:209)
at
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)
at
org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125)
at
org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)
at
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:131)
at
org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:522)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:436)
at
org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:385)
at
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:284)
at
org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
at
weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:582)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at
weblogic.servlet.provider.WlsSubjectHandle.run(WlsSubjectHandle.java:57)
at
weblogic.servlet.internal.EventsManager.executeContextListener(EventsManager.java:233)
at
weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:190)
at
weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:175)
at
weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1730)
at
weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2740)
at
weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1704)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:781)
at
weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:213)
at
weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:208)
at
weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:35)
at
weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:70)
at
weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedM

Re: CamelOne

2013-05-27 Thread Robert Davies
Looking forward to CamelOne -  I will be there at the reception on the 9th June

thanks,

Rob
On 27 May 2013, at 20:53, Christian Müller  wrote:

> CamelOne 2013 (http://camelone.org/) is in about two weeks!
> Who will be there?
> I want to meet as many Camel user/contributors/committers/PMC's as
> possible. May be Sunday 06/09/2013 from 6:30 to 8:30 in the Exhibit Hall in
> Hynes Convention Center [1]?
> 
> [1] http://camelone.org/apache-camel-conference-2013/camelone_agenda_2013/
> 
> Looking forward,
> Christian Müller
> -
> 
> Software Integration Specialist
> 
> Apache Camel committer: https://camel.apache.org/team
> V.P. Apache Camel: https://www.apache.org/foundation/
> Apache Member: https://www.apache.org/foundation/members.html
> 
> https://www.linkedin.com/pub/christian-mueller/11/551/642



Re: CamelOne

2013-05-27 Thread Jason Chaffee
Just wanted to chime in for the powers that be.  It is a great conference, but 
it would be nice if it could be on the West Coast every other year or at least 
on occasion.   There is good community of Camel users out here that are not 
part of the actual Camel community and having it out West might bring more 
people into the fold.  I a lot of casual users out here that if knew more about 
Camel would be using it much more than they currently do.

Just my 2 cents.

On May 27, 2013, at 10:03 PM, Robert Davies  wrote:

> Looking forward to CamelOne -  I will be there at the reception on the 9th 
> June
> 
> thanks,
> 
> Rob
> On 27 May 2013, at 20:53, Christian Müller  
> wrote:
> 
>> CamelOne 2013 (http://camelone.org/) is in about two weeks!
>> Who will be there?
>> I want to meet as many Camel user/contributors/committers/PMC's as
>> possible. May be Sunday 06/09/2013 from 6:30 to 8:30 in the Exhibit Hall in
>> Hynes Convention Center [1]?
>> 
>> [1] http://camelone.org/apache-camel-conference-2013/camelone_agenda_2013/
>> 
>> Looking forward,
>> Christian Müller
>> -
>> 
>> Software Integration Specialist
>> 
>> Apache Camel committer: https://camel.apache.org/team
>> V.P. Apache Camel: https://www.apache.org/foundation/
>> Apache Member: https://www.apache.org/foundation/members.html
>> 
>> https://www.linkedin.com/pub/christian-mueller/11/551/642
> 


Re: CamelOne

2013-05-27 Thread Claus Ibsen
I will be at the reception as well on the 9th.
I fly in on the 8th in the evening.


On Tue, May 28, 2013 at 7:03 AM, Robert Davies  wrote:
> Looking forward to CamelOne -  I will be there at the reception on the 9th 
> June
>
> thanks,
>
> Rob
> On 27 May 2013, at 20:53, Christian Müller  
> wrote:
>
>> CamelOne 2013 (http://camelone.org/) is in about two weeks!
>> Who will be there?
>> I want to meet as many Camel user/contributors/committers/PMC's as
>> possible. May be Sunday 06/09/2013 from 6:30 to 8:30 in the Exhibit Hall in
>> Hynes Convention Center [1]?
>>
>> [1] http://camelone.org/apache-camel-conference-2013/camelone_agenda_2013/
>>
>> Looking forward,
>> Christian Müller
>> -
>>
>> Software Integration Specialist
>>
>> Apache Camel committer: https://camel.apache.org/team
>> V.P. Apache Camel: https://www.apache.org/foundation/
>> Apache Member: https://www.apache.org/foundation/members.html
>>
>> https://www.linkedin.com/pub/christian-mueller/11/551/642
>



-- 
Claus Ibsen
-
www.camelone.org: The open source integration conference.

Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Using jetty component for http producer : Weird behavior

2013-05-27 Thread anand_tech
Hi,

I have a route like this in Java DSL 

from("servlet://abc/?matchOnUriPrefix=true") 
.process(new Processor()
{

@Override
public void process(Exchange arg0) throws Exception
{
Message inMessage = arg0.getIn();
String query = 
inMessage.getHeader(Exchange.HTTP_QUERY, String.class);
query+="&key="+"encrypted";
query+="&client="+"blahblah";
inMessage.setHeader(Exchange.HTTP_QUERY, query);

}
})
   
.to(ExchangePattern.InOut,
"jetty://https://maps.googleapis.com/maps/api/place/photo?bridgeEndpoint=true&throwExceptionOnFailure=false&chunked=false";)


The problem is that when jetty component sends http request it skips ":"
character after https. Here are my logs:

[2013-05-27 16:17:45,591] org.apache.camel.component.jetty.JettyHttpProducer
DEBUG - Starting producer:
Producer[https://maps.googleapis.com/maps/api/place/photo?bridgeEndpoint=true&throwExceptionOnFailure=false]
[2013-05-27 16:17:45,592] org.apache.camel.impl.ProducerCache DEBUG - Adding
to producer cache with key:
Endpoint[https://maps.googleapis.com/maps/api/place/photo?bridgeEndpoint=true&throwExceptionOnFailure=false]
for producer:
Producer[https://maps.googleapis.com/maps/api/place/photo?bridgeEndpoint=true&throwExceptionOnFailure=false]
[2013-05-27 16:17:45,593] org.apache.camel.processor.SendProcessor DEBUG -

Endpoint[https://maps.googleapis.com/maps/api/place/photo?bridgeEndpoint=true&throwExceptionOnFailure=false]
Exchange[Message: [Body is null]]
[2013-05-27 16:17:45,599] org.apache.camel.component.jetty.JettyHttpProducer
DEBUG - *Sending HTTP request to:
https//maps.googleapis.com:443/maps/api/place/photo?chunked=false&maxwidth=80&photoreference=CnRww2ZAy_2j-1qX0acePL_UPebtDtA7O6fFFsjX6tWn0gTWy_iKos50DnznRrjSuZeW90iYcyWYNLwnvpUAVWrdiGYL5HDPKODUFNvmR6jY9lMBRhtXSeTOGRnS3TIOqWDw3uw94gmCcPG-7iyMiPvHtRIQzOy5YEYPCjRjbjDXzCiTLRoUMG3S9rfMT-J0er4bLon_rSqQ_WQ&sensor=true&key=encrypted&client=blahblah*
[2013-05-27 16:17:45,750]
org.apache.camel.component.jetty.JettyContentExchange DEBUG - TaskComplete
with state 7 for url:
https//maps.googleapis.com:443/maps/api/place/photo?chunked=false&maxwidth=80&photoreference=CnRww2ZAy_2j-1qX0acePL_UPebtDtA7O6fFFsjX6tWn0gTWy_iKos50DnznRrjSuZeW90iYcyWYNLwnvpUAVWrdiGYL5HDPKODUFNvmR6jY9lMBRhtXSeTOGRnS3TIOqWDw3uw94gmCcPG-7iyMiPvHtRIQzOy5YEYPCjRjbjDXzCiTLRoUMG3S9rfMT-J0er4bLon_rSqQ_WQ&sensor=true&key=encrypted&client=blahblah
[2013-05-27 16:17:45,750]
org.apache.camel.component.jetty.DefaultJettyHttpBinding DEBUG - HTTP
responseCode: 404

As you can see in the logs "bold" section it is making a http request to
https//url instead of https://  Why is this happening ? Am i missing
some configuration. 

Also i know that i can use http producer directly but the reason i am using
jetty component is because i want to control the chunking of responses [ i
need it to be off], and jetty component gives an easy configuration for
that. 
TIA




--
View this message in context: 
http://camel.465427.n5.nabble.com/Using-jetty-component-for-http-producer-Weird-behavior-tp5733303.html
Sent from the Camel - Users mailing list archive at Nabble.com.


netty open close

2013-05-27 Thread kiranreddykasa
Hi 

According to our  use case we have built a route like this.

from(jms).to(tcp netty).to(processor).to(tcp netty ) .to(processor).to(tcp
netty )  

Here all the tcp stations are same.

Is it possible to make netty to use new connection at each tcp endpoint  for
every requset??
Because sometimes we are getting channelclosed exception!



-
Regards

kiran Reddy
--
View this message in context: 
http://camel.465427.n5.nabble.com/netty-open-close-tp5733304.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Using jetty component for http producer : Weird behavior

2013-05-27 Thread Claus Ibsen
Try with jetty:https://x

On Tue, May 28, 2013 at 8:01 AM, anand_tech  wrote:
> Hi,
>
> I have a route like this in Java DSL
>
> from("servlet://abc/?matchOnUriPrefix=true")
> .process(new Processor()
> {
>
> @Override
> public void process(Exchange arg0) throws Exception
> {
> Message inMessage = arg0.getIn();
> String query = 
> inMessage.getHeader(Exchange.HTTP_QUERY, String.class);
> query+="&key="+"encrypted";
> query+="&client="+"blahblah";
> inMessage.setHeader(Exchange.HTTP_QUERY, 
> query);
>
> }
> })
>
> .to(ExchangePattern.InOut,
> "jetty://https://maps.googleapis.com/maps/api/place/photo?bridgeEndpoint=true&throwExceptionOnFailure=false&chunked=false";)
>
>
> The problem is that when jetty component sends http request it skips ":"
> character after https. Here are my logs:
>
> [2013-05-27 16:17:45,591] org.apache.camel.component.jetty.JettyHttpProducer
> DEBUG - Starting producer:
> Producer[https://maps.googleapis.com/maps/api/place/photo?bridgeEndpoint=true&throwExceptionOnFailure=false]
> [2013-05-27 16:17:45,592] org.apache.camel.impl.ProducerCache DEBUG - Adding
> to producer cache with key:
> Endpoint[https://maps.googleapis.com/maps/api/place/photo?bridgeEndpoint=true&throwExceptionOnFailure=false]
> for producer:
> Producer[https://maps.googleapis.com/maps/api/place/photo?bridgeEndpoint=true&throwExceptionOnFailure=false]
> [2013-05-27 16:17:45,593] org.apache.camel.processor.SendProcessor DEBUG -
>
> Endpoint[https://maps.googleapis.com/maps/api/place/photo?bridgeEndpoint=true&throwExceptionOnFailure=false]
> Exchange[Message: [Body is null]]
> [2013-05-27 16:17:45,599] org.apache.camel.component.jetty.JettyHttpProducer
> DEBUG - *Sending HTTP request to:
> https//maps.googleapis.com:443/maps/api/place/photo?chunked=false&maxwidth=80&photoreference=CnRww2ZAy_2j-1qX0acePL_UPebtDtA7O6fFFsjX6tWn0gTWy_iKos50DnznRrjSuZeW90iYcyWYNLwnvpUAVWrdiGYL5HDPKODUFNvmR6jY9lMBRhtXSeTOGRnS3TIOqWDw3uw94gmCcPG-7iyMiPvHtRIQzOy5YEYPCjRjbjDXzCiTLRoUMG3S9rfMT-J0er4bLon_rSqQ_WQ&sensor=true&key=encrypted&client=blahblah*
> [2013-05-27 16:17:45,750]
> org.apache.camel.component.jetty.JettyContentExchange DEBUG - TaskComplete
> with state 7 for url:
> https//maps.googleapis.com:443/maps/api/place/photo?chunked=false&maxwidth=80&photoreference=CnRww2ZAy_2j-1qX0acePL_UPebtDtA7O6fFFsjX6tWn0gTWy_iKos50DnznRrjSuZeW90iYcyWYNLwnvpUAVWrdiGYL5HDPKODUFNvmR6jY9lMBRhtXSeTOGRnS3TIOqWDw3uw94gmCcPG-7iyMiPvHtRIQzOy5YEYPCjRjbjDXzCiTLRoUMG3S9rfMT-J0er4bLon_rSqQ_WQ&sensor=true&key=encrypted&client=blahblah
> [2013-05-27 16:17:45,750]
> org.apache.camel.component.jetty.DefaultJettyHttpBinding DEBUG - HTTP
> responseCode: 404
>
> As you can see in the logs "bold" section it is making a http request to
> https//url instead of https://  Why is this happening ? Am i missing
> some configuration.
>
> Also i know that i can use http producer directly but the reason i am using
> jetty component is because i want to control the chunking of responses [ i
> need it to be off], and jetty component gives an easy configuration for
> that.
> TIA
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Using-jetty-component-for-http-producer-Weird-behavior-tp5733303.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
www.camelone.org: The open source integration conference.

Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: netty open close

2013-05-27 Thread Claus Ibsen
Hi

Try with disconnect=true as documented at
http://camel.apache.org/netty

On Tue, May 28, 2013 at 8:03 AM, kiranreddykasa  wrote:
> Hi
>
> According to our  use case we have built a route like this.
>
> from(jms).to(tcp netty).to(processor).to(tcp netty ) .to(processor).to(tcp
> netty )
>
> Here all the tcp stations are same.
>
> Is it possible to make netty to use new connection at each tcp endpoint  for
> every requset??
> Because sometimes we are getting channelclosed exception!
>
>
>
> -
> Regards
>
> kiran Reddy
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/netty-open-close-tp5733304.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
www.camelone.org: The open source integration conference.

Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Using jetty component for http producer : Weird behavior

2013-05-27 Thread anand_tech
Oh, i should have mentioned that too. I have already tried it with
"jetty:https://maps.google



--
View this message in context: 
http://camel.465427.n5.nabble.com/Using-jetty-component-for-http-producer-Weird-behavior-tp5733303p5733307.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: netty open close

2013-05-27 Thread kiranreddykasa
Ya i tried that.

But the problem is here all the tcp stations are same (Same Ip and port).

So after disconnecting it's not trying to connect again. 




-
Regards

kiran Reddy
--
View this message in context: 
http://camel.465427.n5.nabble.com/netty-open-close-tp5733304p5733308.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: netty open close

2013-05-27 Thread Claus Ibsen
You can just use Camels error handler to retry



On Tue, May 28, 2013 at 8:30 AM, kiranreddykasa  wrote:
> Ya i tried that.
>
> But the problem is here all the tcp stations are same (Same Ip and port).
>
> So after disconnecting it's not trying to connect again.
>
>
>
>
> -
> Regards
>
> kiran Reddy
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/netty-open-close-tp5733304p5733308.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-
www.camelone.org: The open source integration conference.

Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen


Re: Using jetty component for http producer : Weird behavior

2013-05-27 Thread anand_tech
Could it be that i haven't mentioned the port explicitly in the endpoint ??

"jetty://https://maps.googleapis.com{: is port needed here ?}/



--
View this message in context: 
http://camel.465427.n5.nabble.com/Using-jetty-component-for-http-producer-Weird-behavior-tp5733303p5733309.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: CamelOne

2013-05-27 Thread Achim Nierbeck
While talking about it, how about a Camel One in Europe :D

Cheers, Achim


2013/5/28 Claus Ibsen 

> I will be at the reception as well on the 9th.
> I fly in on the 8th in the evening.
>
>
> On Tue, May 28, 2013 at 7:03 AM, Robert Davies 
> wrote:
> > Looking forward to CamelOne -  I will be there at the reception on the
> 9th June
> >
> > thanks,
> >
> > Rob
> > On 27 May 2013, at 20:53, Christian Müller 
> wrote:
> >
> >> CamelOne 2013 (http://camelone.org/) is in about two weeks!
> >> Who will be there?
> >> I want to meet as many Camel user/contributors/committers/PMC's as
> >> possible. May be Sunday 06/09/2013 from 6:30 to 8:30 in the Exhibit
> Hall in
> >> Hynes Convention Center [1]?
> >>
> >> [1]
> http://camelone.org/apache-camel-conference-2013/camelone_agenda_2013/
> >>
> >> Looking forward,
> >> Christian Müller
> >> -
> >>
> >> Software Integration Specialist
> >>
> >> Apache Camel committer: https://camel.apache.org/team
> >> V.P. Apache Camel: https://www.apache.org/foundation/
> >> Apache Member: https://www.apache.org/foundation/members.html
> >>
> >> https://www.linkedin.com/pub/christian-mueller/11/551/642
> >
>
>
>
> --
> Claus Ibsen
> -
> www.camelone.org: The open source integration conference.
>
> Red Hat, Inc.
> FuseSource is now part of Red Hat
> Email: cib...@redhat.com
> Web: http://fusesource.com
> Twitter: davsclaus
> Blog: http://davsclaus.com
> Author of Camel in Action: http://www.manning.com/ibsen
>



-- 

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