Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jta-dev] EE9 Blocker? Java EE 7 (JTA 1.1 -> JTA 1.2) seems to have lost some information, do we need/want to do something for EE9?

Hi Lance and Tom,

Yes, I see what happened.
In 1.1 the following 3 mods were added to the spec but not to the javadoc…
  • Interfacejavax.transaction.UserTransaction,methodsetTransactionTimeout, replace the first paragraph of the description with "Modify the timeout value that is associated with transactions started by subsequent invocations of the begin method by the current thread.".

  • Interfacejavax.transaction.TransactionManager,method setTransactionTimeout, replace the first paragraph of the description with "Modify the timeout value that is associated with transactions started by subsequent invocations of the begin method by the current thread.".

  • Interfacejavax.transaction.Synchronization,methodbeforeCompletion,add the following description: "An unchecked exception thrown by a registered Synchronization object causes the transaction to be aborted. That is, upon encountering an unchecked exception thrown by a registered synchronization object, the transaction manager must mark the transaction for rollback.". 

The first two pertain to the same subject and the last is the one being cited. 

Indeed the idea in 1.2 was to reduce redundancy and get the javadoc out of the spec and unfortunately since the javadoc wasn’t synced with the spec in 1.1 these items were lost.
That is a shame, and a good catch on Tom’s part, but since the differences are quite minimal and really just clarifications on implicitly known behaviors I do believe the behavior is defined and there is no need for any changes.

Just to elaborate a bit
The first two deal with making it clear that a change in tx timeout affects future txs only and not those in situ /in-flight.  This is true of all implementations.  The existing javadoc states “Modify the timeout value that is associated with transactions started by the current thread with the begin method. . I think we are safe here.
The third/cited case is covered by the fact that the existing javadoc states “This call is executed with the transaction context of the transaction that is being committed. and therefore implicitly any unchecked exception would result in marking for rollback.  (Technically it should’ve read “thrown by a registered Synchronization’s beforeCompletion method” instead of “thrown by a registered Synchronization” anyway as that is not true for afterCompletion)

Regards,
Paul

On Oct 2, 2020, at 7:27 AM, Lance Andersen <lance.andersen@xxxxxxxxxx> wrote:



On Oct 2, 2020, at 5:25 AM, Tom Jenkinson <tom.jenkinson@xxxxxxxxxx> wrote:

When I look at JTA 1.1 specification [1] I can see that it included a chapter describing the API in depth (sort of like API documentation). When I look at JTA 1.2 specification I see that that chapter is not present. I assume this was intended to be migrated to the Javadocs for that release.

However, in the change log for Jakarta Transactions 2.0 I can see [2]:

"
An unchecked
exception thrown by a registered `Synchronization` object causes the
transaction to be aborted. That is, upon encountering an unchecked
exception thrown by a registered synchronization object, the
transaction manager must mark the transaction for rollback.
"

From what I can see, that information is not in Jakarta Transactions 2.0 Javadocs or elsewhere in the current Jakarta Transactions 2.0 (spec, Javadocs or TCK). I also don't see it on the Java EE 7 Javadocs on the Oracle site either [3], but it was present in Java EE 6 within the JTA 1.1 specification text.

Some questions:

1.a. As it is mentioned in the change log (albeit, only there) do you think that particular behaviour can still be considered defined for Jakarta Transactions 2.0?
   1.b. If not, what do you think we should do?
2.a. Do you think we need to try to work out if there was any other Transactions information that didn't move to Java EE 7 (and 8 and then Jakarta 8 and now 9) and correct it?
   2.b. If so, must that be done for EE 9?

Paul Parkinson was the spec lead at the time.   Perhaps he remembers the reasoning.



Best
Lance
------------------

<oracle_sig_logo.gif>


Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037
Oracle Java Engineering 
1 Network Drive 
Burlington, MA 01803
Lance.Andersen@xxxxxxxxxx






Back to the top