Hi,
I don't know If I'm wrong or not but I try to configure only
spring/hibernate with Geronimo Transaction Manager in Apache Felix Karaf but
it does not work. Here is the config.
1) Hibernate / Spring / Geronimo
A) Hibernate / Spring config
classpath*:META-INF/com
Right, but you must be prepared to have duplicate JMS messages if
something wrong happen between the time the data has been written to
the DB and the time the JMS message is acked.
On Fri, Jul 3, 2009 at 17:20, Claus Ibsen wrote:
> On Fri, Jul 3, 2009 at 4:44 PM, Charles Moulliard wrote:
>> If I u
For the moment, I don't generate/send a message in the route.
Nevertheless, like we do top of a classical ApplicationServer (WebSphere,
...), it should be interesting to use only one TransactionManager (like
Geronimo Tx) and not the one created by Spring for DB stuff, another for JMS
and so on. Th
On Fri, Jul 3, 2009 at 4:44 PM, Charles Moulliard wrote:
> If I use as TransactionManager
>
> org.springframework.orm.hibernate3.HibernateTransactionManager
>
> in DAO layer
> in Spring layer
> in Camel route
>
> instead of
>
> org.springframework.transaction.PlatformTransactionManager
>
> It works
If I use as TransactionManager
org.springframework.orm.hibernate3.HibernateTransactionManager
in DAO layer
in Spring layer
in Camel route
instead of
org.springframework.transaction.PlatformTransactionManager
It works. The transaction is well rollbacked ! yes yes yes yes
If you find a solu
Here is a snapshot of the configs used :
1) ActiveMQ
...
javax.jms.ConnectionFactory
It is certainly possible to do that. You need to configure the JMS
connection factory and the JDBC datasource so that they are aware of
the transaction manager.
How did you set up those resources ? They are the critical ones for using XA.
On Fri, Jul 3, 2009 at 16:14, Charles Moulliard wrote:
> O
OK. I will change my config to use a separate TransactionManager for DB
stuffs.
My idea was to use the same transaction manager (JTA) in the application for
JMS, DB, ... transactions but If this is not possible ...
Regards,
Charles Moulliard
Senior Enterprise Architect
Apache Camel Committer
**
On Fri, Jul 3, 2009 at 4:04 PM, Charles Moulliard wrote:
> No. In the route presented here I don't make 2 independant DB calls. Only
> one. The second bean called (generateError) only do a throw (without any
> Hibernate/DB call)
>
> By the way, in the example
> apache-camel-source\components\camel-
No. In the route presented here I don't make 2 independant DB calls. Only
one. The second bean called (generateError) only do a throw (without any
Hibernate/DB call)
By the way, in the example
apache-camel-source\components\camel-spring\src\test\java\org\apache\camel\spring\interceptor\Transaction
After verification, it appears that the message has not been redelivered.
So, only one record is created in the DB.
What I try to do is based on the camel test example :
apache-camel-source\components\camel-spring\src\test\java\org\apache\camel\spring\interceptor\TransactionalClientDataSourceTest.
On Fri, Jul 3, 2009 at 3:52 PM, Guillaume Nodet wrote:
> If the message is redelivered, this means there is a rollback.
> I guess the problem is that your DB is not enlisted in the transaction.
> However, if you don't want to use XA and two phase commit, you should
> try to perform the database ste
If the message is redelivered, this means there is a rollback.
I guess the problem is that your DB is not enlisted in the transaction.
However, if you don't want to use XA and two phase commit, you should
try to perform the database step as late as possible so that there is very few
chances that an
In debug we see more info :
*
1) Creation has been initiated by TransactionManager*
*15:31:52,484 | DEBUG | tenerContainer-2 | JtaTransactionManager
| stractPlatformTransactionManager 371 | Creating new transaction with name
[null]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT*
15:31:52,531 | DEBUG | 9:
I have created a small route without JMS stuff.
Here is the route :
file
OINP
On Fri, Jul 3, 2009 at 12:16 PM, Guillaume Nodet wrote:
> In this case, you should not use transactions for the DB at all, but
> if any error occurs while saving the data, an exception should be
> thrown and should rollback the transaction for the JMS layer.
Yeah that would be perfect unless he doe
In this case, you should not use transactions for the DB at all, but
if any error occurs while saving the data, an exception should be
thrown and should rollback the transaction for the JMS layer.
On Fri, Jul 3, 2009 at 10:48, Charles Moulliard wrote:
> Claus,
>
> I don't want at all to use XA tra
Claus,
I don't want at all to use XA transaction. Correct me if I'm wrong but the
example of the documentation (Camel 2.0 - JMS Sample - part Spring XML) does
not use at all a XA driver and the message will not be removed from the
queue if a rollback occurs in the bean MyProcessor ?
My concern is
And reconsider if you need XA at all. Its slow and hard to get setup.
Try to let the DB be the last stuff you do and afterwards send the
message to another queue for further processing in a 2nd route.
If that is possible in your use-case.
On Fri, Jul 3, 2009 at 10:25 AM, Claus Ibsen wrote:
> Hi
Hi
Get it working outside OSGi, eg in a small unit test thats easy to run
and test from within your IDE.
Google for JMS + hibernate + TX + XA to find some samples that work.
And since you use JMS + DB in the same TX you need to use XA db driver.
It can be a painful to get setup
http://coffeedriv
I'm still fighting against Spring config or Camel because Rollback does not
occur. I have been able to configure Hibernate to use the same
TransactionManager as the one used by JMS
Here is the different part of the config. I don't know where the issue could
be !
1) ActiveMQ
...
OK. I will try to create my own Hibernate JTATransaction manager as the
existing try to perform a JNDI lookup to find the transaction manager on
OSGI platform (inheritage from J2EE world)
http://mail-archives.apache.org/mod_mbox/servicemix-dev/200904.mbox/%3cb23ecedc0904020615y55df4d0fhb303a2ea22d
On Thu, Jul 2, 2009 at 4:53 PM, Charles Moulliard wrote:
> queueQuickFixInEndpoint is a JMS queue.
>
> I will add the ref to the transacted and retest
>
> Question : I suppose that rollback will not occur if by example JMS and DB
> (=Hibernate) does not use the same TransactionManager and don't use
queueQuickFixInEndpoint is a JMS queue.
I will add the ref to the transacted and retest
Question : I suppose that rollback will not occur if by example JMS and DB
(=Hibernate) does not use the same TransactionManager and don't use this
spring class together :
org.springframework.transaction.Platf
Transacted also have a ref attribute
Is queueQuickFixInEndpoint a JMS queue?
You need to use a TX manager that can do both JMS and DB.
On Thu, Jul 2, 2009 at 4:31 PM, Charles Moulliard wrote:
> I have been able to solve my problem by adding the following bean definition
> :
>
> class="org
I have been able to solve my problem by adding the following bean definition
:
and in the route
Unfortunately, the rollback does not occur in the
When I compare the example : JMSTransactionalClientRollbackTest.xml
http://camel.apache.org/schema/spring";>
Hi
Yeah you need to add all the spring transaction stuff.
On Thu, Jul 2, 2009 at 3:47 PM, Charles Moulliard wrote:
> Camel generates the following error with my route :
>
> Route
>
>
>
>
>
>
>
>
>
>
> It seem
Does not work too if I had
in the route
ka...@root:osgi> Exception in thread "SpringOsgiExtenderThread-32"
org.apache.camel.RuntimeCamelException: java.lang.IllegalArgumentException:
policy
must be specified on: Policy[ref: PROPAGATION_REQUIRED]
at
org.apache.camel.util.Obje
Camel generates the following error with my route :
Route
It seems that policy must be defined but in the example here it is not
mentioned : http://camel.apache.org/transactional-client.html
Error :
30 matches
Mail list logo