Sunday, July 6, 2008

dectxn now on github

http://github.com/soulware/dectxn

Friday, May 9, 2008

dectxn rdoc api now online

The dectxn rdoc api is now available online.

Transaction Suspension in Spring

The article "Implementing Transaction Suspension in Spring" is available at the following link.

Thursday, May 8, 2008

simple_services

There's another Rails plugin out there doing something pretty similar to dectxn, with a greater emphasis on "convention over configuration" - simple_services. simple_services provides a base class Service::Base and all methods in all subclasses will be automatically wrapped in a transaction (with an effective propagation attribute of required).

How would something like this be done in dectxn?

Txn::required :for_type => Service::Base, :calls_to => :all_methods

EJB 2.x transaction attributes

dectxn is heavily influenced by the declarative style of transaction management in the Java world. See these links for information on transaction attributes in EJB 2.x and how to specify them.
  • TX_BEAN_MANAGED
  • TX_MANDATORY
  • TX_NOT_SUPPORTED
  • TX_REQUIRED
  • TX_REQUIRES_NEW
  • TX_SUPPORTS

Txn::requires_new

In the Java EE world the RequiresNew transaction attribute is defined as starting a new transaction after suspending any existing transaction. Transaction suspension is handled by the app server and support for this is app server specific.

The default Spring JtaTransactionManager does not support PROPAGATION_REQUIRES_NEW. Transaction suspension support is app server specific (no standard JNDI location for the JTA transaction manager). See here for further information on transaction suspension in Spring. Spring will by default throw an exception if a PROPAGATION_REQUIRES_NEW method is called from within an existing active tranaction.

dectxn Txn::requires_new follows the default Spring approach by raising a Txn::RequiresNewException if called from within an existing active transaction. If called with no active transaction it behaves as for Txn::required.

Wednesday, May 7, 2008

google analytics

Google analytics are now being collected for both the dectxn homepage and this blog. Wondering if its possible to embed the google analytics javascript in the generated rdoc. Not sure if accessing local rdoc page views would be recorded.