private Class<? extends Throwable> rollback;
private boolean needTransaction;
public TransactionDefinition(Object target, Method actualMethod) {
Annotation annotation = actualMethod.getAnnotation(Transaction.class);
Transaction tx = (Transaction) annotation;
if(tx != null) {
this.isolationLevel = tx.isolation();
this.readOnly = tx.readonly();
this.rollback = tx.rollback();
needTransaction = true;
} else {
needTransaction = false;
}
}