jsr236-experts@concurrency-ee-spec.java.net

[jsr236-experts] Re: Final Release candidate for review

From: Anthony Lai <anthony.lai_at_oracle.com>
Date: Thu, 28 Mar 2013 17:06:19 -0700

Thanks again for the feedback!

For section 3.3.5, how about updating the paragraphs from:

> Contextual dynamic proxies support user-managed global transaction
> demarcation using the javax.transaction.UserTransaction interface,
> which is described in the Java Transaction API specification. Proxy
> methods suspend any transactional context on the thread and allow
> components to manually control global transaction demarcation
> boundaries. Context objects may optionally begin, commit, and rollback
> a transaction. See EE.4 for details on transaction management in Java EE.
>
> Transaction management can be disabled on the proxy instance using a
> context property (see the Javadoc for the
> javax.enterprise.concurrent.ContextServiceinterface for details and
> examples). When disabled, the transaction (if any) currently in
> progress on the thread (for example, the transaction that the
> container is managing) will not be suspended and any resources used by
> the task will be enlisted.
>
to:

> Contextual dynamic proxies support user-managed global transaction
> demarcation using the javax.transaction.UserTransaction interface,
> which is described in the Java Transaction API specification. By
> default, proxy methods suspend any transactional context on the thread
> and allow components to manually control global transaction
> demarcation boundaries. Context objects may optionally begin, commit,
> and rollback a transaction. See EE.4 for details on transaction
> management in Java EE.
>
> By using an execution property when creating the contextual proxy
> object , application components can choose to not suspend the
> transactional context on the thread, and any resources used by the
> task will be enlisted to that transaction. Refer to the Javadoc for
> the javax.enterprise.concurrent.ContextServiceinterface for details
> and examples.
>
Regarding the paragraph:

> "Task instances are run outside of the scope of the transaction of the
> submitting thread. Any transaction active in the executing thread will be
> suspended."
I did not mention USE_TRANSACTION_OF_EXECUTION_THREAD execution property
in this paragraph because the paragraph is added to sections for MES,
MSES, and MTF. Tasks are typically run on a thread that does not have
preexisting transaction context, so the execution property does not
apply there.

The javadoc for USE_TRANSACTION_OF_EXECUTION_THREAD says:
> The contextual proxy object method will run within the transaction (if
> any) of the execution thread. A|UserTransaction|
> <http://download.oracle.com/javase/6/docs/api/javax/transaction/UserTransaction.html?is-external=true>will
> only be available if it is also available in the execution thread (for
> example, when the proxy method is invoked from a Servlet or Bean
> Managed Transaction EJB). When there is no existing transaction on the
> execution thread, such as when running tasks that are submitted to
> a|ManagedExecutorService|
> <http://concurrency-ee-spec.java.net/javadoc/javax/enterprise/concurrent/ManagedExecutorService.html>or
> a|ManagedScheduledExecutorService|
> <http://concurrency-ee-spec.java.net/javadoc/javax/enterprise/concurrent/ManagedScheduledExecutorService.html>,
> a|UserTransaction|
> <http://download.oracle.com/javase/6/docs/api/javax/transaction/UserTransaction.html?is-external=true>will
> be available.
If you have ideas on how to rewrite the paragraph, please let me know.

Regards
Anthony

On 3/28/13 12:32 PM, Frederick W Rowe wrote:
> The changes look good with the following exceptions:
>
> In section:
> 3.3.5 Transaction Management
> ...
>
> Transaction management can be disabled on the proxy instance
> ...
>
> isn't correct, you can't disable mgmt using an execution property, only
> control suspension.
>
> Similarly, the update you made that states:
>
> "Task instances are run outside of the scope of the transaction of the
> submitting thread. Any transaction active in the executing thread will be
> suspended."
>
> is only true if they haven't supplied the execution property for
> USE_TRANSACTION_OF_EXECUTION_THREAD
>
>
> Regards,
>
> Fred Rowe
>
> WebSphere Architect
> Senior Software Engineer
> IBM Software Group
> frowe_at_us.ibm.com
>
>
>
> From: Anthony Lai <anthony.lai_at_oracle.com>
> To: jsr236-experts_at_concurrency-ee-spec.java.net
> Date: 03/27/2013 01:08 PM
> Subject: [jsr236-experts] Final Release candidate for review
>
>
>
> Dear experts,
>
> I have incorporated the comments we have received since the Proposed
> Final Draft.
>
> The latest spec document with changes since PFD marked can be found at:
> http://java.net/projects/concurrency-ee-spec/downloads/download/EE%20Concurrency%20Utilities_2013-03-26-delta.pdf
>
>
> The changes to the spec document are minor. Here is a summary of the
> changes:
> - Clarified types of context to be propagated are “from a
> contextualizing application component” in sections 2.3, 3.1.4.3,
> 3.2.4.3, 3.3.4.3, and 3.4.4.3.
> - Removed reference to “task can be run in a remote process” in sections
> 3.1.1 and 3.2.1
> - Fixed and simplified example code in sections 3.1.1.1.7 and 3.1.1.1.8
> - Removed requirement that a Java EE Product Provider need to detect the
> case where a task instance fails to complete a transaction when using
> the provided UserTransaction instance.
> - Clarified that tasks are run in different transaction than the
> submitting thread, and any transaction active in the executing thread
> are by default suspended.
>
> The latest javadoc zip file can be found at:
> http://java.net/projects/concurrency-ee-spec/downloads/download/javax.enterprise.concurrent-api-1.0-b06-javadoc.jar
>
>
> Javadoc at http://concurrency-ee-spec.java.net/javadoc/ has also been
> updated.
>
> Changes in javadoc since PFD can be found at:
> http://java.net/projects/concurrency-ee-spec/downloads/download/javadoc-changes-pfd-frd.jar
>
>
> Please send any feedback to the
> jsr236-experts_at_concurrency-ee-spec.java.net mailing list. Readers not on
> the expert group can send feedback to users_at_concurrency-ee-spec.java.net
> mailing list. If nobody objects, we are planning to submit the Final
> Release to the JCP in the middle of next week.
>
> Regards
> Anthony
>
>
>