Hi Benjamin,
We had a lot of trouble upgrading to the latest Slide version in
conjunction with transactions, so we introduced the new getTxConnection
for this reason. I am not the specialist of this part though. The main
culprit is Slide, which has a very tedious transaction implementation,
and I think the solution might lie in getting the full thing to work in
a transactional-mode only.
In the meantime, we are hard at work on 4.5, which is using Hibernate
and Spring as framework technologies, allowing for easier transaction
integration. We still have to look at Slide transactions though.
I think it might be a good idea for you to file a bug on this. And any
help would be welcome of course.
Regards,
Serge Huber.
[EMAIL PROTECTED] wrote:
Hello!
We are running Jahia on an application server (JBoss) and have the
requirement to call EJBs within the engines via the EventListener.
These EJBs must run within the same transaction context, so that if an
exception occurs all database updates are rollbacked. We have solved
this in a standard way by using the UserTransaction-Object, which is
part of the JTA (Java Transaction API). In ConnectionDispenser we
began a user-transaction on the first getConnection in a thread, on
terminateConnection we issued a commit and on abortConnection a rollback.
We are using an Oracle database and got some lock-problems at the
beginning. We have solved them by implementing a
JahiaIncrementorsOracleDBService, which uses Oracle sequences instead
of the JAHIA_AUTOIDS table, and by using this IncrementorService for
all tables in Jahia (e.g. JAHIA_PAGES_DATA does not use the
incrementor service in Jahia).
Now we are in the process to migrate to Jahia 4.1, but have got major
problems with the latest ConnectionDispenser changes. Now you have a
getConnection() and a getTxConnection(), whereas the getConnection()
will also be transactional in case you configured db_transactions to
true.
Now you have two ThreadLocalConnectionInfo objects attached to the
thread. So two connections and transactions might be attached to the
same thread and when you call terminateConnection() you always simply
terminate both. We now have a problem with this as JTA
UserTransactions are not allowing two simultaneous transactions per
thread.
The commit() has also been removed from terminateConnection(), so I
ask myself, if Jahia 4.1 will work with db_transactions set to true.
When is the commit done now?
I just wanted to ask if you will stick with this implementation or if
you are going to change this bugs. This will help me decide, if I can
still use the simple UserTransactions API or or if I have to use the
more complex TransactionManager, but then I may even try to use the
Transaction Management offered by the Spring Framework.
Greetings,
Benjamin Papez