transactions icon indicating copy to clipboard operation
transactions copied to clipboard

Add timeout attribute to the javax.transaction.Transactional annotation

Open glassfishrobot opened this issue 8 years ago • 8 comments

Add additional method to the @Transactional annotation to set the TX timeout:

public @interface Transactional

{ (...) long timeout(); TimeUnit unit() default TimeUnit.MILLISECONDS; }

glassfishrobot avatar Feb 25 '16 15:02 glassfishrobot

  • Issue Imported From: https://github.com/javaee/jta-spec/issues/13
  • Original Issue Raised By:@glassfishrobot
  • Original Issue Assigned To: @glassfishrobot

glassfishrobot avatar Aug 29 '19 16:08 glassfishrobot

@glassfishrobot Commented Reported by abien

glassfishrobot avatar Feb 25 '16 15:02 glassfishrobot

@glassfishrobot Commented lprimak said: Timeout should have default value as not to break compatibility with current applications Also, the timeout specified above should be overridable by XML as it stands now

glassfishrobot avatar Feb 25 '16 21:02 glassfishrobot

@glassfishrobot Commented abien said: The question is: should we prescribe a default TX timeout, or should it be "unspecified" => a proprietary application-server configuration

glassfishrobot avatar Feb 28 '16 09:02 glassfishrobot

@glassfishrobot Commented lprimak said: I'd say unspecified to preserve more like how the configuration is done now

glassfishrobot avatar Feb 28 '16 18:02 glassfishrobot

@glassfishrobot Commented paul_parkinson said: Yes, this conversation has been had before actually and the resolution (right or wrong) was to leave it unspecified.

Also, we've had the conversation over being able to specify transaction timeout in UserTransaction/TransactionManager.begin which would be the API equivalent to this annotation support. When discussing this, we also went down the path of being able to provide arbitrary values to begin, i.e. a begin(Map properties) API addition and so we should consider all of this when designing the annotation enhancement.

glassfishrobot avatar Mar 01 '16 02:03 glassfishrobot

@glassfishrobot Commented Was assigned to paul_parkinson

glassfishrobot avatar Feb 25 '16 15:02 glassfishrobot

@glassfishrobot Commented This issue was imported from java.net JIRA JTA_SPEC-13

glassfishrobot avatar Apr 25 '17 05:04 glassfishrobot