Re: clone camel 2.11.x branch

2013-09-03 Thread vcheruvu
I have tried your suggestion. I am experiencing same issue.


C:\vid\apps>git clone http://git-wip-us.apache.org/repos/asf/camel.git
Cloning into 'camel'...
fatal: unable to access 'http://git-wip-us.apache.org/repos/asf/camel.git/':
Failed connect to git-wip-us.apache.org:80; No error




--
View this message in context: 
http://camel.465427.n5.nabble.com/clone-camel-2-11-x-branch-tp5734915p5738595.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: clone camel 2.11.x branch

2013-09-03 Thread vcheruvu

Hi Christian,

 I have followed your command examples to check out Camel 2.11.x source
code. Unfortunately I am unable to check out with errors as shown below.  I
am running in win 7 with cmd prompt.  Will your instructions work for
windows cmd. Please advise how I could check out source code?

C:\vid\apps>git clone https://git-wip-us.apache.org/repos/asf/camel.git
Cloning into 'camel'...
fatal: unable to access
'https://git-wip-us.apache.org/repos/asf/camel.git/': Failed connect to
git-wip-us.apache.org:443; No error


Kind regards,
-Vid-



--
View this message in context: 
http://camel.465427.n5.nabble.com/clone-camel-2-11-x-branch-tp5734915p5738592.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel 2.11.1 - SedaComponent issues with Queue size

2013-08-30 Thread vcheruvu
Doh! It is an Integer object !!  .. Allright, I will check out the source
using Git and apply patch.



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-2-11-1-SedaComponent-issues-with-Queue-size-tp5738258p5738265.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel 2.11.1 - SedaComponent issues with Queue size

2013-08-29 Thread vcheruvu

Hi ,

I am getting strange error with queue when our applications write objects to
VM queue.  Occasionally I am seeing below error.  It is strange that we can
clearly see in the error message below that queue size value match. Any idea
why it is failing?



Caused by: java.lang.IllegalArgumentException: Cannot use existing queue
vm://FixTransform-BARX-Queue as the existing queue size 50 does not
match given queue size 50
at
org.apache.camel.component.seda.SedaComponent.getOrCreateQueue(SedaComponent.java:76)
at
org.apache.camel.component.seda.SedaEndpoint.getQueue(SedaEndpoint.java:122)
at
org.apache.camel.component.seda.SedaEndpoint.doStart(SedaEndpoint.java:401)
at
org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
at
org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:1819)
at
org.apache.camel.impl.DefaultCamelContext.doAddService(DefaultCamelContext.java:960)
at
org.apache.camel.impl.DefaultCamelContext.addService(DefaultCamelContext.java:921)
at
org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:505)
... 56 more



Below is the code snippet that throws IllegalArgumentException when
comparing queue size. I do not  understand how queue size do not match for
below conditional statement when 50 is equal to 50 in the above
statement.  Is there some kind of data corruption here that some threads do
not get correct value for ref.getSize()?


SedaComponent.java

...
 if (size != null && ref.getSize() != size) {
// there is already a queue, so make sure the size matches
throw new IllegalArgumentException("Cannot use existing
queue " + key + " as the existing queue size "
+ (ref.getSize() != null ? ref.getSize() :
Integer.MAX_VALUE) + " does not match given queue size " + size);
}






VM component name used in our application

"vm:FixTransform-BARX-Queue?size=50&timeout=100&concurrentConsumers=5"

Kind regards,
-Vid-



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-2-11-1-SedaComponent-issues-with-Queue-size-tp5738258.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Quickfix component as initiator - How do I insert user and password to logon

2013-02-07 Thread vcheruvu
I agree with you, what I have is messy solution. However, I have seen cases
where I had to customize logon messages with custom tags instead of default
FIX protocol logon message . Hence this approach leaves room for users to
implement their own custom logon messages and add user credentials. 
quickfix URI  must not have username/password and has to be defined
somewhere like properties file. This will provide flexibility to encrypt the
passwords using Jasypt (if required).  I believe Stephen Bate (who committed
this component for Camel) will be better judge to comment on this feature.






--
View this message in context: 
http://camel.465427.n5.nabble.com/Quickfix-component-as-initiator-How-do-I-insert-user-and-password-to-logon-tp5726991p5727078.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Quickfix component as initiator - How do I insert user and password to logon

2013-02-06 Thread vcheruvu
Hi,

We have used login in our application. Example listed below using JAVA DSL.
You will have to create another route that consumes Admin messages from
quickfix engine and set credential injector. After that you can use 
"to("quickfix:receptor.cfg")" in any route to publish your fix message


from("quickfix:META-INF/quickfix/session.cfg?sessionID=FIX.4.2:SenderCompID->TargetCompID").filter(
PredicateBuilder.and(

header(QuickfixjEndpoint.EVENT_CATEGORY_KEY).isEqualTo(

QuickfixjEventCategory.AdminMessageSent),

header(QuickfixjEndpoint.MESSAGE_TYPE_KEY).isEqualTo(
MsgType.LOGON)))
.bean(new CredentialInjector("password123"));




public static class CredentialInjector {
private final String password;

public CredentialInjector(String password) {
this.password = password;
}

public void inject(Exchange exchange) throws 
InvalidPayloadException {
System.out.println("Injecting password into outgoing 
logon message");
Message message = 
ExchangeHelper.getMandatoryInBody(exchange,
Message.class);
message.setString(553, "username");
message.setString(RawData.FIELD, password);
message.setInt(RawDataLength.FIELD, password.length());
}
}

Let me know if it works for you.. Camel rocks!!



Cheers,
-Vid-







--
View this message in context: 
http://camel.465427.n5.nabble.com/Quickfix-component-as-initiator-How-do-I-insert-user-and-password-to-logon-tp5726991p5727056.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel-Quickfixj 2.9.3 - Ordering issue

2013-02-03 Thread vcheruvu
Thanks, Christian. I have implemented Resequencer using the Quickfix fix
object's  sequence number and also added custom logic to preserve sequence
number in exchange object when receiving fix messages from multilple FIX
sessions. It works like a charm... cheers



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Quickfixj-2-9-1-Ordering-issue-tp5726595p5726855.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel-Quickfixj 2.9.3 - Ordering issue

2013-01-30 Thread vcheruvu
Hello Camel Riders,

  I have used Camel-Quickfixj component in our application to consume and
publish fix messages. Our application consumes FIX 4.2 messages from VM
queue with 10 concurrent consumers.   Each consumer takes the FIX message of
the VM queue, transforms the message to our internal FIX message structure
and publishes on to another FIX session. Please see routebuilder definition
below.  I can tell in our logs that FIX messages are consumed in order. I
also verified that transformation bean class have processed FIX messages in
order and sent it  to the pipeline for QuickFixJ publishing in order as
well. However, after the transformation bean class,  publishing of new
transformed FIX messages are out of order (I could tell by looking at
Quickfix/J message store that fix messages are sent in different order.
Please note this is not FIX sequence number issue.).  

 I understand obvious solution is make multiple consumer of VM to single
consumer but this could seriously effects the speed of publishing fix
messages. To be honest, I am little unclear how this route works when it is
parallel processing, i.e if 10 concurrent consumers of VM, does that mean 10
threads transforming messages and invoking quickfixj's session.send() at
same time.  Could you please advise how I can ensure ordering is preserved
between transformation and publishing of Quickfix/J when it is parallel
processing? 


Routbuilder setup example in our application

from(vm:FixQueue?concurrentConsumers=10)
.to(bean:transformerBean?method="transformFixMessage")
.to(quickfix:config/session.cfg?sessionID=FIX.4.2:Test->Destination)

Kind regards,
-Vid-



--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Quickfixj-2-9-3-Ordering-issue-tp5726595.html
Sent from the Camel - Users mailing list archive at Nabble.com.


unable to see my @ManagedOperation in Jconsole

2012-07-12 Thread vcheruvu
Hi,

 I have followed the instruction on JMX stuff  l
http://camel.apache.org/why-is-my-processor-not-showing-up-in-jconsole.html
http://camel.apache.org/why-is-my-processor-not-showing-up-in-jconsole.html   
I have not been able to see TestJmxEndpoint  class registered in the JMX
container. Below is the code that I have setup to see if my class will be
registered by Camel JMX container.  Could you please advise if I have missed
anything in my code?


I am using Camel 2.10.0 version. 



@ManagedResource(description = "Managed JmxEndpointTest")
public class TestJmxEndpoint  {


@ManagedOperation(description = "test JMX operation invocation button")
public String testJMXOperation() {

return "invocation completed !!";
}

}


XML***

http://camel.apache.org/schema/spring";
id="camel">
com.vid.test


...





Kidn regards,
-Vid-





--
View this message in context: 
http://camel.465427.n5.nabble.com/unable-to-see-my-ManagedOperation-in-Jconsole-tp5715926.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel JMX - 2.9.2

2012-05-03 Thread vcheruvu
Ah..k.. I thought you will need ManagedOperationParameters for operations
that take parameters.  Unlike Spring JMX, it is less verbose. I realised in
the SedaEnpoint code i have seen JMX annotations. I should have figured it
out from that... Thanks for responsding to my query..

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


Camel JMX - 2.9.2

2012-05-01 Thread vcheruvu
Hi Camel riders,

I have been reading up on Camel JMX and learnt that Spring JMX annotations
are no longer required. So,  below  are camel JMX annotations

org.apache.camel.api.management.ManagedOperation;
org.apache.camel.api.management.ManagedResource; 
org.apache.camel.api.management.ManagedAttribute

 I am trying to create  JMX operation that takes input parameters from JMX
console. I cannot find Camel's equivalent for ManagedOperationParameter. is
there equivalent camel Annotation for 
org.springframework.jmx.export.metadata.ManagedOperationParameter and
ManagedOperationParameters?


Kind regards,
-Vid-


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


Re: tcp socket client consumer endpoint?

2012-04-10 Thread vcheruvu
Hi Chad,

  Currently, I have to implement a tcp client that connects to a remote
host. The following things takes place between client and remote host

1. Once connected to remote host, client send login message with a custom
message format converted into bytes over wire. Remote host  will send
sucessfull login code to client.
2. Once login is successfull,  TCP client send another  message that defines
our interest to get data from remote host as asynchronous mode. The remote
host will understand our message and publishes  data to our socket session.
3. While client is connected,  Remote host will send ping to Client for
heartbeat check. Client must respond to the heartbeat for remote host within
a time period, this is to ensure that remote host doesn't think that client
is down otherwise socket session is closed after 3 tries.

I am trying to see if above is possible with camel-mina2 with custom
processors/handlers for sending/receiving messages to/from remote host. 

Kind regards,
-Vid-


--
View this message in context: 
http://camel.465427.n5.nabble.com/tcp-socket-client-consumer-endpoint-tp3276804p5631446.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: tcp socket client consumer endpoint?

2012-04-09 Thread vcheruvu
Hi Camel riders,

  I have tried  tcp client consumer with camel-mina2 and confirmed that it
doesn't support it yet. Will this feature be available in 2.10?

Kind regards,
-Vid-

--
View this message in context: 
http://camel.465427.n5.nabble.com/tcp-socket-client-consumer-endpoint-tp3276804p5629124.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: ProducerTemplate for sending mails with attachements

2012-04-01 Thread vcheruvu
Thanks Ashwin and Claus for valuable suggestions. I have applied your
suggestion using Processor and Exchange.  


template.send(smtp://testServer@host.mailbank?&password=test123&contentType=text/html",ExchangePattern.InOnly,
new EmailProcessor(to, from, byteArrayOutputStream, imagesData));

EmailProcessor implements Processor interface. I have added all the
necessary implementation i.e add headers and attachements to the exchange
object. Camel rocks !!...




--
View this message in context: 
http://camel.465427.n5.nabble.com/ProducerTemplate-for-sending-mails-with-attachements-tp5605511p5611283.html
Sent from the Camel - Users mailing list archive at Nabble.com.


ProducerTemplate for sending mails with attachements

2012-03-29 Thread vcheruvu
Hi,

 I am using Camel-mail component to send emails out to clients for given
byteOutputStream (content is html email) and imagesData in byte[] (image
used in html content). ProducerTemplate.sendBodyandHeaders()  has all the
mail paramter details to send to client. However, I am not able to find a
way where I can add image to the header which will ensure html email content
can embedd the image when sending to clients. Normally, it will work with 
exchange.getIn().addAttchement("cid:001", dataHandler(image name)). But with
ProducerTemplate I do not have way to add the attachments to 
Exchange.getIn() object. 
Even the camel-mail test classes use Exchange.getIn().addAttachement(..) and
use the exchange object in ProducerTemplate. In my cases I do not create
exchange object at all when using ProducerTemplate. 
Could you please advise how I can add attachments through ProducerTemplate? 


public class EmailSender{

   @Autowired
private ProducerTemplate template;

private void sendEmail(ByteArrayOutputStream byteArrayOutputStream
,HashMap imagesData, String to, String 
from) {
try{
Map map = new HashMap();
map.put("To", to);
map.put("From", from);
map.put("Subject", "Camel rocks");
// ByteArrayDataSource bs = new
ByteArrayDataSource(imagesData.get("px"),"application/octet-stream");
//map.put("cid:px", new DataHandler(bs));

template.sendBodyAndHeaders("smtp://testServer@host.mailbank?&password=test123&contentType=text/html",
 

byteArrayOutputStream.toString(), map);
}catch (Exception e){
LOG.error("Unable to send mail !!!" + e);
}

}

}


--
View this message in context: 
http://camel.465427.n5.nabble.com/ProducerTemplate-for-sending-mails-with-attachements-tp5605511p5605511.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: JMX- queue size operation fails - Camel 2.9.0

2012-01-24 Thread vcheruvu
Hi Babak,

Thank you for confirming the issue. I have raised a JIRA ticket as
requested. Just out of curiosity is it possible to add TDD test case for
ManagedBrowsableEndpoint?  I do not see test classes for
ManagedBrowsableEndpoint in the Camel trunk. I have seen several posts on
Camel where JMX operations are broken.

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


Cheers,
-Vid-

--
View this message in context: 
http://camel.465427.n5.nabble.com/JMX-queue-size-operation-fails-Camel-2-9-0-tp5233089p5416965.html
Sent from the Camel - Users mailing list archive at Nabble.com.


JMX- queue size operation fails - Camel 2.9.0

2012-01-23 Thread vcheruvu
Hi Camel team,

I have JMX console setup for VM endpoint. In Camel 2.8.3 version, i can see
the queue size of VM endpoint. However in Camel 2.9.0 version, queue size
operation through jmx gui console throws an error. Please see the screen
shot that i have attached to this post. Is there some an issue with Camel
2.9.0 with JMX operations for VM endpoint?

http://camel.465427.n5.nabble.com/file/n5233089/queueSizeError.bmp
queueSizeError.bmp 


Kind regards,
-Vid-

--
View this message in context: 
http://camel.465427.n5.nabble.com/JMX-queue-size-operation-fails-Camel-2-9-0-tp5233089p5233089.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Re: Translate FIX message to HTTP request

2011-07-19 Thread vcheruvu
would you mind showing the  details of config.cfg. I believe there is some
config issue in your end  that you need to specify somethig like below
statement. Also, If you can show me the stack trace of your null pointer,
then it could help me to see where and how you are experiencing the issue.

to("quickfix:config.cfg?sessionID=FIX.4.2:SENDERCOMPID->TARGETCOMPID")


kind regards,
-Vid-

--
View this message in context: 
http://camel.465427.n5.nabble.com/Translate-FIX-message-to-HTTP-request-tp4492401p4613914.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel-Cxf:unable to find wsdl

2011-04-20 Thread vcheruvu
Ah !! I overlooked the file extension differences.. sorry to waste your
time.. 

--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Cxf-unable-to-find-wsdl-tp4315065p4329756.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel-Cxf:unable to find wsdl

2011-04-20 Thread vcheruvu
Hi Willem and Claus, 

The wsdl file is located in cxf\src\main\resources\META-INF\wsdl\ and named
it bclearapi-1.6.wsdl. 

In cxf endpoint I have specified the  wsdlURL path to 
"classpath:META-INF/wsdl/bclearapi-1.6.wsdl" . However when running the test
class,  CXF is looking for ./bclearapi-1.6.wsdl instead of 
META-INF/wsdl/bclearapi-1.6.wsdl path. Why is CXF is looking for
"./bclearapi-1.6.wsdl" ?

I hope you tried to run the test class and you will come to know that CXF is
looking for /bclearapi-1.6.wsdl instead of the path
/resouces /META-INF/wsdl/bclearapi-1.6.wsdl.

Please run mvn eclipse:eclipse,  and run the test class, you will get the
error.  I have ensured that main/resources added to the java buildpath  in
eclipse so that camel  can use the classpath to access the file path to
META-INF/wsdl/bclearapi-1.6.wsdl.

I hope I am not overlooking something simple here, but i have debugged the
code up until WSDLManagerImpl.loadDefinition(String) after that i do not
have visibility to com.ibm.wsdl.xml.WSDLReaderImpl class due to the jar file
not having any line numbers.


Cheers,
-Vid-




--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Cxf-unable-to-find-wsdl-tp4315065p4329571.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel-Cxf:unable to find wsdl

2011-04-19 Thread vcheruvu
HI,
 I have created a project that simply consumes soap messsage from cxf
endpoint in a test class. I have created the following route in JAVA dsl and
spring bean to define cxfendpoint as shown below. When I run the test class,
I get an error that it has problem parsing ./bclearpapi-1.6.xsd due to file
not found. I have verified the file path 100 times and the file is stored in
correct path. I have attached the project zip file so that you can simply
run the test class to replicate the problem. So, I am wondering if I am
doing anything wrong in my project? I am starting to feel the wsdlURL path
is not correctly interpreted by internal CXF classes I.e
com.ibm.wsdl.xml.WSDLReaderImpl.getDocument(..) .


http://camel.465427.n5.nabble.com/file/n4315065/cxf.zip cxf.zip 


Test Java DSL


..
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
@Override
public void configure() throws Exception {
from("cxf:bean:bclearEndpoint")
.process(new Processor() {
public void process(Exchange exchange) throws Exception 
{
  CxfPayload payload =
exchange.getIn().getBody(CxfPayload.class);
  List elements = payload.getBody();
  
  List headers = payload.getHeaders();
   

};
  }
);
}
};






Camel Spring application context


http://www.springframework.org/schema/beans";
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
   xmlns:context="http://www.springframework.org/schema/context"; 
   xmlns:tx="http://www.springframework.org/schema/tx"; 
   xmlns:p="http://www.springframework.org/schema/p";
   xmlns:jdbc="http://www.springframework.org/schema/jdbc";
   xmlns:cxf="http://camel.apache.org/schema/cxf";
   xsi:schemaLocation="
   http://camel.apache.org/schema/spring
   http://camel.apache.org/schema/spring/camel-spring.xsd 
   http://www.springframework.org/schema/tx
   http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
   http://www.springframework.org/schema/beans
   http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
   http://www.springframework.org/schema/context
   http://www.springframework.org/schema/context/spring-context-3.0.xsd
   http://www.springframework.org/schema/jdbc
   http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd
   http://camel.apache.org/schema/cxf
   http://camel.apache.org/schema/cxf/camel-cxf.xsd";>



   http://156.48.255.126/axis/services/BclearApi14";
wsdlURL="classpath:META-INF/wsdl/bclearapi-1.6.wsdl"
serviceClass="com.vid.test.TestService"/>

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

  





Error message

javax.wsdl.WSDLException: WSDLException (at
/wsdl:definitions/wsdl:types/xs:schema): faultCode=PARSER_ERROR: Problem
parsing './bclearapi-1.6.xsd'.: java.io.FileNotFoundException:
C:\vid\workspaces\bel-workspace\bel\cxf\bclearapi-1.6.xsd (The system cannot
find the file specified)


Kind regards,
-Vid-


--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-Cxf-unable-to-find-wsdl-tp4315065p4315065.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Embedding Camel routes in a web Console

2011-04-18 Thread vcheruvu
Hi Claus,

I have followed the camel web-console
(http://camel.apache.org/web-console.html) web page that you mentioned in
the previous post. As per the instructions on the web page, I cannot find
the camel-web-standalone.jar file in the 2.7.1 zip file . Is the
camel-webconsole webpage  out of date?

Kind regards,
-Vid-

--
View this message in context: 
http://camel.465427.n5.nabble.com/Fwd-Embedding-Camel-routes-in-a-web-Console-tp3273042p4312150.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel (2.5) Multicast Component - Body References, Concurrency & Copying

2011-04-09 Thread vcheruvu
Is this feature only supported for Java DSL?If not do you have an example on
how to use onPrepare in Spring DSL? 


--
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-2-5-Multicast-Component-Body-References-Concurrency-Copying-tp3339259p4293712.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel (2.5) Multicast Component - Body References, Concurrency & Copying

2011-01-13 Thread vcheruvu

For 1, I checked in the Camel book to see how i can define parrelelProcessing
for multicast in Spring DSL.  I do not see an example to specify
parallelProcessing in Spring DSL. Is it only available in Java DSL?
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-2-5-Multicast-Component-Body-References-Concurrency-Copying-tp3339259p3340664.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel 3.0 release

2010-12-27 Thread vcheruvu

Hi,

When can we expect to see Camel 3.0 release? I am hoping to see Camel using
more of Java EE 6 features, I.E. JSR 330. I am wondering, is it possible to
specify the routes in beans.xml(CDI configuration) instead of Spring based
xml configuration? Some end users might not have Spring as defacto
technology.

Kind regards,
-Vid-
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-3-0-release-tp3320003p3320003.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel-QuickFIXJ - Proxool jar dependency issues

2010-11-22 Thread vcheruvu

Thanks Claus, only dependency for Quickfixj jdbc store mode are Proxool 0.9.1  
& Proxool-CGI 0.9.1.
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-QuickFIXJ-Proxool-jar-dependency-issues-tp3271906p3276055.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel-QuickFIXJ - Proxool jar dependency issues

2010-11-21 Thread vcheruvu

Latest version of proxool is 0.9.1.  Public repository do not have latest
version. So, I am wondering if latest proxool jar files could uploaded on
Fuse or Apache repo.

http://proxool.sourceforge.net/
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-QuickFIXJ-Proxool-jar-dependency-issues-tp3271906p3274732.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel-QuickFIXJ - Proxool jar dependencies issues

2010-11-18 Thread vcheruvu

Hi, 

I have configured quickfixj to use jdbc store to persist FIX  messages. I
have come to know that Proxool dependency jar files are missing in the fuse
repository. Is it possible to add the proxool dependencies in Fuse repo?


Kind regards,
-Vid-
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-QuickFIXJ-Proxool-jar-dependencies-issues-tp3271906p3271906.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Multiple JPA Consumers

2010-11-15 Thread vcheruvu

I have solved your issue by having stored procedure to return the records.
This stored procedure use select for update with row lock. When JPA consumer
calls the stored procedures it will guarantee to call next set of records
rather than the records that have been locked by other JPA consumer. It is
messy to get application to manage this. This way, it will also  to allow  3
or 4 or n number of consumers..

In the entity class, i have used Hibernate  Query hint. ( We use Sybase
database)

@NamedNativeQueries({ @NamedNativeQuery(name="pollRecords", query="SET
CHAINED OFF exec poll_record_process 2500",
resultClass= MyEntity.class,
hint...@queryhint(name="org.hibernate.callable", 
value="true")}),
@NamedNativeQuery(name="pollRecordsTest", query="SET CHAINED OFF exec
poll_record_procTest 10",
resultClass= MyEntity.class,
hint...@queryhint(name="org.hibernate.callable", 
value="true")})
})

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


Re: Camel-quickfix logging

2010-11-09 Thread vcheruvu

Camel Riders,

Any thoughts to my second question on utilizing Camel property placeholder
for Quickfixj component's config files.I believe it will simplify config
file management and centralize all the environment specific values. 

Kind regards,
-Vid-



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


Re: Camel-quickfix logging

2010-11-08 Thread vcheruvu

Thanks Steve. I look forward to your new patch. what is the issue link for
this patch , so that i can have look at the changes that you will promote
this weekend.
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-quickfix-logging-tp3249378p3256092.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel-quickfix logging

2010-11-04 Thread vcheruvu

Hmm log4j.properties file is weak compared to log4j.xml. The properties file
does not support some advanced configuration options like Filters, custom
ErrorHandlers and a special type of appenders, i.e. AsyncAppender.
ErrorHandlers defines how errors in log4j itself are handled, for example
badly configured appenders. Filters are more interesting. From the available
filters, I think that the level range filter is really missing for property
files.

The log4j filter allows to define that a[n] appender should receive log
messages from Level INFO to WARN. This allows to split log messages across
different logfiles. One for DEBUGGING messages, another for warnings, ...The
property appender only supports a minimum level. If you set it do INFO, you
will receive WARN, ERROR and FATAL messages as well.

Hence I wanted to use log4j.xml for advance feature purposes.

Cheers,
-Vid-
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-quickfix-logging-tp3249378p3251115.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel-quickfix logging

2010-11-03 Thread vcheruvu

Hi,

I am using Camel-quickfix 2.5. I have set my log4j setting to write to file.
Yet, i am seeing camel-quickfix  logging to my console as shown below. I am
trying to ensure below logging are written to file instead to my console. I
have pasted my log4j setting below as well. Could you please advise if I am 
missing something?

console output
<20101104-00:17:53, FIX.4.2:TEST->EXEC, event> (Session FIX.4.2:TEST->EXEC
schedule is daily, 11:25:00-UTC - 11:20:00-UTC)
<20101104-00:17:53, FIX.4.2:TEST->EXEC, event> (Created session:
FIX.4.2:TEST->EXEC)
<20101104-00:17:53, FIX.4.2:TEST->BROKER, event> (Session
FIX.4.2:TEST->BROKER schedule is daily, 11:25:00-UTC - 11:20:00-UTC)
<20101104-00:17:53, FIX.4.2:TEST->BROKER, event> (Created session:
FIX.4.2:TEST->BROKER)
<20101104-00:17:54, FIX.4.2:TEST->BROKER, event> (Initiated logon request)
<20101104-00:17:55, FIX.4.2:TEST->BROKER, event> (Received logon)



log4j.xml settings
.

 









.

 




 


 


.


Kind regards,
-Vid-

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


Re: Camel-QuickFIX - JMX console to invoke quickfix server operations

2010-09-21 Thread vcheruvu

Steve and Hadrian,

Thank you for quick responses. Camel and Quickfix are promising combination
for developing apps. I am looking forward to apply your changes for
performance testing in my environment. I will share my performance results
with you guys.

Kind regards,
-Vid-
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-QuickFIX-JMX-console-to-invoke-quickfix-server-operations-tp2840088p2849068.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel-QuickFIX - JMX console to invoke quickfix server operations

2010-09-19 Thread vcheruvu

Hi Steve,

I have been learning and getting my hands dirty with both Camel and
Quickfix. It looks very promising and would like to run few test cases. Have
you promoted your code to the Camel trunk yet? I haven't seen any of your
JMX code in Camel-Quickfix component after reading earlier posts. Have you
got a proposed date for putting all your enhancements/changes for
Camel-QuickFix component?

Kind regards,
-Vid-
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-QuickFIX-JMX-console-to-invoke-quickfix-server-operations-tp2840088p2846057.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Camel-QuickFIX - JMX console to invoke quickfix server operations

2010-09-14 Thread vcheruvu

Hi,

I have started Camel-QuickFix component as an acceptor. I have managed to
send mock fix messages to the my Camel-Quickfix from FIX Simulator. Now I am
trying to turn on JMX support for Camel-QuickFIX component. I went through
the QuickFixAcceptor code and have not seen any code that  enable JMX
support for QuickFix. How can I enable JMX support for Quickfix in Camel so
that i could invoke reset, logon, logout and disconnect operations?


Kind regards,
-Vid-

-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-QuickFIX-JMX-console-to-invoke-quickfix-server-operations-tp2840088p2840088.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel-QuickFIX jar issues

2010-08-31 Thread vcheruvu

Hi Hadrian,

Have you got any response for my second question?

Cheers,
-Vid-
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Camel-QuickFIX-jar-issues-tp2652022p2798739.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Camel shutdown on windows

2010-08-27 Thread vcheruvu

I did bit of investigation at eclipse side and noticed that Eclipse only
invokes terminate and doesn't call Ctr C equivalent shutdown. There is an
existing bug in eclipse as shown below which won't be fixed. 

https://bugs.eclipse.org/bugs/show_bug.cgi?id=38016 


So, i have found a way to initiate graceful shutdown. Please see the link
below which gave me an idea
http://blog.arc90.com/2008/04/18/patrick-avis-java-tips-2-graceful-jvm-shutdown-in-eclipse/


I have written a code that will allow me to shutdown from eclipse console.
This can be seen a hack but it helps during development to gracefully
shutdown an application that was started through eclipse ide.

in the main method

if (Boolean.parseBoolean(System.getenv("RUNNING_IN_ECLIPSE")) == true){
ShutDownFromEclipseConsole 
shutDownThread = new
ShutDownFromEclipseConsole();
shutDownThread .setDaemon(true);
shutDownThread .start();
}
...
// call Spring method
// i.e. org.apache.camel.spring.Main.main(configLocation);
...


public class ShutDownFromEclipseConsole extends Thread {
@Override
public void run() {
String line = null;
do{
try{
//if i didn't add this delay, then
in.readline will block the camel logging on the console.
Thread.sleep(1000);
InputStreamReader converter = new 
InputStreamReader(System.in);
BufferedReader in = new 
BufferedReader(converter);

line = in.readLine();

}catch (IOException e) {
e.printStackTrace();
} catch (InterruptedException e) {

e.printStackTrace();
}
} while(!line.equalsIgnoreCase("x"));
System.exit(1);
}
}


Cheers,
-Vid-


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


Camel shutdown on windows

2010-08-26 Thread vcheruvu

Hi,

My application runs on windows through Eclipse IDE. It calls
org.apache.camel.spring.Main class to start the application. When I shutdown
the application through the stop button, I do not see any shutdown messages
from Camel on Eclipse console. So, I have placed breakpoints in many places
in DefaultShutDownStrategy class.  It never reached to the breakpoint. I
have also placed breakpoints in DefaultCamelContext.shutdown() and it never
reached there either.  It appears to me on windows, when I use stop button
through eclipse ide, it is doing force kill instead of graceful shutdown. I
looked for examples in your book and I didn't see any special notes on
graceful shutdown. How can I invoke graceful shutdown through eclipse ide on
windows?  



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





  

body













Kind regards,
-Vid-


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


Camel-QuickFIX jar issues

2010-08-24 Thread vcheruvu

Hi,

I have come across another issue with Jar dependency in Camel. I am
exploring Camel-QuickFix component.  I realized that Maven is unable to
download Quickfix-all jar file from Jarvana. I have come to know that
Jarvana or other ibiblio repository do not have quickfix jar files. Any idea
what is happening there?

Recently, Quickfixj released new version 1.5.0. Are there any plans in the
roadmap to upgrade Camel-quickfix to use Quickfixj 1.5.0 version? I remember
on this forum Steve Bate (QuickFixJ committer/founder) has been looking to
re-write Camel-QuickFix component and suggested few enhancements. Is he
still involved on camel-quickfix integration?

Kind regards,
-Vid-

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


missing commons-csv jar file

2010-08-24 Thread vcheruvu

Hi,

I am using Maven to download transitive jar files for camel-csv  I cannot
find apache commons-csv version 1.0r-706899 in the ibiblio repository of
http://people.apache.org/repo/m2-ibiblio-rsync-repository/ site under
org.apache.commons group. I cannot find the jar in the
http://mvnrepository.com site either. Is there something wrong with
camel-csv pom file that describes dependencies for apache common-csv version
1.0r-706899? I have managed to get around by manually downloading it from
http://jarvana.com/jarvana/inspect-pom/org/apache/servicemix/bundles/org.apache.servicemix.bundles.commons-csv/1.0-r706899_3
site. 

Kind regards,
-Vid-
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/missing-commons-csv-jar-file-tp2650826p2650826.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Java heap space issue with reading large CSV file

2010-08-18 Thread vcheruvu

I have changed my logging level to INFO but it didn't solve memory issue. I
have turned on JConsole noticed that, memory shoots up to 1.05GB when Camel
reads in 218K lines, 45 MB file and then throws heap memory issue with
Jconsole RMI which is trying to get memory info of the application. 

I am bit puzzled as to what happening in the Camel-File component when it
reads in all the line from the csv file. 

I could only get around the issue only if I split the file into 10K lines
per file. In this case, camel reads all the 20 files one by one, then it
reaches memory usage upto 900MB and but doesn't crash with heap memory
issue. Why didn't heap memory occurred in this scenario? is this because,
JVM had sufficient time to GC objects? or application JVM settings for GC is
poor? 

 -Xms1024m -Xmx1024m -XX:MaxTenuringThreshold=4 -XX:SurvivorRatio=8
-XX:NewSize=128m -XX:MaxNewSize=128m -XX:+UseParNewGC 
-XX:+CMSParallelRemarkEnabled -XX:PermSize=64m -XX:MaxPermSize=64m
-XX:+UseAdaptiveSizePolicy

 I have attached jconsole memory graph for both cases. Both cases , I have
set the same JVM settings.

I guess it will be nice addition if we could have option for file consumer
to limit number of lines to be read in for every poll regardless of number
files. This will give some control on application to manage memory,
throughput and stability. 
http://camel.465427.n5.nabble.com/file/n2640474/heapspace-singlefile.bmp
heapspace-singlefile.bmp 
http://camel.465427.n5.nabble.com/file/n2640474/heapspace-multifile.bmp
heapspace-multifile.bmp 
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Java-heap-space-issue-with-reading-large-CSV-file-tp2638903p2640474.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Java heap space issue with reading large CSV file

2010-08-18 Thread vcheruvu

I have created the JIRA for this issue.

https://issues.apache.org/activemq/browse/CAMEL-3060


I remember I have set my log4j logging to INFO level. I will check my log4j
config again ensure it is not in DEBUG level and see if I could get around
it.

Thanks,
-Vid-
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Java-heap-space-issue-with-reading-large-CSV-file-tp2638903p2639387.html
Sent from the Camel - Users mailing list archive at Nabble.com.


ApplicationContextTestSupport class not found in Camel 2.3

2010-08-12 Thread vcheruvu

Hi,

 I am looking at Camel-Mock component site. According to the spring example
comments, I believe it is out of date for Camel 2.0+ versions. I haven't
been able to follow your example with Camel 2.3 version. Could you please
let me know if you could update the example that works with Camel 2.3
version, So that I can understand how to utilize  @EndpointInject in my test
class. 

Kind regards,
-VId-
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/ApplicationContextTestSupport-class-not-found-in-Camel-2-3-tp2507940p2507940.html
Sent from the Camel - Users mailing list archive at Nabble.com.


File Component - directory name changes based on environment location.

2010-08-06 Thread vcheruvu

Hi,

I am using below config to read files from  specific directory.







 
 
 
 
   
 

 
   
   
 
   

Set Filename in the header property

2010-08-04 Thread vcheruvu

Hi,

I have created route below where files are stored on source/files directory
by some other process and I wouldn't know the file name. My camel app will
read any file name from the directory. While doing this, it utilizes
flatpack Fixed length component to parse file content and routes it to bean
for tranformation. When it comes to bean (mapFileBean), I am unable to get
the file name from the Exchange object. I  need the filename to determine
few cases. How can I pass the file name from different routes? I have tried
to use setHeader as shown below and when it comes to bean it doesn't have
CamelFileName in the header property. Any suggestions with getting file name
in transformFromFiletoJavaObject route? I am using Camel 2.3.





  ${file:onlyname.noext}





   



Kind regards,
-Vid- 
-- 
View this message in context: 
http://camel.465427.n5.nabble.com/Set-Filename-in-the-header-property-tp2264943p2264943.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Exception while trying to gracefully shutdown camel

2010-05-28 Thread vcheruvu

I am using Spring 2.5.6.


Claus Ibsen-2 wrote:
> 
> Hi
> 
> What version of Spring are you using?
> 
> 
> 
> On Fri, May 28, 2010 at 11:34 AM, vcheruvu 
> wrote:
>>
>> K.. I have gone through Spring reference manual and looked at ways to
>> control
>> bean destroy. I tried using camelcontext id name defined in my config and
>> applied it to bean's depends-on attribute.  Unfortunately, spring cannot
>> find my camelcontext id name.  After some investigation, I came across
>> this
>> link in Camel forum,
>>
>> http://old.nabble.com/Spring-3.0-and-Camel-2.2---Route-configure%28%29-called-before-Spring-beans-injected-td28415437.html#a28415437
>>
>> It appears only camelcontext id name "camel"  can be recognized by Spring
>> but not my custom camelcontext ids.  Camel hasn't registered my
>> camelcontext
>> ids in Spring. Is there any other way to make bean depend on Camel route
>> through Spring DSL ?
>>
>>
>>
>> Claus Ibsen-2 wrote:
>>>
>>> Hi
>>>
>>> I wonder if Spring has shutdown some of the JPA beans before it ask
>>> Camel to shutdown.
>>> So you may have to add some options on the spring beans. I wonder if
>>> the depends-on="camel" Spring attribute can be used so Spring will
>>> shutdown those spring beans AFTER camel.
>>>
>>> On Thu, May 27, 2010 at 5:21 AM, vcheruvu 
>>> wrote:
>>>>
>>>> Hi,
>>>>
>>>> I am performing graceful shutdown test with our application.This is to
>>>> ensure Camel does process all of the messages from VM queue and
>>>> shutdown
>>>> our
>>>> application. So, our application reads data from tables as a queue
>>>> using
>>>> Camel-JPA Component. Please see my camel spring config in the
>>>> attachment
>>>> below. I have ensured VM queue has about 100,000 Exchanges to be
>>>> processed
>>>> by storeNewOrderEventEntity route.  I tried to gracefully shut down
>>>> Camel
>>>> from eclipse stop button. In doing so, I got error with
>>>> saveOrderEventRepository bean (this bean calls our DAO/repository layer
>>>> code
>>>> which calls store procedure at DB server to insert new records).
>>>>
>>>> Any idea how I can ensure this bean can defer getting destroyed and
>>>> ensure
>>>> all messages are processed before shutting down?
>>>>
>>>> http://old.nabble.com/file/p28689054/pats-camel-context.xml
>>>> pats-camel-context.xml
>>>>
>>>> 2010-05-27 11:24:40,915 ERROR [Camel thread 139:
>>>> vm://storeNewEntity?concurrentConsumers=100&size=100&timeout=100]
>>>> Logger.log:248 - Err
>>>> or processing exchange. Exchange[Message: OrderEventDTO
>>>> [AccountID=IGMKTS,
>>>> AdviserID=IGORDERS2, BrokerID=MQIGM, BuySell=SELL, ClOrdID=null, ClO
>>>> rdIDString=195, ClientCode=Y (DR), ComfirmationID=null,
>>>> ContractID=6875,
>>>> CustomerOrderID=MQIGM, EventTyp
>>>> eCode=Partially Filled, ExchangeOrderID=20100413PTSGW0Y,
>>>> ExecID=6813:3641289, ExecutionInstructionCode=Market, ExpireTime=null,
>>>> ExternalOrderID
>>>> =1956282, FillContractID=null, FillPrice=null, FillSubaccountID=null,
>>>> FillVolume=null, HasChildren=null, OrderCategoryCode=Native,
>>>> OrderDate=20
>>>> 10-04-13 07:29:13.0, OrderTypeCode=F, ParentClOrdID=null,
>>>> ParentClOrdIDString=null, Price=1986.75, ReferenceClOrdID=null,
>>>> ReferenceClOrdIDStrin
>>>> g=null, ReferenceExecID=null, ReferenceTradeDate=2010-04-13 07:29:13.0,
>>>> SourceSystem=PATS, StopPrice=0.0, TargetSystem=CME, Text= , TimeInForce
>>>> Code=Limit, TransactTime=2010-04-13 07:29:13.0, Volume=23,
>>>> ExternalSecondaryID=6320]]. Caused by:
>>>> [org.springframework.beans.factory.BeanCreationNotAllowedException -
>>>> Error
>>>> creating bean with name 'saveOrderEventRepository': Singleton bean
>>>> creation
>>>> not allowed while the singletons of t
>>>> his factory are in destruction (Do not request a bean from a
>>>> BeanFactory
>>>> in
>>>> a destroy method implementation!)]
>>>> org.springframework.beans.factory.BeanCreationNotAllowedException:
>>>> Error
>>>> creating bean with name 'saveOrderEventRepository': Sin

Re: Exception while trying to gracefully shutdown camel

2010-05-28 Thread vcheruvu

K.. I have gone through Spring reference manual and looked at ways to control
bean destroy. I tried using camelcontext id name defined in my config and
applied it to bean's depends-on attribute.  Unfortunately, spring cannot
find my camelcontext id name.  After some investigation, I came across this
link in Camel forum,

http://old.nabble.com/Spring-3.0-and-Camel-2.2---Route-configure%28%29-called-before-Spring-beans-injected-td28415437.html#a28415437

It appears only camelcontext id name "camel"  can be recognized by Spring
but not my custom camelcontext ids.  Camel hasn't registered my camelcontext
ids in Spring. Is there any other way to make bean depend on Camel route
through Spring DSL ?



Claus Ibsen-2 wrote:
> 
> Hi
> 
> I wonder if Spring has shutdown some of the JPA beans before it ask
> Camel to shutdown.
> So you may have to add some options on the spring beans. I wonder if
> the depends-on="camel" Spring attribute can be used so Spring will
> shutdown those spring beans AFTER camel.
> 
> On Thu, May 27, 2010 at 5:21 AM, vcheruvu 
> wrote:
>>
>> Hi,
>>
>> I am performing graceful shutdown test with our application.This is to
>> ensure Camel does process all of the messages from VM queue and shutdown
>> our
>> application. So, our application reads data from tables as a queue using
>> Camel-JPA Component. Please see my camel spring config in the attachment
>> below. I have ensured VM queue has about 100,000 Exchanges to be
>> processed
>> by storeNewOrderEventEntity route.  I tried to gracefully shut down Camel
>> from eclipse stop button. In doing so, I got error with
>> saveOrderEventRepository bean (this bean calls our DAO/repository layer
>> code
>> which calls store procedure at DB server to insert new records).
>>
>> Any idea how I can ensure this bean can defer getting destroyed and
>> ensure
>> all messages are processed before shutting down?
>>
>> http://old.nabble.com/file/p28689054/pats-camel-context.xml
>> pats-camel-context.xml
>>
>> 2010-05-27 11:24:40,915 ERROR [Camel thread 139:
>> vm://storeNewEntity?concurrentConsumers=100&size=100&timeout=100]
>> Logger.log:248 - Err
>> or processing exchange. Exchange[Message: OrderEventDTO
>> [AccountID=IGMKTS,
>> AdviserID=IGORDERS2, BrokerID=MQIGM, BuySell=SELL, ClOrdID=null, ClO
>> rdIDString=195, ClientCode=Y (DR), ComfirmationID=null, ContractID=6875,
>> CustomerOrderID=MQIGM, EventTyp
>> eCode=Partially Filled, ExchangeOrderID=20100413PTSGW0Y,
>> ExecID=6813:3641289, ExecutionInstructionCode=Market, ExpireTime=null,
>> ExternalOrderID
>> =1956282, FillContractID=null, FillPrice=null, FillSubaccountID=null,
>> FillVolume=null, HasChildren=null, OrderCategoryCode=Native, OrderDate=20
>> 10-04-13 07:29:13.0, OrderTypeCode=F, ParentClOrdID=null,
>> ParentClOrdIDString=null, Price=1986.75, ReferenceClOrdID=null,
>> ReferenceClOrdIDStrin
>> g=null, ReferenceExecID=null, ReferenceTradeDate=2010-04-13 07:29:13.0,
>> SourceSystem=PATS, StopPrice=0.0, TargetSystem=CME, Text= , TimeInForce
>> Code=Limit, TransactTime=2010-04-13 07:29:13.0, Volume=23,
>> ExternalSecondaryID=6320]]. Caused by:
>> [org.springframework.beans.factory.BeanCreationNotAllowedException -
>> Error
>> creating bean with name 'saveOrderEventRepository': Singleton bean
>> creation
>> not allowed while the singletons of t
>> his factory are in destruction (Do not request a bean from a BeanFactory
>> in
>> a destroy method implementation!)]
>> org.springframework.beans.factory.BeanCreationNotAllowedException: Error
>> creating bean with name 'saveOrderEventRepository': Singleton bean
>> creation
>> not allowed while the singletons of this factory are in destruction (Do
>> not
>> request a bean from a BeanFactory in a destroy method implementation!)
>>        at
>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:209)
>>        at
>> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
>>        at
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
>>        at
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
>>        at
>> org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:880)
>>        at
>> org.apache.camel.spring.spi.ApplicationContextRegistry.lookup(Applicati

Re: Exception while trying to gracefully shutdown camel

2010-05-26 Thread vcheruvu

I have added  shutdownRoute="Defer" for every route. You can see that in my
attachment file in the original post. I am assuming that I just have to add
"Defer" in the config. I am not using custom component, so i didn't have to
write custom shutdown strategy. Is there something else that I am missing? 


Claus Ibsen-2 wrote:
> 
> Hi
> 
> You most likely need to configure some of your routes to Defer
> shutting down so they are active and can process the messages.
> You can read about this option in the Camel documentation.
> 
> 
> 
> On Thu, May 27, 2010 at 5:21 AM, vcheruvu 
> wrote:
>>
>> Hi,
>>
>> I am performing graceful shutdown test with our application.This is to
>> ensure Camel does process all of the messages from VM queue and shutdown
>> our
>> application. So, our application reads data from tables as a queue using
>> Camel-JPA Component. Please see my camel spring config in the attachment
>> below. I have ensured VM queue has about 100,000 Exchanges to be
>> processed
>> by storeNewOrderEventEntity route.  I tried to gracefully shut down Camel
>> from eclipse stop button. In doing so, I got error with
>> saveOrderEventRepository bean (this bean calls our DAO/repository layer
>> code
>> which calls store procedure at DB server to insert new records).
>>
>> Any idea how I can ensure this bean can defer getting destroyed and
>> ensure
>> all messages are processed before shutting down?
>>
>> http://old.nabble.com/file/p28689054/pats-camel-context.xml
>> pats-camel-context.xml
>>
>> 2010-05-27 11:24:40,915 ERROR [Camel thread 139:
>> vm://storeNewEntity?concurrentConsumers=100&size=100&timeout=100]
>> Logger.log:248 - Err
>> or processing exchange. Exchange[Message: OrderEventDTO
>> [AccountID=IGMKTS,
>> AdviserID=IGORDERS2, BrokerID=MQIGM, BuySell=SELL, ClOrdID=null, ClO
>> rdIDString=195, ClientCode=Y (DR), ComfirmationID=null, ContractID=6875,
>> CustomerOrderID=MQIGM, EventTyp
>> eCode=Partially Filled, ExchangeOrderID=20100413PTSGW0Y,
>> ExecID=6813:3641289, ExecutionInstructionCode=Market, ExpireTime=null,
>> ExternalOrderID
>> =1956282, FillContractID=null, FillPrice=null, FillSubaccountID=null,
>> FillVolume=null, HasChildren=null, OrderCategoryCode=Native, OrderDate=20
>> 10-04-13 07:29:13.0, OrderTypeCode=F, ParentClOrdID=null,
>> ParentClOrdIDString=null, Price=1986.75, ReferenceClOrdID=null,
>> ReferenceClOrdIDStrin
>> g=null, ReferenceExecID=null, ReferenceTradeDate=2010-04-13 07:29:13.0,
>> SourceSystem=PATS, StopPrice=0.0, TargetSystem=CME, Text= , TimeInForce
>> Code=Limit, TransactTime=2010-04-13 07:29:13.0, Volume=23,
>> ExternalSecondaryID=6320]]. Caused by:
>> [org.springframework.beans.factory.BeanCreationNotAllowedException -
>> Error
>> creating bean with name 'saveOrderEventRepository': Singleton bean
>> creation
>> not allowed while the singletons of t
>> his factory are in destruction (Do not request a bean from a BeanFactory
>> in
>> a destroy method implementation!)]
>> org.springframework.beans.factory.BeanCreationNotAllowedException: Error
>> creating bean with name 'saveOrderEventRepository': Singleton bean
>> creation
>> not allowed while the singletons of this factory are in destruction (Do
>> not
>> request a bean from a BeanFactory in a destroy method implementation!)
>>        at
>> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:209)
>>        at
>> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
>>        at
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
>>        at
>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
>>        at
>> org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:880)
>>        at
>> org.apache.camel.spring.spi.ApplicationContextRegistry.lookup(ApplicationContextRegistry.java:52)
>>        at
>> org.apache.camel.component.bean.RegistryBean.lookupBean(RegistryBean.java:125)
>>        at
>> org.apache.camel.component.bean.RegistryBean.getBean(RegistryBean.java:56)
>>        at
>> org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:72)
>>        at
>> org.apache.camel.impl.ProcessorEndpoint.onExchange(ProcessorEndpoint.java:95)
>>      

Exception while trying to gracefully shutdown camel

2010-05-26 Thread vcheruvu

Hi,

I am performing graceful shutdown test with our application.This is to
ensure Camel does process all of the messages from VM queue and shutdown our
application. So, our application reads data from tables as a queue using
Camel-JPA Component. Please see my camel spring config in the attachment
below. I have ensured VM queue has about 100,000 Exchanges to be processed
by storeNewOrderEventEntity route.  I tried to gracefully shut down Camel
from eclipse stop button. In doing so, I got error with
saveOrderEventRepository bean (this bean calls our DAO/repository layer code
which calls store procedure at DB server to insert new records).  

Any idea how I can ensure this bean can defer getting destroyed and ensure
all messages are processed before shutting down?

http://old.nabble.com/file/p28689054/pats-camel-context.xml
pats-camel-context.xml 

2010-05-27 11:24:40,915 ERROR [Camel thread 139:
vm://storeNewEntity?concurrentConsumers=100&size=100&timeout=100]
Logger.log:248 - Err
or processing exchange. Exchange[Message: OrderEventDTO [AccountID=IGMKTS,
AdviserID=IGORDERS2, BrokerID=MQIGM, BuySell=SELL, ClOrdID=null, ClO
rdIDString=195, ClientCode=Y (DR), ComfirmationID=null, ContractID=6875,
CustomerOrderID=MQIGM, EventTyp
eCode=Partially Filled, ExchangeOrderID=20100413PTSGW0Y,
ExecID=6813:3641289, ExecutionInstructionCode=Market, ExpireTime=null,
ExternalOrderID
=1956282, FillContractID=null, FillPrice=null, FillSubaccountID=null,
FillVolume=null, HasChildren=null, OrderCategoryCode=Native, OrderDate=20
10-04-13 07:29:13.0, OrderTypeCode=F, ParentClOrdID=null,
ParentClOrdIDString=null, Price=1986.75, ReferenceClOrdID=null,
ReferenceClOrdIDStrin
g=null, ReferenceExecID=null, ReferenceTradeDate=2010-04-13 07:29:13.0,
SourceSystem=PATS, StopPrice=0.0, TargetSystem=CME, Text= , TimeInForce
Code=Limit, TransactTime=2010-04-13 07:29:13.0, Volume=23,
ExternalSecondaryID=6320]]. Caused by:
[org.springframework.beans.factory.BeanCreationNotAllowedException - Error
creating bean with name 'saveOrderEventRepository': Singleton bean creation
not allowed while the singletons of t
his factory are in destruction (Do not request a bean from a BeanFactory in
a destroy method implementation!)]
org.springframework.beans.factory.BeanCreationNotAllowedException: Error
creating bean with name 'saveOrderEventRepository': Singleton bean creation
not allowed while the singletons of this factory are in destruction (Do not
request a bean from a BeanFactory in a destroy method implementation!)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:209)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
at
org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:880)
at
org.apache.camel.spring.spi.ApplicationContextRegistry.lookup(ApplicationContextRegistry.java:52)
at
org.apache.camel.component.bean.RegistryBean.lookupBean(RegistryBean.java:125)
at
org.apache.camel.component.bean.RegistryBean.getBean(RegistryBean.java:56)
at
org.apache.camel.component.bean.BeanProcessor.process(BeanProcessor.java:72)
at
org.apache.camel.impl.ProcessorEndpoint.onExchange(ProcessorEndpoint.java:95)
at
org.apache.camel.impl.ProcessorEndpoint$1.process(ProcessorEndpoint.java:65)
at
org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:97)
at
org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:95)
at
org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:146)
at
org.apache.camel.processor.SendProcessor.doProcess(SendProcessor.java:94)
at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:82)
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
at
org.apache.camel.processor.DelegateProcessor.processNext(DelegateProcessor.java:53)
at
org.apache.camel.processor.DelegateProcessor.proceed(DelegateProcessor.java:82)
at
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:93)
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:67)
at
org.apache.camel.processor.RedeliveryErrorHandler.processExchange(RedeliveryErrorHandler.java:177)
at
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:143)
at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:88)
at
org.apache.camel.processor.DefaultErrorHandler.process(DefaultErrorHand

unable to download 2.3 from any mirror links

2010-05-09 Thread vcheruvu

Hi ,

I have tried to download the camel  2.3 version and noticed all the mirror
links are broken. 

http://apache.mirror.aussiehq.net.au/activemq/apache-camel/2.3.0/apache-camel-2.3.0.zip

Regards,
-Vid-
-- 
View this message in context: 
http://old.nabble.com/unable-to-download-2.3-from-any-mirror-links-tp28507523p28507523.html
Sent from the Camel - Users mailing list archive at Nabble.com.



native(dll) to java callback method in Camel

2010-04-21 Thread vcheruvu

Hi,

I have an old java application that loads dll (native) to connect to third
party vendor. This dll will synchronously invoke onMessageRecieved callback
method  at java side  when there is an event and converts bytes to strings.

I am trying to investigate if I can write custom Camel Component that will 
create custom endpoint which loads the dll to connect to third party vendor.
Then customConsumer  extends default camel consumer that will have
onMessageReceived callback method which will be invoked by dll. Is this the
correct way to implement custom camel component? or rather achievable? Are
there any examples on using dll  in camel route ? 

Example:-




Kind regards,
-Vid-
-- 
View this message in context: 
http://old.nabble.com/native%28dll%29-to-java-callback-method-in-Camel-tp28288045p28288045.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: JPA component - EntityManagerFactory issue

2010-04-13 Thread vcheruvu

Thanks that worked nicely. So if i didn't have this bean definition, Spring
and Camel would have instantiated the entityManagerFactory twice. As per the
jpa example in the Camel src, perhaps it would be good idea to add this bean
as part of the spring based camel config example and avoid duplication of
instantiating entityMangerFactory. You will notice that in the TRACE level
logs for Camel JPA example.  



Claus Ibsen-2 wrote:
> 
> Hi
> 
> You can set the EntityManagerFactory on the JpaComponent, and Camel
> will reuse this one.
> 
> 
>   
> 
> 
> 
> On Wed, Apr 14, 2010 at 4:34 AM, vcheruvu 
> wrote:
>>
>> Hi,
>>
>> In my project, I am using JPA and using Hibernate vendor to poll tables.
>> Please see my config below.  I am trying to setup multiple persiste
>> http://old.nabble.com/file/p28237771/trace-jpa.txt trace-jpa.txt nce.xml
>> file in my project.
>>
>> 
>> 
>> ...
>>        
>>                        > uri="jpa:com.MyEntity?consumer.namedQuery=pollRecords&consumeDelete=false&delay=1000&consumer.useFixedDelay=true"/>
>>                        > uri="bean:rransformerBean?method=transformRecords"/>
>>                
>> 
>>  
>>    
>>  
>> > class="org.springframework.orm.jpa.persistenceunit.DefaultPersistenceUnitManager">
>>  
>>    
>>      classpath*:META-INF/spring/custom/persistence.xml
>>    
>>  
>>  
>>        > class="org.springframework.instrument.classloading.InstrumentationLoadTimeWeaver"/>
>>  
>> 
>>  > class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
>>        
>>        
>>        
>>                > class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
>>                 
>>                
>>        
>>
>> 
>> I am using Spring config to setup the multiple peristence xml location,
>> you
>> can see the example
>> http://docs.huihoo.com/spring/2.5.x/en-us/orm.html#orm-jpa-setup-lcemfb .
>> When running the camel application I have come to know that  Spring has
>> successfully created entity
>> http://old.nabble.com/file/p28237771/trace-jpa.txt trace-jpa.txt
>> ManagerFactory and loaded correct persistence.xml file. However, when
>> camel
>> starts, JPA endpoint tries to create/instantiate new entityManagerFactory
>> Object again instead of using existing entityManageFactory that was
>> already
>> created by spring. In doing so, EJB3Configuration.configure()  is invoked
>> by
>> Jpa endpoint throws an error stating "Could not find any
>> META-INF/persistence.xml file in the classpath". Why is camel JPA
>> endpoint
>> invoking  Persistence.createEntityManagerFactory(persistenceUnit,
>> getEntityManagerProperties()); instead of reusing entityMangerFactory
>> that
>> was instantiated by Spring? Is camel getting confused between
>> LocalEntityManagerFactory  and LocalContainerEntityManagerFactory ? I
>> have
>> added trace logs of camel, spring and hibernate in the attachment to this
>> post. Hopefully it helps you explain my questions.
>>
>> Kind regards,
>> -Vid-
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/JPA-component---EntityManagerFactory-issue-tp28237771p28237771.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
> 
> 

-- 
View this message in context: 
http://old.nabble.com/JPA-component---EntityManagerFactory-issue-tp28237771p28238297.html
Sent from the Camel - Users mailing list archive at Nabble.com.



JPA component - EntityManagerFactory issue

2010-04-13 Thread vcheruvu

Hi,

In my project, I am using JPA and using Hibernate vendor to poll tables.
Please see my config below.  I am trying to setup multiple persiste
http://old.nabble.com/file/p28237771/trace-jpa.txt trace-jpa.txt nce.xml
file in my project.



...





 

  

  

  classpath*:META-INF/spring/custom/persistence.xml

  
 

 

 




 




I am using Spring config to setup the multiple peristence xml location, you
can see the example
http://docs.huihoo.com/spring/2.5.x/en-us/orm.html#orm-jpa-setup-lcemfb .  
When running the camel application I have come to know that  Spring has
successfully created entity
http://old.nabble.com/file/p28237771/trace-jpa.txt trace-jpa.txt
ManagerFactory and loaded correct persistence.xml file. However, when camel
starts, JPA endpoint tries to create/instantiate new entityManagerFactory
Object again instead of using existing entityManageFactory that was already
created by spring. In doing so, EJB3Configuration.configure()  is invoked by
Jpa endpoint throws an error stating "Could not find any
META-INF/persistence.xml file in the classpath". Why is camel JPA endpoint
invoking  Persistence.createEntityManagerFactory(persistenceUnit,
getEntityManagerProperties()); instead of reusing entityMangerFactory that
was instantiated by Spring? Is camel getting confused between
LocalEntityManagerFactory  and LocalContainerEntityManagerFactory ? I have
added trace logs of camel, spring and hibernate in the attachment to this
post. Hopefully it helps you explain my questions.

Kind regards,
-Vid-





-- 
View this message in context: 
http://old.nabble.com/JPA-component---EntityManagerFactory-issue-tp28237771p28237771.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: SEDA implementation

2010-04-09 Thread vcheruvu

Thanks for  quick reply. After reading the SEDA component source and reading
the article (http://www.eecs.harvard.edu/~mdw/papers/seda-sosp01.pdf)
thoroughly,  gave me some understanding about Staging concept. Nice work
Camel team, it is quiet easy to understand Seda code in Camel..
-- 
View this message in context: 
http://old.nabble.com/SEDA-implementation-tp28172153p28188794.html
Sent from the Camel - Users mailing list archive at Nabble.com.



SEDA implementation

2010-04-07 Thread vcheruvu

Hi,

I came across site about SEDA implementation,
http://www.eecs.harvard.edu/~mdw/proj/seda/  . Does camel SEDA component
follow this model? If it does, author stated that "It is also worth noting
that a number of recent research papers have demonstrated that the SEDA
prototype (in Java) performs poorly compared to threaded or event-based
systems implemented in C... Also, SEDA imposes a high context switch
overhead in certain cases, depending on the number of threads and stages
used, and the processing granularity within each stage. " Is this still a
concern with SEDA implementation in Camel?

Kind regards,
-Vid-
-- 
View this message in context: 
http://old.nabble.com/SEDA-implementation-tp28172153p28172153.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Fail over support

2010-03-08 Thread vcheruvu

Hi,

I have primary camel server running which can read in data from various
sources, transform data and then write to new datastore.  I am trying to
figure out how I can  implement fail over support if primary camel server
dies for some reason and secondary server should start reading from various
data sources.  I searched for fail over support in Camel and only came
across Load Balancer which doesn't fit my needs. Any idea how I can
implement fail over support in camel.

Regards,
-Vid-
-- 
View this message in context: 
http://old.nabble.com/Fail-over-support-tp27831681p27831681.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: Multiple JPA Consumers

2010-03-01 Thread vcheruvu

 I will use DSL and get away from Spring config.  I am not fussy with how I
define the route in DSL or Spring config. Thanks for quick response mate..


Claus Ibsen-2 wrote:
> 
> On Tue, Mar 2, 2010 at 7:41 AM, vcheruvu 
> wrote:
>>
>> can jdbc or ibatis endpoint have multiple consumers from a table rather
>> than
>> creating another same route in the context file? Why isn't there multiple
>> consumer concept in Camel that read in from a table? I am thinking that
>> this
>> would be popular requirement that most people could face when they want
>> to
>> maximize throughput.
>>
> 
> Normally you would not have concurrent consumers on a JDBC table.
> Instead you would select data once, and then work on the ResultSet in
> parallel.
> You can do this using the threads() DSL in Camel.
> 
> 
> http://davsclaus.blogspot.com/2009/05/on-road-to-camel-20-concurrency-with.html
> 
> 
> 
>>
>> Claus Ibsen-2 wrote:
>>>
>>> On Mon, Mar 1, 2010 at 11:43 PM, vcheruvu 
>>> wrote:
>>>>
>>>> Apologies, I did not clearly explain in the previous post.
>>>>
>>>> Basically I am trying to see how can I can have  multiple consumers at
>>>> same
>>>> JPA endpoint.  So, multiple consumers will poll the table where each
>>>> consumer will get next 100 records.   I am treating the table as a
>>>> queue
>>>> using readpast select query and update rows that are processed.
>>>>
>>>> So how can I achieve concurrent consumers on this endpoint
>>>>
>>>> jpa:com.MyEntity?consumer.namedQuery=pollRecords&consumeDelete=false&delay=3000
>>>>
>>>
>>> The JPA component does not support concurrent consumers out of the box.
>>>
>>> You can define multiple routes in the camel context and thus still
>>> have concurrent consumers.
>>>
>>>
>>>
>>>>
>>>>
>>>>
>>>> Claus Ibsen-2 wrote:
>>>>>
>>>>> Hi
>>>>>
>>>>> I assume you are talking about having concurrent JPA consumers on the
>>>>> same JPA endpoint?
>>>>>
>>>>> eg you want this one:
>>>>> jpa:com.MyEntity?consumer.namedQuery=pollRecords&consumeDelete=false&delay=3000
>>>>>
>>>>> To have concurrent threads processing it?
>>>>> If not what are you talking about?
>>>>>
>>>>>
>>>>>
>>>>> On Mon, Mar 1, 2010 at 8:05 AM, vcheruvu 
>>>>> wrote:
>>>>>>
>>>>>> How can i define multiple JPA consumers in CAMEL? I have managed to
>>>>>> create
>>>>>> another camel context which is duplicate of below camelContext
>>>>>> segment
>>>>>> except id is named as camel2.  This duplicate segment worked but i
>>>>>> like
>>>>>> to
>>>>>> have a way where I can  define number of consumers without having
>>>>>> duplicate
>>>>>> the camelContext code. I looked at Seda and VM but didn't know how to
>>>>>> define
>>>>>> "from".  Can you please advise how I can add multiple consumers for
>>>>>> JPA
>>>>>> in
>>>>>> Camel? Thanks in advance.
>>>>>>
>>>>>>        >>>>> xmlns="http://camel.apache.org/schema/spring";>
>>>>>>        com.mbl
>>>>>>        
>>>>>>                
>>>>>>                        >>>>> uri="jpa:com.MyEntity?consumer.namedQuery=pollRecords&consumeDelete=false&delay=3000"/>
>>>>>>                        
>>>>>>                        >>>>> uri="bean:transformerBean?method=transformOrder"/>
>>>>>>
>>>>>>                
>>>>>>   
>>>>>>
>>>>>> >>>>> ="com.transformation.OrderTransformation"
>>>>>> />
>>>>>>
>>>>>>
>>>>>> Kind regards,
>>>>>> -Vid-
>>>>>> --
>>>>>> View this message in context:
>>>>>> http://old.nabble.com/Multiple-JPA-Consumers-tp27740630p27740630.html
>>>>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Claus Ibsen
>>>>> Apache Camel Committer
>>>>>
>>>>> Author of Camel in Action: http://www.manning.com/ibsen/
>>>>> Open Source Integration: http://fusesource.com
>>>>> Blog: http://davsclaus.blogspot.com/
>>>>> Twitter: http://twitter.com/davsclaus
>>>>>
>>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/Multiple-JPA-Consumers-tp27740630p27750074.html
>>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Claus Ibsen
>>> Apache Camel Committer
>>>
>>> Author of Camel in Action: http://www.manning.com/ibsen/
>>> Open Source Integration: http://fusesource.com
>>> Blog: http://davsclaus.blogspot.com/
>>> Twitter: http://twitter.com/davsclaus
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Multiple-JPA-Consumers-tp27740630p27752617.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Multiple-JPA-Consumers-tp27740630p27752766.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: Multiple JPA Consumers

2010-03-01 Thread vcheruvu

can jdbc or ibatis endpoint have multiple consumers from a table rather than
creating another same route in the context file? Why isn't there multiple
consumer concept in Camel that read in from a table? I am thinking that this 
would be popular requirement that most people could face when they want to
maximize throughput. 


Claus Ibsen-2 wrote:
> 
> On Mon, Mar 1, 2010 at 11:43 PM, vcheruvu 
> wrote:
>>
>> Apologies, I did not clearly explain in the previous post.
>>
>> Basically I am trying to see how can I can have  multiple consumers at
>> same
>> JPA endpoint.  So, multiple consumers will poll the table where each
>> consumer will get next 100 records.   I am treating the table as a queue
>> using readpast select query and update rows that are processed.
>>
>> So how can I achieve concurrent consumers on this endpoint
>>
>> jpa:com.MyEntity?consumer.namedQuery=pollRecords&consumeDelete=false&delay=3000
>>
> 
> The JPA component does not support concurrent consumers out of the box.
> 
> You can define multiple routes in the camel context and thus still
> have concurrent consumers.
> 
> 
> 
>>
>>
>>
>> Claus Ibsen-2 wrote:
>>>
>>> Hi
>>>
>>> I assume you are talking about having concurrent JPA consumers on the
>>> same JPA endpoint?
>>>
>>> eg you want this one:
>>> jpa:com.MyEntity?consumer.namedQuery=pollRecords&consumeDelete=false&delay=3000
>>>
>>> To have concurrent threads processing it?
>>> If not what are you talking about?
>>>
>>>
>>>
>>> On Mon, Mar 1, 2010 at 8:05 AM, vcheruvu 
>>> wrote:
>>>>
>>>> How can i define multiple JPA consumers in CAMEL? I have managed to
>>>> create
>>>> another camel context which is duplicate of below camelContext segment
>>>> except id is named as camel2.  This duplicate segment worked but i like
>>>> to
>>>> have a way where I can  define number of consumers without having
>>>> duplicate
>>>> the camelContext code. I looked at Seda and VM but didn't know how to
>>>> define
>>>> "from".  Can you please advise how I can add multiple consumers for JPA
>>>> in
>>>> Camel? Thanks in advance.
>>>>
>>>>        >>> xmlns="http://camel.apache.org/schema/spring";>
>>>>        com.mbl
>>>>        
>>>>                
>>>>                        >>> uri="jpa:com.MyEntity?consumer.namedQuery=pollRecords&consumeDelete=false&delay=3000"/>
>>>>                        
>>>>                        >>> uri="bean:transformerBean?method=transformOrder"/>
>>>>
>>>>                
>>>>   
>>>>
>>>> >>> ="com.transformation.OrderTransformation"
>>>> />
>>>>
>>>>
>>>> Kind regards,
>>>> -Vid-
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/Multiple-JPA-Consumers-tp27740630p27740630.html
>>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Claus Ibsen
>>> Apache Camel Committer
>>>
>>> Author of Camel in Action: http://www.manning.com/ibsen/
>>> Open Source Integration: http://fusesource.com
>>> Blog: http://davsclaus.blogspot.com/
>>> Twitter: http://twitter.com/davsclaus
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Multiple-JPA-Consumers-tp27740630p27750074.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Multiple-JPA-Consumers-tp27740630p27752617.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: Multiple JPA Consumers

2010-03-01 Thread vcheruvu

Apologies, I did not clearly explain in the previous post.

Basically I am trying to see how can I can have  multiple consumers at same
JPA endpoint.  So, multiple consumers will poll the table where each
consumer will get next 100 records.   I am treating the table as a queue
using readpast select query and update rows that are processed.

So how can I achieve concurrent consumers on this endpoint

jpa:com.MyEntity?consumer.namedQuery=pollRecords&consumeDelete=false&delay=3000




Claus Ibsen-2 wrote:
> 
> Hi
> 
> I assume you are talking about having concurrent JPA consumers on the
> same JPA endpoint?
> 
> eg you want this one:
> jpa:com.MyEntity?consumer.namedQuery=pollRecords&consumeDelete=false&delay=3000
> 
> To have concurrent threads processing it?
> If not what are you talking about?
> 
> 
> 
> On Mon, Mar 1, 2010 at 8:05 AM, vcheruvu 
> wrote:
>>
>> How can i define multiple JPA consumers in CAMEL? I have managed to
>> create
>> another camel context which is duplicate of below camelContext segment
>> except id is named as camel2.  This duplicate segment worked but i like
>> to
>> have a way where I can  define number of consumers without having
>> duplicate
>> the camelContext code. I looked at Seda and VM but didn't know how to
>> define
>> "from".  Can you please advise how I can add multiple consumers for JPA
>> in
>> Camel? Thanks in advance.
>>
>>        > xmlns="http://camel.apache.org/schema/spring";>
>>        com.mbl
>>        
>>                
>>                        > uri="jpa:com.MyEntity?consumer.namedQuery=pollRecords&consumeDelete=false&delay=3000"/>
>>                        
>>                        > uri="bean:transformerBean?method=transformOrder"/>
>>
>>                
>>   
>>
>> > ="com.transformation.OrderTransformation"
>> />
>>
>>
>> Kind regards,
>> -Vid-
>> --
>> View this message in context:
>> http://old.nabble.com/Multiple-JPA-Consumers-tp27740630p27740630.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Multiple-JPA-Consumers-tp27740630p27750074.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Multiple JPA Consumers

2010-02-28 Thread vcheruvu

How can i define multiple JPA consumers in CAMEL? I have managed to create
another camel context which is duplicate of below camelContext segment
except id is named as camel2.  This duplicate segment worked but i like to
have a way where I can  define number of consumers without having duplicate
the camelContext code. I looked at Seda and VM but didn't know how to define
"from".  Can you please advise how I can add multiple consumers for JPA in
Camel? Thanks in advance.
 
http://camel.apache.org/schema/spring";>
com.mbl
 






   




Kind regards,
-Vid-
-- 
View this message in context: 
http://old.nabble.com/Multiple-JPA-Consumers-tp27740630p27740630.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Camel JPA parameters - userFixedDelay issue

2010-02-23 Thread vcheruvu

Hi,

I am using Camel JPA 2.2.0 to poll records every 3 seconds. I have added a
userFixedDelay=true parameter in the URI and it keeps complaining it is not
correct. I have checked your website and it has userFixedDelay option. I
have tried different parameters as shown below. Any idea how to set
userFixedDelay=true in the jpa URI? 

Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to
resolve endpoint:
jpa://com.com.myEntity?consumeDelete=false&consumeLockEntity=false&consumer.query=select+x+from+com.myEntity+x+where+x.processed%3D0&delay=3000&fixedDelay=true&maximumResults=1000
due to: There are 1 parameters that couldn't be set on the endpoint. Check
the uri if the parameters are spelt correctly and that they are properties
of the endpoint. Unknown parameters=[{fixedDelay=true}]
at
org.apache.camel.impl.DefaultComponent.validateParameters(DefaultComponent.java:131)
at
org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:94)
at
org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:425)
... 32 more

Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to
resolve endpoint:
jpa://com.myEntity?consumeDelete=false&consumeLockEntity=false&consumer.query=select+x+from+com.myEntity+x+where+x.processed%3D0&delay=3000&maximumResults=1000&userFixedDelay=true
due to: There are 1 parameters that couldn't be set on the endpoint. Check
the uri if the parameters are spelt correctly and that they are properties
of the endpoint. Unknown parameters=[{userFixedDelay=true}]
at
org.apache.camel.impl.DefaultComponent.validateParameters(DefaultComponent.java:131)
at
org.apache.camel.impl.DefaultComponent.createEndpoint(DefaultComponent.java:94)
at
org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:425)
... 32 more

Regards,
-Vid-
-- 
View this message in context: 
http://old.nabble.com/Camel-JPA-parameters---userFixedDelay-issue-tp27714079p27714079.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: Maven repository

2010-02-17 Thread vcheruvu

I have upgraded camel to 2.2. Then tried mvn install. I noticed camel 2.2
still use spring 2.5.6 dependency jars instead of downloading Spring 3.0. 
Then I have tried again mvn camel:dot , this time i have an issue cglib

[INFO] Scanning for projects...
WAGON_VERSION: 1.0-beta-2
[INFO]

[INFO] Building Business Event Loader
[INFO]task-segment: [camel:dot]
[INFO]

[INFO] Preparing camel:dot
[INFO] [resources:resources]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] Copying 4 resources
[INFO] [compiler:compile]
[INFO] Nothing to compile - all classes are up to date
[INFO] [resources:testResources]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered
resources, i.e. build is platform dependent!
[INFO] Copying 3 resources
[INFO] [compiler:testCompile]
[INFO] Nothing to compile - all classes are up to date
Downloading:
http://host:49080/archiva/repository/tnc_repos//net/sourceforge/cglib/com.springsource.net.sf.cglib/2.1.3/com.springsource.net.sf.cglib-2.1.3.pom
[INFO] Unable to find resource
'net.sourceforge.cglib:com.springsource.net.sf.cglib:pom:2.1.3' in
repository com.springsource.repository.bundles.external
(http://repository.springsource.com/maven/bundles/external)
Downloading:
http://host:49080/archiva/repository/tnc_repos//net/sourceforge/cglib/com.springsource.net.sf.cglib/2.1.3/com.springsource.net.sf.cglib-2.1.3.pom
[INFO] Unable to find resource
'net.sourceforge.cglib:com.springsource.net.sf.cglib:pom:2.1.3' in
repository central (http://repo1.maven.org/maven2)
Downloading:
http://host:49080/archiva/repository/tnc_repos//net/sourceforge/cglib/com.springsource.net.sf.cglib/2.1.3/com.springsource.net.sf.cglib-2.1.3.jar
[INFO] Unable to find resource
'net.sourceforge.cglib:com.springsource.net.sf.cglib:jar:2.1.3' in
repository com.springsource.repository.bundles.external
(http://repository.springsource.com/maven/bundles/external)
Downloading:
http://host:49080/archiva/repository/tnc_repos//net/sourceforge/cglib/com.springsource.net.sf.cglib/2.1.3/com.springsource.net.sf.cglib-2.1.3.jar
[INFO] Unable to find resource
'net.sourceforge.cglib:com.springsource.net.sf.cglib:jar:2.1.3' in
repository central (http://repo1.maven.org/maven2)
[INFO]

[ERROR] BUILD ERROR
[INFO]

[INFO] Failed to resolve artifact.

Missing:
--
1) net.sourceforge.cglib:com.springsource.net.sf.cglib:jar:2.1.3

  Try downloading the file manually from the project website.

  Then, install it using the command: 
  mvn install:install-file -DgroupId=net.sourceforge.cglib
-DartifactId=com.springsource.net.sf.cglib -Dversion=2.1.3 -Dpackaging=jar
-Dfile=/path/to/file

  Alternatively, if you host your own repository you can deploy the file
there: 
  mvn deploy:deploy-file -DgroupId=net.sourceforge.cglib
-DartifactId=com.springsource.net.sf.cglib -Dversion=2.1.3 -Dpackaging=jar
-Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

  Path to dependency: 
1) org.apache.camel:camel-maven-plugin:maven-plugin:2.2.0
2) org.apache.camel:camel-spring-javaconfig:jar:2.2.0
3) net.sourceforge.cglib:com.springsource.net.sf.cglib:jar:2.1.3

--
1 required artifact is missing.

for artifact: 
  org.apache.camel:camel-maven-plugin:maven-plugin:2.2.0

from the specified remote repositories:
  tnc_archiva_mirror (http://host:49080/archiva/repository/tnc_repos/)



[INFO]

[INFO] For more information, run Maven with the -e switch
[INFO]

[INFO] Total time: 7 seconds
[INFO] Finished at: Thu Feb 18 10:46:51 EST 2010
[INFO] Final Memory: 21M/39M
[INFO]



mvnrepository site doesn't have this com.springsource.net.sf.cglib groupid .
Is there something i am missing? I have uploaded the file which has an
output after upgrading camel to 2.2 and executed mvn install to download new
jar files for camel 2.2. http://old.nabble.com/file/p27632595/log11.txt
log11.txt 



Claus Ibsen-2 wrote:
> 
> Hi
> 
> Yeah those Spring folks newer got around releasing their JavaConfig
> project very often.
> Not AFAIR its @deprecated as its being part of Spring 3.0 core onwards.
> 
> At Camel 2.2 we have support for Spring 3.0 which in fact makes
> camel-spring-javaconfig use Spring 3.0.0.RELEASE.
> 
> So upgrade to 2.2 and you should not have that old Spring JavaConfig
> dependency anymore.
> 
> 
> On Wed, Feb 17, 2010 at 5:29 AM, vcheruvu 
> wrote:
>>

Maven repository

2010-02-16 Thread vcheruvu

Hi,

We are using Archiva repository to locally store all the jars needed for
projects. Archiva can automatically download jars from
http://mvnrepository.com/  when there are jar files not found in the archiva
repo. So, I have tried to run camel:dot and we are unable to download
org.springframework.config.java with version 1.0.0-20090215 from archiva. 
The mvnrepository site only has 1.0.0-m3 version. Unfortunately i have come
to know that, camel-spring-javaconfig (2.1.0) is referencing to version
1.0.0-20090215. So, even if i use 1.0.0-m3, it won't resolve the issue. So,
i have manually added org.springframework.config.java/1.0.0-20090215 in my
local machine repository just to get it working. Then i moved on to next
problem where camel maven plugin  has transitive dependency to groupid =
org.springframework.context, version =2.5.6 but our archiva has groupid =
org.springframework and artifactid =spring-context ... I thought it would be
silly to add org.springframework.context groupid in archiva when  jar file
already exist in the groupid = org.springframework, artifactid=
spring-context. What is the standard for naming artifacts and groupid ? I am
finding it hard to deal with camel dependencies and run mvn camel:dot. Can
you please advise how i can resolve this issue? Any hints greatly
appreciated.

Regards,
-Vid-
-- 
View this message in context: 
http://old.nabble.com/Maven-repository-tp27618995p27618995.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: Performance - Camel JPA

2010-02-03 Thread vcheruvu

We needed near realtime to extract data from old table and persist in new
table in different database for downstream processing. So we are using camel
and java as solution to get something going for now. 

Yes using direct jdbc is ideal. However I still have to map rows to an
object. I thought i would be writing lousy mapping and make mistakes that
JPA contributors have experienced. So, Why re-invent the wheel, I am using
hibernate JPA (ORM) which use optimal and best practice to map each row's
fields to object field.  Loading 4 entities is not the issue. I came to
know that the issue is with  inserting transformed entity took too long.
This is because, in camel route  config  as shown below,



< to uri="bean:transformerBean?method=transformOrder"/>




Each entity that was loaded by jpaconsumer has been channeled to
transformation and persist transformed entity by jpaproducer. This is single
thread and waits for all 1000 to complete and then batch update commit are
made for old table to mark flag as committed. This is basically making
JPAConsumer to wait till all the  1000 Entity processing are completed and
then polls for next 1000 entities. Another issue is that I only used 1
database connection.   I thought I could increase the speed for inserting
new entity.


So I have split the original route, check below for modified version










 





I have also added c3p0 for database connection pool in persistence.xml

  
  
  
  
  

I only had to make config change and it significantly improved the
performance. I could complete 40,000 entities in less than 5 mins. So, per
second it can process 133 records.   I believe there is still room for
improvement.  Instead of using JPAProducer,  I should call store proc to
insert into new table. 


My conclusion, JPAConsumer and translation is fine, problem was with JPA
insert.


Claus Ibsen-2 wrote:
> 
> On Tue, Feb 2, 2010 at 6:30 AM, Kevin Jackson  wrote:
>> Hi,
>> [snip]
>>
>>> I have ensured that index are put in place for old table and new table.
>>> There is no need of second level cache in this scenario. I have used
>>> UUID to
>>> generate unique key when inserting new record. Yet this apps take 30
>>> mins
>>> for 40,000.
>>
>> Indexes on the new table are going to hurt your insert performance.
>> For large data loads, have you tried:
>> 1 - push data into a table with no ref integrity (a load table) and no
>> indexes
>> 2 - asynchronously (after all the data has been loaded into the load
>> table), call a stored procedure that copies the data from load to the
>> real table
>> 3 - after store proc has run, truncate the load table
>>
>> Kev
>>
> 
> Yeah I do not think JPA fits well with ETL kinda work.
> http://en.wikipedia.org/wiki/Extract,_transform,_load
> 
> There is a zillion other ways to load a lot of data into a database,
> and using an ORM will newer be very fast.
> 
> Try googling a bit with your database name and ETL etc. And/or talk to
> DB specialists in your organization.
> 
> If you need to do hand crafted SQL queries you may want to use Spring
> JDBC or iBatis etc. Sometimes its just easier to use Spring JDBC as
> its a little handy library.
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Performance---Camel-JPA-tp27412920p27446740.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Performance - Camel JPA

2010-02-01 Thread vcheruvu

I have written an application using camel-jpa to extract batch of 10,000
records from old table, transform each entity object(25 fields) to another
entity object(15 fields) and persist to new table using JpaProducer. I have
given 1Gb memory when starting the application. 

I have noticed it takes about good 30 mins to complete 40,000 records.
Basically, per second only 22 records are processed. I am assuming that it
should be much faster like process 60 records in a second. is that
reasonable suspicion that 22 records per second is slow? JPA insert(store
transformed entity object to new table) and  update(mark each row in old
table that it is processed) are taking too long. I have noticed camel
server(daemon that constantly gets update and persist to new table) gets
slower after 20,000 records. I am using batchprocessing where 10,000 records
will be committed in a batch. The transformation logic (used bean injection
for translation) doesn't take any time and can be considered that it takes
in microseconds to complete transformation.   

I have ensured that index are put in place for old table and new table.
There is no need of second level cache in this scenario. I have used UUID to
generate unique key when inserting new record. Yet this apps take 30 mins
for 40,000.  

I have looked at Hibernate JPA performance tuning perspective and applied
the changes as explained in second paragraph. Are there any optimization
that I could make in Camel? 


is there JDO component support in next Camel release?
-- 
View this message in context: 
http://old.nabble.com/Performance---Camel-JPA-tp27412920p27412920.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Re: @Consumed

2010-01-06 Thread vcheruvu

I have figured it out how to use @Consumed after reading the JpaConsumer
class in the camel source.


1) I have added processed field in the table with default 0, which will be
used to check if the record is processed or not.

2) added update method in the OldTableEntity and added @Consumed annotation.
See below

@Consumed
public void updateProcessedFlag(){
this.processed = 1;
}

3) made a change  in routebuilder class as shown below
from("jpa:com.test.entity.OldTableEntity?consumer.query=select x from
OldTableEntity x where
x.processed=0&consumeDelete=false&delay=3000&consumeLockEntity=false") 

That is the only change I had to make to make use of @Consumed annotation to
update the flag.


-- 
View this message in context: 
http://old.nabble.com/%40Consumed-tp27026797p27038384.html
Sent from the Camel - Users mailing list archive at Nabble.com.



@Consumed

2010-01-05 Thread vcheruvu

Hi Camel-Users,

Can anyone give any hints on using @Consumed annotation. I have written a
sample application where

1. Polling JPAConsumer endpoint gets new record
2. Message translation using Bean Integration to invoke the method.

3. Work in progress - I am trying to figure out how to use @Consumed to mark
that the row has been processed so it won't be queried again. Any hints or
guidance on using @Consumed will be greatly appreciated..
++ RouteBuilder +++
public class testRouter extends SpringRouteBuilder {
@Override
public void configure() throws Exception {
 // the following will dump the database to files
   
from("jpa:com.test.entity.OldTableEntity?consumeDelete=false&delay=3000&consumeLockEntity=false")
   .to("bean:testTransformerBean?method=checkIfLookupValueExist");
  

}
}


+Entity class 

@Entity
@Table(name = "test_table")
public class OldTableEntity {
@Column(name ="displayID")
private String displayID;
@Column(name ="userName")
private String userName;
@Column(name ="ordType")

...
getter and setters...
}

++
+ camel context 
http://www.springframework.org/schema/beans";
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
   xsi:schemaLocation="
   http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
   http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd";>

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


  

  

  

  

  

  

  

  

  


+++

Kind regards,
-Vid-
-- 
View this message in context: 
http://old.nabble.com/%40Consumed-tp27026797p27026797.html
Sent from the Camel - Users mailing list archive at Nabble.com.



Router logic

2010-01-04 Thread vcheruvu

Hi,

I am trying to figure out if Camel can be used to achieve below scenario

1 . Poll each row updates from tables , mark if row processing successful
other wise mark as unread or Error if processing failed. This row processing
is marked completed only if it has completed 1,2 ,3 and 4.
  
2. tranform message to new entity for persisting.

3. Verify if Entity value exist in Look up table 
 3a. If values doesn't exist, populate in xyz look up tables

4. write new Entity to new table
   
So, to achieve above scenario, i have written sample router logic using
camel JAVA DSL but i am unsure how step 3 and 3a will be written in my
configure method. Please see my code as shown below. Please correct me if I
am wrong. 

public void configure() throws Exception {
 // the following will dump the database to files
   
from("jpa:com.entity.oldTableEntity?consumeDelete=false&delay=3000&consumeLockEntity=false")
// JPA polling consumer to get updates ..How does it update oldTableEntity
that row has been processed?
.beanRef("TrasnformerCalss","translatemethod") //message tranlator
to map it to an newTableEntity
.to("direct:LookUpTableCheck") // check entity field values exist in
look up tables.. how to add logic for writing to lookup table ?? Will this
be JPAProducer endpoint  where  more java logic code added ?
.to("jpa:com.mbl.entity.newTableEntity"); //JPAProducer write to
table

}

Can you please provide me some guidance on how to achieve above scenario
using Camel? I have looked at the Examples  and uderstood basics of polling,
message translation , but it didn't cover much about 
scenarios such as questions raised in the sample code above. Thanks in
advance

Regards,
-Vid-

-- 
View this message in context: 
http://old.nabble.com/Router-logic-tp27024502p27024502.html
Sent from the Camel - Users mailing list archive at Nabble.com.