org.beanlet.transaction
Annotation Type TransactionAttribute


@Retention(value=RUNTIME)
@Target(value={METHOD,TYPE})
public @interface TransactionAttribute

When applied at the TYPE-level, designates the default transaction attribute for all business methods of the beanlet. When applied at the method-level, designates the transaction attribute for only that method.

XML Representation

The following xml-fragment shows how to express this annotation in xml. The 'transaction-attribute' tag does not specify any element attribute, which means that this tag is applied to the beanlet's class. The attributes can be specified optionally if the annotation specifies a default value for the particular annotation methods.
<beanlets xmlns="http://beanlet.org/schema/beanlet"
          xmlns:tx="http://beanlet.org/schema/transaction"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://beanlet.org/schema/beanlet http://beanlet.org/schema/beanlet/beanlet_1_0.xsd
                              http://beanlet.org/schema/transaction http://beanlet.org/schema/transaction/beanlet_transaction_1_0.xsd">
  <beanlet name="foo" type="com.acme.Foo">
    <tx:transaction-attribute value="REQUIRED" timeout="0"/>
  </beanlet>
</beanlets>


Optional Element Summary
 int timeout
           
 TransactionAttributeType value
           
 

value

public abstract TransactionAttributeType value
Default:
org.beanlet.transaction.TransactionAttributeType.REQUIRED

timeout

public abstract int timeout
Default:
0


Copyright © 2006-2012. All Rights Reserved.