-
1. Re: One unique data instance
jorgemoralespou_2 Feb 5, 2015 8:51 AM (in response to angelo.rlcosta)In the message body or context headers. How are you reading from the DB? Usually this will get the data into the message body.
-
2. Re: One unique data instance
igarashitm Feb 5, 2015 8:52 AM (in response to angelo.rlcosta)Why don't you just run a camel route directly from the scheduler every time you get data from DB? Once you put it somewhere outside of transaction, the data consistency would be lost.
-
3. Re: One unique data instance
angelo.rlcosta Feb 5, 2015 10:04 AM (in response to igarashitm)Hello,
As per jmorales he says that "as a request is synchronous, the data that you read from the DB gets lost, no matter what you use (context, body) after you have processed that request"Sounds like i must use cache. Was checking in infinispan and was trying to add was tring to add <to uri="infinispan://localhost?cacheContainer=#cacheContainer&caseName=orders"/> to my route but i got the bellow exception:
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: infinispan://localhost?cacheContainer=%23cacheContainer&caseName=orders due to: No component found with scheme: infinispan
Any idea what is missing?
Thanks,
-
4. Re: One unique data instance
igarashitm Feb 5, 2015 10:07 AM (in response to angelo.rlcosta)camel-infinispan is not directly supported in SwitchYard. You need to create the extension by yourself.
-
5. Re: One unique data instance
angelo.rlcosta Feb 5, 2015 10:37 AM (in response to igarashitm)Oh ok. Thanks for the input Tomohisa!
Any idea on when it will be fully supported?
What other cache alternatives do i have?
-
6. Re: One unique data instance
jorgemoralespou_2 Feb 5, 2015 10:41 AM (in response to angelo.rlcosta)Angelo,
as I mentioned in the irc, you can use Infinispan in Java (in a Java component) or a Java processor (in a camel component) if the infinispan camel component gets complicated to you. It should be very simple to create, and you should find some examples on how to use Infinispan from java in a EE world.
Cheers,
-
7. Re: One unique data instance
igarashitm Feb 5, 2015 10:53 AM (in response to angelo.rlcosta)Unfortunately we don't have a plan to support camel-infinispan right now. AFAIK JBoss Fuse doesn't yet support camel-infinispan as well. If you have a subscription for FSW, you may want to file a feature request through the customer support. But IMO still infinispan is a first option for on-memory cache as its jar is already in the distribution.