1 16 17 package org.springframework.transaction.config; 18 19 import org.springframework.core.Conventions; 20 import org.springframework.util.ClassUtils; 21 22 27 class TxNamespaceUtils { 28 29 public static final String TRANSACTION_MANAGER_ATTRIBUTE = "transaction-manager"; 30 31 public static final String TRANSACTION_MANAGER_PROPERTY = 32 Conventions.attributeNameToPropertyName(TRANSACTION_MANAGER_ATTRIBUTE); 33 34 public static final String TRANSACTION_ATTRIBUTE_SOURCE = "transactionAttributeSource"; 35 36 private static final String ANNOTATION_TRANSACTION_ATTRIBUTE_SOURCE_CLASS_NAME = 37 "org.springframework.transaction.annotation.AnnotationTransactionAttributeSource"; 38 39 40 public static Class getAnnotationTransactionAttributeSourceClass() { 41 try { 42 return ClassUtils.forName(ANNOTATION_TRANSACTION_ATTRIBUTE_SOURCE_CLASS_NAME); 43 } 44 catch (Throwable ex) { 45 throw new IllegalStateException ( 46 "Unable to load class [" + ANNOTATION_TRANSACTION_ATTRIBUTE_SOURCE_CLASS_NAME + 47 "]. Are you running on Java 1.5+? Root cause: " + ex); 48 } 49 } 50 51 } 52 | Popular Tags |