<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic handle transactions externally with hibernate in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/handle-transactions-externally-with-hibernate/m-p/129659#M91091</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using activiti within an existing application that uses Hibernate, with no JTA, transactions are handled "manually".&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to use activiti inside our own transactions so that a rollback would work at the same time on our custom code and on activiti.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have seen the transactionsExternallyManaged parameter in ProcessEngineConfiguration, but as I understand it, it seems to be only used for JTA.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there any way I could pass directly my hibernate transactions (or its underlying connection) to activiti?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Feb 2013 15:29:15 GMT</pubDate>
    <dc:creator>gguimezanes</dc:creator>
    <dc:date>2013-02-04T15:29:15Z</dc:date>
    <item>
      <title>handle transactions externally with hibernate</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/handle-transactions-externally-with-hibernate/m-p/129659#M91091</link>
      <description>Hello,I am using activiti within an existing application that uses Hibernate, with no JTA, transactions are handled "manually".I would like to use activiti inside our own transactions so that a rollback would work at the same time on our custom code and on activiti.I have seen the transactionsExtern</description>
      <pubDate>Mon, 04 Feb 2013 15:29:15 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/handle-transactions-externally-with-hibernate/m-p/129659#M91091</guid>
      <dc:creator>gguimezanes</dc:creator>
      <dc:date>2013-02-04T15:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: handle transactions externally with hibernate</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/handle-transactions-externally-with-hibernate/m-p/129660#M91092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you are using Spring, it makes things easier as you can just pass the transactionmanager to the process engine configuration.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The transactionsExternallyManaged is actually used to determine which transaction factory is used in Ibatis. So my guess it would work, however, I haven't tested it yet with Hibernate alone.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Feb 2013 12:20:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/handle-transactions-externally-with-hibernate/m-p/129660#M91092</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2013-02-05T12:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: handle transactions externally with hibernate</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/handle-transactions-externally-with-hibernate/m-p/129661#M91093</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The problem is, we don't use Spring. We don't have a TransactionManager, we directly use the hibernate session. That's why I was wondering if we could pass directly the java.sql.Connection to activiti…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2013 08:40:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/handle-transactions-externally-with-hibernate/m-p/129661#M91093</guid>
      <dc:creator>gguimezanes</dc:creator>
      <dc:date>2013-02-06T08:40:19Z</dc:date>
    </item>
    <item>
      <title>Re: handle transactions externally with hibernate</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/handle-transactions-externally-with-hibernate/m-p/129662#M91094</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Activiti uses a datasource for fetching SQL-connections. If you have a datasource (or proxy) that is aware of the hibernate-transaction and always returns the SQL-connection active in the hibernate-context, this can work perfectly, in combination with the "transactions managed externally".&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2013 09:16:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/handle-transactions-externally-with-hibernate/m-p/129662#M91094</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2013-02-06T09:16:29Z</dc:date>
    </item>
    <item>
      <title>Re: handle transactions externally with hibernate</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/handle-transactions-externally-with-hibernate/m-p/129663#M91095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've tried and achieved sometinhg similar, but can't and won't share the code… Why: if you want integration of frameworks, use the existing solutions for that, a transactionmanager. Waaaaay reasier, portable etc…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Feb 2013 18:04:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/handle-transactions-externally-with-hibernate/m-p/129663#M91095</guid>
      <dc:creator>ronald_van_kuij</dc:creator>
      <dc:date>2013-02-06T18:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: handle transactions externally with hibernate</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/handle-transactions-externally-with-hibernate/m-p/129664#M91096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In fact just using a custom datasource wasn't enough. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The solution that worked for us :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- create a Datasource that always gives the connection of our current hibernate session&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- create an engine configuration that overrides initDataSource and initDatabaseType&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- set transactionExternallyManaged to true&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- create our own TransactionContext that does neither commit nor rollback (but tells our system that the transaction is not committable when the method rollback is called)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- add "closeConnection" =&amp;nbsp; "false" to the properties of the transaction factory&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps if someone else has the same need…&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 Feb 2013 09:14:20 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/handle-transactions-externally-with-hibernate/m-p/129664#M91096</guid>
      <dc:creator>gguimezanes</dc:creator>
      <dc:date>2013-02-07T09:14:20Z</dc:date>
    </item>
    <item>
      <title>Re: handle transactions externally with hibernate</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/handle-transactions-externally-with-hibernate/m-p/129665#M91097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Cool isn't it, these details… Soooo much simpeler than just using a JEE server with a normal TM&amp;nbsp; &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://connect.hyland.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2013 20:16:55 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/handle-transactions-externally-with-hibernate/m-p/129665#M91097</guid>
      <dc:creator>ronald_van_kuij</dc:creator>
      <dc:date>2013-02-08T20:16:55Z</dc:date>
    </item>
  </channel>
</rss>

