class AnnotationDrivenBeanDefinitionParser extends java.lang.Object implements BeanDefinitionParser
BeanDefinitionParser
implementation that allows users to easily configure
all the infrastructure beans required to enable annotation-driven transaction
demarcation.
By default, all proxies are created as JDK proxies. This may cause some
problems if you are injecting objects as concrete classes rather than
interfaces. To overcome this restriction you can set the
'proxy-target-class
' attribute to 'true
', which
will result in class-based proxies being created.
Modifier and Type | Class and Description |
---|---|
private static class |
AnnotationDrivenBeanDefinitionParser.AopAutoProxyConfigurer
Inner class to just introduce an AOP framework dependency when actually in proxy mode.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
TRANSACTION_ADVISOR_BEAN_NAME
Deprecated.
as of Spring 3.1 in favor of
TransactionManagementConfigUtils.TRANSACTION_ADVISOR_BEAN_NAME |
static java.lang.String |
TRANSACTION_ASPECT_BEAN_NAME
Deprecated.
as of Spring 3.1 in favor of
TransactionManagementConfigUtils.TRANSACTION_ASPECT_BEAN_NAME |
Constructor and Description |
---|
AnnotationDrivenBeanDefinitionParser() |
Modifier and Type | Method and Description |
---|---|
BeanDefinition |
parse(org.w3c.dom.Element element,
ParserContext parserContext)
Parses the
<tx:annotation-driven/> tag. |
private void |
registerTransactionAspect(org.w3c.dom.Element element,
ParserContext parserContext) |
private static void |
registerTransactionManager(org.w3c.dom.Element element,
BeanDefinition def) |
@Deprecated public static final java.lang.String TRANSACTION_ADVISOR_BEAN_NAME
TransactionManagementConfigUtils.TRANSACTION_ADVISOR_BEAN_NAME
@Deprecated public static final java.lang.String TRANSACTION_ASPECT_BEAN_NAME
TransactionManagementConfigUtils.TRANSACTION_ASPECT_BEAN_NAME
public BeanDefinition parse(org.w3c.dom.Element element, ParserContext parserContext)
<tx:annotation-driven/>
tag. Will
register an AutoProxyCreator
with the container as necessary.parse
in interface BeanDefinitionParser
element
- the element that is to be parsed into one or more BeanDefinitions
parserContext
- the object encapsulating the current state of the parsing process;
provides access to a BeanDefinitionRegistry
BeanDefinition
private void registerTransactionAspect(org.w3c.dom.Element element, ParserContext parserContext)
private static void registerTransactionManager(org.w3c.dom.Element element, BeanDefinition def)