Re: [JBoss-dev] Register Synchronization while the Tx is marked for rollback
Not sure what you mean. That reference is purely about registering a subordinate synchronization with the original transaction coordinator. JBossTS does this already because it's an optional part of the OTS specification. You create and enlist the sub-synchronization with the root transaction when the context is imported and then when any local synchronizations are added, they register with the sub-synchronization. I mean if a JavaEE provider uses OTS to implement JTA you cannot map the above method directly onto OTS because the co-ordinator will raise TRANSACTION_ROLLBACK So remembering that the JTA is badly written (1.0.1 and 1.1), the intention in the registerInterposedSynchronization is that the transaction is active ("Other than the transaction context, no component J2EE context is active during either of the callbacks.") - has not been marked as rollback-only and is not terminating. Unfortunately there's no guarantee (hence the reference to the fact the spec is still badly written). This doesn't prevent it being mapped onto OTS at all: it just means that we have to throw a javax.transaction.SystemException that is vendor specific. The downside of having to invent our own exception is that it affects portability, but more importantly it ensures that the right information is conveyed to the application. What should really happen is that the spec. gets fixed! Actually, OTS has slightly weaker language: "TRANSACTION_ROLLEDBACK **may be** raised if the transaction has been marked rollback only." Yes, and unfortunately we didn't use RFC2119 to define terms like MAY and SHOULD, so it's even more lax than usual. However, all implementations I'm aware of would throw TRANSACTION_ROLLEDBACK (at least by default). Mark. --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ JBoss-Development mailing list JBoss-Development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] Register Synchronization while the Tx is marked for rollback
On Wed, 2006-04-26 at 15:03 +0100, Mark Little wrote: > > Adrian Brock wrote: > > I've closed the JTA issue: > > http://jira.jboss.com/jira/browse/JBAS-3155 > > > > AFAIK, this originally comes from the OTS spec. > > > > Synchronizations were standardised first in the OTS. Prior to that > everyone did it in a vendor-specific manner. > > > I guess the only way an OTS backed JTA impl > > could implement the new stuff: > > http://www.jcp.org/aboutJava/communityprocess/maintenance/jsr907/907-ChangeLog.html#registerInterposedSynchronization%28javax.transaction.Synchronization%29 > > > > Is for registerSynchronization() to directly invoke > > afterCompletion() if the transaction is not active. > > > > Strikes me that the user could do this themselves anyway!? > > > > Not sure what you mean. That reference is purely about registering a > subordinate synchronization with the original transaction coordinator. > JBossTS does this already because it's an optional part of the OTS > specification. You create and enlist the sub-synchronization with the > root transaction when the context is imported and then when any local > synchronizations are added, they register with the sub-synchronization. > I mean if a JavaEE provider uses OTS to implement JTA you cannot map the above method directly onto OTS because the co-ordinator will raise TRANSACTION_ROLLBACK Actually, OTS has slightly weaker language: "TRANSACTION_ROLLEDBACK **may be** raised if the transaction has been marked rollback only." > Mark. > > > > > On Wed, 2006-04-26 at 09:15 -0400, Emmanuel Bernard wrote: > > > >> A Seam use reported an isssue in the way Hibernate register a sync with > >> JBossTM (the old one at least). > >> I've described the issue in JIRA > >> http://jira.jboss.com/jira/browse/EJBTHREE-540 > >> > >> Please provide feedbacks on this one. We must fix that before JBoss AS > >> 4.0.4 / JBoss EJB3 / Hibernate EntityManager / Hibernate 3.2.0 get > >> released (before J1) > >> > >> This involves Mark, Steve, Bill and me > >> > >> > >> > >> > >> --- > >> Using Tomcat but need to do more? Need to support web services, security? > >> Get stuff done quickly with pre-integrated technology to make your job > >> easier > >> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > >> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > >> ___ > >> JBoss-Development mailing list > >> JBoss-Development@lists.sourceforge.net > >> https://lists.sourceforge.net/lists/listinfo/jboss-development > >> -- Adrian Brock Chief Scientist JBoss Inc. --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ JBoss-Development mailing list JBoss-Development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] Register Synchronization while the Tx is marked for rollback
Adrian Brock wrote: I've closed the JTA issue: http://jira.jboss.com/jira/browse/JBAS-3155 AFAIK, this originally comes from the OTS spec. Synchronizations were standardised first in the OTS. Prior to that everyone did it in a vendor-specific manner. I guess the only way an OTS backed JTA impl could implement the new stuff: http://www.jcp.org/aboutJava/communityprocess/maintenance/jsr907/907-ChangeLog.html#registerInterposedSynchronization%28javax.transaction.Synchronization%29 Is for registerSynchronization() to directly invoke afterCompletion() if the transaction is not active. Strikes me that the user could do this themselves anyway!? Not sure what you mean. That reference is purely about registering a subordinate synchronization with the original transaction coordinator. JBossTS does this already because it's an optional part of the OTS specification. You create and enlist the sub-synchronization with the root transaction when the context is imported and then when any local synchronizations are added, they register with the sub-synchronization. Mark. On Wed, 2006-04-26 at 09:15 -0400, Emmanuel Bernard wrote: A Seam use reported an isssue in the way Hibernate register a sync with JBossTM (the old one at least). I've described the issue in JIRA http://jira.jboss.com/jira/browse/EJBTHREE-540 Please provide feedbacks on this one. We must fix that before JBoss AS 4.0.4 / JBoss EJB3 / Hibernate EntityManager / Hibernate 3.2.0 get released (before J1) This involves Mark, Steve, Bill and me --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ JBoss-Development mailing list JBoss-Development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-development --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ JBoss-Development mailing list JBoss-Development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-development
Re: [JBoss-dev] Register Synchronization while the Tx is marked for rollback
I've closed the JTA issue: http://jira.jboss.com/jira/browse/JBAS-3155 AFAIK, this originally comes from the OTS spec. I guess the only way an OTS backed JTA impl could implement the new stuff: http://www.jcp.org/aboutJava/communityprocess/maintenance/jsr907/907-ChangeLog.html#registerInterposedSynchronization%28javax.transaction.Synchronization%29 Is for registerSynchronization() to directly invoke afterCompletion() if the transaction is not active. Strikes me that the user could do this themselves anyway!? On Wed, 2006-04-26 at 09:15 -0400, Emmanuel Bernard wrote: > A Seam use reported an isssue in the way Hibernate register a sync with > JBossTM (the old one at least). > I've described the issue in JIRA > http://jira.jboss.com/jira/browse/EJBTHREE-540 > > Please provide feedbacks on this one. We must fix that before JBoss AS > 4.0.4 / JBoss EJB3 / Hibernate EntityManager / Hibernate 3.2.0 get > released (before J1) > > This involves Mark, Steve, Bill and me > > > > > --- > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > ___ > JBoss-Development mailing list > JBoss-Development@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jboss-development -- Adrian Brock Chief Scientist JBoss Inc. --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ JBoss-Development mailing list JBoss-Development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-development
[JBoss-dev] Register Synchronization while the Tx is marked for rollback
A Seam use reported an isssue in the way Hibernate register a sync with JBossTM (the old one at least). I've described the issue in JIRA http://jira.jboss.com/jira/browse/EJBTHREE-540 Please provide feedbacks on this one. We must fix that before JBoss AS 4.0.4 / JBoss EJB3 / Hibernate EntityManager / Hibernate 3.2.0 get released (before J1) This involves Mark, Steve, Bill and me --- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ JBoss-Development mailing list JBoss-Development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-development