org.springframework.transaction.event.TransactionalEventListenerFactory Java Examples

The following examples show how to use org.springframework.transaction.event.TransactionalEventListenerFactory. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EnableTransactionManagementTests.java    From spring-analysis-note with MIT License 5 votes vote down vote up
@Test
public void transactionalEventListenerRegisteredProperly() {
	AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(EnableTxConfig.class);
	assertTrue(ctx.containsBean(TransactionManagementConfigUtils.TRANSACTIONAL_EVENT_LISTENER_FACTORY_BEAN_NAME));
	assertEquals(1, ctx.getBeansOfType(TransactionalEventListenerFactory.class).size());
	ctx.close();
}
 
Example #2
Source File: EnableTransactionManagementTests.java    From java-technology-stack with MIT License 5 votes vote down vote up
@Test
public void transactionalEventListenerRegisteredProperly() {
	AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(EnableTxConfig.class);
	assertTrue(ctx.containsBean(TransactionManagementConfigUtils.TRANSACTIONAL_EVENT_LISTENER_FACTORY_BEAN_NAME));
	assertEquals(1, ctx.getBeansOfType(TransactionalEventListenerFactory.class).size());
	ctx.close();
}
 
Example #3
Source File: EnableTransactionManagementTests.java    From spring4-understanding with Apache License 2.0 5 votes vote down vote up
@Test
public void transactionalEventListenerRegisteredProperly() {
	AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(EnableTxConfig.class);
	assertTrue(ctx.containsBean(TransactionManagementConfigUtils.TRANSACTIONAL_EVENT_LISTENER_FACTORY_BEAN_NAME));
	assertEquals(1, ctx.getBeansOfType(TransactionalEventListenerFactory.class).size());
	ctx.close();
}
 
Example #4
Source File: AbstractTransactionManagementConfiguration.java    From spring-analysis-note with MIT License 4 votes vote down vote up
@Bean(name = TransactionManagementConfigUtils.TRANSACTIONAL_EVENT_LISTENER_FACTORY_BEAN_NAME)
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
public static TransactionalEventListenerFactory transactionalEventListenerFactory() {
	return new TransactionalEventListenerFactory();
}
 
Example #5
Source File: AnnotationDrivenBeanDefinitionParser.java    From spring-analysis-note with MIT License 4 votes vote down vote up
private void registerTransactionalEventListenerFactory(ParserContext parserContext) {
	RootBeanDefinition def = new RootBeanDefinition();
	def.setBeanClass(TransactionalEventListenerFactory.class);
	parserContext.registerBeanComponent(new BeanComponentDefinition(def,
			TransactionManagementConfigUtils.TRANSACTIONAL_EVENT_LISTENER_FACTORY_BEAN_NAME));
}
 
Example #6
Source File: AnnotationTransactionNamespaceHandlerTests.java    From spring-analysis-note with MIT License 4 votes vote down vote up
@Test
public void transactionalEventListenerRegisteredProperly() {
	assertTrue(this.context.containsBean(TransactionManagementConfigUtils
			.TRANSACTIONAL_EVENT_LISTENER_FACTORY_BEAN_NAME));
	assertEquals(1, this.context.getBeansOfType(TransactionalEventListenerFactory.class).size());
}
 
Example #7
Source File: AbstractTransactionManagementConfiguration.java    From java-technology-stack with MIT License 4 votes vote down vote up
@Bean(name = TransactionManagementConfigUtils.TRANSACTIONAL_EVENT_LISTENER_FACTORY_BEAN_NAME)
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
public static TransactionalEventListenerFactory transactionalEventListenerFactory() {
	return new TransactionalEventListenerFactory();
}
 
Example #8
Source File: AnnotationDrivenBeanDefinitionParser.java    From java-technology-stack with MIT License 4 votes vote down vote up
private void registerTransactionalEventListenerFactory(ParserContext parserContext) {
	RootBeanDefinition def = new RootBeanDefinition();
	def.setBeanClass(TransactionalEventListenerFactory.class);
	parserContext.registerBeanComponent(new BeanComponentDefinition(def,
			TransactionManagementConfigUtils.TRANSACTIONAL_EVENT_LISTENER_FACTORY_BEAN_NAME));
}
 
Example #9
Source File: AnnotationTransactionNamespaceHandlerTests.java    From java-technology-stack with MIT License 4 votes vote down vote up
@Test
public void transactionalEventListenerRegisteredProperly() {
	assertTrue(this.context.containsBean(TransactionManagementConfigUtils
			.TRANSACTIONAL_EVENT_LISTENER_FACTORY_BEAN_NAME));
	assertEquals(1, this.context.getBeansOfType(TransactionalEventListenerFactory.class).size());
}
 
Example #10
Source File: AbstractTransactionManagementConfiguration.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
@Bean(name = TransactionManagementConfigUtils.TRANSACTIONAL_EVENT_LISTENER_FACTORY_BEAN_NAME)
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
public TransactionalEventListenerFactory transactionalEventListenerFactory() {
	return new TransactionalEventListenerFactory();
}
 
Example #11
Source File: AnnotationDrivenBeanDefinitionParser.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
private void registerTransactionalEventListenerFactory(ParserContext parserContext) {
	RootBeanDefinition def = new RootBeanDefinition();
	def.setBeanClass(TransactionalEventListenerFactory.class);
	parserContext.registerBeanComponent(new BeanComponentDefinition(def,
			TransactionManagementConfigUtils.TRANSACTIONAL_EVENT_LISTENER_FACTORY_BEAN_NAME));
}
 
Example #12
Source File: AbstractTransactionManagementConfiguration.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
@Bean(name = TransactionManagementConfigUtils.TRANSACTIONAL_EVENT_LISTENER_FACTORY_BEAN_NAME)
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
public TransactionalEventListenerFactory transactionalEventListenerFactory() {
	return new TransactionalEventListenerFactory();
}
 
Example #13
Source File: AnnotationDrivenBeanDefinitionParser.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
private void registerTransactionalEventListenerFactory(ParserContext parserContext) {
	RootBeanDefinition def = new RootBeanDefinition();
	def.setBeanClass(TransactionalEventListenerFactory.class);
	parserContext.registerBeanComponent(new BeanComponentDefinition(def,
			TransactionManagementConfigUtils.TRANSACTIONAL_EVENT_LISTENER_FACTORY_BEAN_NAME));
}
 
Example #14
Source File: AnnotationTransactionNamespaceHandlerTests.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
@Test
public void transactionalEventListenerRegisteredProperly() {
	assertTrue(this.context.containsBean(TransactionManagementConfigUtils
			.TRANSACTIONAL_EVENT_LISTENER_FACTORY_BEAN_NAME));
	assertEquals(1, this.context.getBeansOfType(TransactionalEventListenerFactory.class).size());
}