Ticket #1086 (closed defect: fixed)

Opened 19 months ago

Last modified 17 months ago

TransactionInterceptor should analyse @Transactional annotation instead of requiring TransactionAware interface.

Reported by: dragisak Owned by: dragisak
Priority: unassigned Milestone:
Component: ambra Version: 0.9.1-SNAPSHOT
Keywords: Cc:

Description (last modified by amit) (diff)

It would be better for TransactionInterceptor to read the @Transactional annotations instead of using a marker interface, both because annotations are more powerful (including having parameters), because marker interfaces were a crutch before annotations were added to java, and because this allows us to reuse the @Transactional annotations already there everywhere in a transparent manner. It also allows different transactional requirements for different methods in an Action.

In this case this opens up the possibility of using the transaction-interceptor for everything, as that way we'd get the (more desireable, IMO) behaviour of a single transaction spawning both the request and response processing (though really no db operations should be performed during response processing).

Change History

Changed 19 months ago by amit

  • description modified (diff)
  • summary changed from Handle nested read-write transactions in TransactionInterceptor to TransactionInterceptor should analyse @Transactional annotation instead of requiring TransactionAware interface.

Changed the summary and description based on Ronald's email to the list.

Changed 19 months ago by amit

r7093 addresses this, but is being modified further.

Changed 19 months ago by dragisak

r7106 addresses this ticket.

Changed 19 months ago by amit

  • milestone set to 0.9.1

I was updating this when Dragisa did his checkin, so this is after the fact...:)

Dragisa, Ronald, and Pradeep discussed this in a separate skype thread and decided that having an annotation on the @Transactional annotation is a much better solution to define the span of the transaction. This will not require defining a new annotation and allows the interceptor to re-use the capabilities already defined.

So the basic idea maps to:

@Span(@Transacational(....))

Please see r7106 for details of the implementation.

Changed 19 months ago by amit

  • status changed from new to closed
  • resolution set to fixed

Changed 17 months ago by anonymous

  • milestone 0.9.1 deleted

Milestone 0.9.1 deleted

Note: See TracTickets for help on using tickets.