[hibernate-dev] afterTransactionCompletion(status) in JtaTransaction
Hi all, I'm puzzled about the implementation we have in org.hibernate.engine.transaction.internal.jta.JtaTransaction regarding after-transaction completion handling. Looking at the two methods: afterAfterCompletion(); <-- note the "After - After" prefix afterTransactionCompletion(int status); The implementation of afterTransactionCompletion(int status) is a no-op, while after-after-completion actually invokes the transactionCoordinator().afterTransaction( this, userTransaction.getStatus() ); Shouldn't this be invoked in the afterTransactionCompletion(status) method? As I just noticed in some OGM tests, during the after-after phase it's too late to invoke the getStatus() on the transaction as this will have been cleaned up already: that's why the afterTransactionCompletion(int) has a status parameter, as the status argument should be used rather than attempting to lookup the transaction state again. OGM is having it's own AbstractTransactionImpl implementation; changing it by moving the afterTransaction call in the appropriate method fixed my problems to our Search integration. This looks like a change that should be picked up by ORM's JtaTransaction too? I'm not familiar with this, so I might be totally wrong but in case I would love to understand why. Cheers, Sanne ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] afterTransactionCompletion(status) in JtaTransaction
afterAfterTransaction is simply a part of the afterTransaction process. afterTransaction is split into a number of steps, afterAfterTransaction simply being the last step in that process. On 07/18/2012 05:15 AM, Sanne Grinovero wrote: > Hi all, > I'm puzzled about the implementation we have in > org.hibernate.engine.transaction.internal.jta.JtaTransaction > > regarding after-transaction completion handling. > > Looking at the two methods: > afterAfterCompletion(); <-- note the "After - After" prefix > afterTransactionCompletion(int status); > > > The implementation of afterTransactionCompletion(int status) is a > no-op, while after-after-completion actually invokes the > transactionCoordinator().afterTransaction( this, > userTransaction.getStatus() ); > Shouldn't this be invoked in the afterTransactionCompletion(status) method? > > As I just noticed in some OGM tests, during the after-after phase it's > too late to invoke the getStatus() on the transaction as this will > have been cleaned up already: that's why the > afterTransactionCompletion(int) has a status parameter, as the status > argument should be used rather than attempting to lookup the > transaction state again. > > OGM is having it's own AbstractTransactionImpl implementation; > changing it by moving the afterTransaction call in the appropriate > method fixed my problems to our Search integration. > > This looks like a change that should be picked up by ORM's > JtaTransaction too? I'm not familiar with this, so I might be totally > wrong but in case I would love to understand why. > > Cheers, > Sanne > ___ > hibernate-dev mailing list > hibernate-dev@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/hibernate-dev > -- st...@hibernate.org http://hibernate.org ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] afterTransactionCompletion(status) in JtaTransaction
Hi Steve, thanks for the clarification. Wouldn't it make sense then to add the "int status" as an argument to afterAfterTransaction as well? As it seems some code looks for this by invoking tx.getStatus() in implementations of this method, but that seems unsafe as I've found cases in which this gets the wrong status code at that point. Sanne On 18 July 2012 16:19, Steve Ebersole wrote: > afterAfterTransaction is simply a part of the afterTransaction process. > afterTransaction is split into a number of steps, afterAfterTransaction > simply being the last step in that process. > > > > On Wed 18 Jul 2012 05:15:20 AM CDT, Sanne Grinovero wrote: >> >> Hi all, >> I'm puzzled about the implementation we have in >> org.hibernate.engine.transaction.internal.jta.JtaTransaction >> >> regarding after-transaction completion handling. >> >> Looking at the two methods: >> afterAfterCompletion(); <-- note the "After - After" prefix >> afterTransactionCompletion(int status); >> >> >> The implementation of afterTransactionCompletion(int status) is a >> no-op, while after-after-completion actually invokes the >> transactionCoordinator().afterTransaction( this, >> userTransaction.getStatus() ); >> Shouldn't this be invoked in the afterTransactionCompletion(status) >> method? >> >> As I just noticed in some OGM tests, during the after-after phase it's >> too late to invoke the getStatus() on the transaction as this will >> have been cleaned up already: that's why the >> afterTransactionCompletion(int) has a status parameter, as the status >> argument should be used rather than attempting to lookup the >> transaction state again. >> >> OGM is having it's own AbstractTransactionImpl implementation; >> changing it by moving the afterTransaction call in the appropriate >> method fixed my problems to our Search integration. >> >> This looks like a change that should be picked up by ORM's >> JtaTransaction too? I'm not familiar with this, so I might be totally >> wrong but in case I would love to understand why. >> >> Cheers, >> Sanne >> ___ >> hibernate-dev mailing list >> hibernate-dev@lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/hibernate-dev ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
[hibernate-dev] SourceForge project
Not sure if y'all are tracking what is going on at SourceForge. They have done a redesign of the site using a new hosting software they developed called Allura. We will need to upgrade to use Allura at some point. The upgrade has a few ramifications that I wanted to give everyone some time to handle. First is our hosted MediaWiki instance. As far as I know, I am the only one that uses that, so I don't think this affects anyone other than me. In fact all hosted apps will be getting decommissioned. We only have MediaWiki, WordPress and dotProject enabled to date. To the best of my knowledge, only MediaWiki ever got used. Source Code. We still have the original CVS repo accessible for read. As I understand it, that will remain true and use the same urls. We moved directly from SF CVS to JBoss SVN, so no SF SVN to worry about that I know of. For Git, we did create some Git repos. Those will be inaccessible after the upgrade; so if there is anything y'all want in any of those Git repos, you should pull/clone it. Let me know. I do not know of any other ramifications. Let me know if you think of others that need to be addresses. If you are unfamiliar and want to see what Allura offers, here is the link: http://sourceforge.net/p/allura/wiki/Features/ -- st...@hibernate.org http://hibernate.org ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] afterTransactionCompletion(status) in JtaTransaction
I don't see an issue with changing that signature. On 07/18/2012 10:27 AM, Sanne Grinovero wrote: > Hi Steve, > thanks for the clarification. > > Wouldn't it make sense then to add the "int status" as an argument to > afterAfterTransaction as well? As it seems some code looks for this by > invoking tx.getStatus() in implementations of this method, but that > seems unsafe as I've found cases in which this gets the wrong status > code at that point. > > Sanne > > On 18 July 2012 16:19, Steve Ebersole wrote: >> afterAfterTransaction is simply a part of the afterTransaction process. >> afterTransaction is split into a number of steps, afterAfterTransaction >> simply being the last step in that process. >> >> >> >> On Wed 18 Jul 2012 05:15:20 AM CDT, Sanne Grinovero wrote: >>> Hi all, >>> I'm puzzled about the implementation we have in >>> org.hibernate.engine.transaction.internal.jta.JtaTransaction >>> >>> regarding after-transaction completion handling. >>> >>> Looking at the two methods: >>> afterAfterCompletion(); <-- note the "After - After" prefix >>> afterTransactionCompletion(int status); >>> >>> >>> The implementation of afterTransactionCompletion(int status) is a >>> no-op, while after-after-completion actually invokes the >>> transactionCoordinator().afterTransaction( this, >>> userTransaction.getStatus() ); >>> Shouldn't this be invoked in the afterTransactionCompletion(status) >>> method? >>> >>> As I just noticed in some OGM tests, during the after-after phase it's >>> too late to invoke the getStatus() on the transaction as this will >>> have been cleaned up already: that's why the >>> afterTransactionCompletion(int) has a status parameter, as the status >>> argument should be used rather than attempting to lookup the >>> transaction state again. >>> >>> OGM is having it's own AbstractTransactionImpl implementation; >>> changing it by moving the afterTransaction call in the appropriate >>> method fixed my problems to our Search integration. >>> >>> This looks like a change that should be picked up by ORM's >>> JtaTransaction too? I'm not familiar with this, so I might be totally >>> wrong but in case I would love to understand why. >>> >>> Cheers, >>> Sanne >>> ___ >>> hibernate-dev mailing list >>> hibernate-dev@lists.jboss.org >>> https://lists.jboss.org/mailman/listinfo/hibernate-dev -- st...@hibernate.org http://hibernate.org ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] merge master into metamodel branch, again :)
(1) and (2) are done. Tomorrow I will work on (3). On Tue 17 Jul 2012 03:16:46 AM CDT, Hardy Ferentschik wrote: > > On Jul 16, 2012, at 9:38 PM, Steve Ebersole wrote: > >> Thinking we should consider: >> 1) branching 4.1 >> 2) integrating my JPA 2.1 work onto master >> 3) merge master (with JPA 2.1) to metamodel branch > > +1 > -- st...@hibernate.org http://hibernate.org ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev