We are running Jahia in JBoss and we develop our own add-ons. In a previous thread (http://www.mail-archive.com/[EMAIL PROTECTED]/msg00238.html) I asked a question about running the Jahia AddContainer database statements and our custom database access (via EJBs and Hibernate called from a Jahia EventListener) under one single transaction. I have got no answer to that question, but I continued to make some changes in our local Jahia on my own.

I saw that you support JDBC transactions, which can be configured with db_transactions in jahia.properties. Instead of the JDBC transactions I introduced using JTA UserTransactions in Jahia. In the ConnectionDispenser I added some code to get the UserTransaction object from JNDI and then begin the transaction before getting a datasource connection in getConnection(). In abortConnection() I do a rollback and in terminateConenction() I do a commit on that transaction. This way the transaction is considered when calling EJBs and all can run under one transaction and it looks like it works.

I just wanted to know if there are some reasons, why db_transactions is set to "false" on default? Do you know of any problems in Jahia, if transactions are switched ON? Would it be possible to add JTA support to Jahia officially instead or in addition to the JDBC transactions (I made it configurable in our solution)?

Does this requirement play into the domain of the Workflow Engine from Codeva and will they provide a solution to integrate custom business methods in  AddContainer all running under one transaction?

Greetings,
Benjamin Papez

Reply via email to