use of cn.taketoday.beans.factory.parsing.BeanComponentDefinition in project today-infrastructure by TAKETODAY.
the class AnnotationDrivenBeanDefinitionParser method registerPostProcessor.
private static void registerPostProcessor(ParserContext parserContext, BeanDefinitionBuilder builder, String beanName) {
builder.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);
parserContext.getRegistry().registerBeanDefinition(beanName, builder.getBeanDefinition());
BeanDefinitionHolder holder = new BeanDefinitionHolder(builder.getBeanDefinition(), beanName);
parserContext.registerComponent(new BeanComponentDefinition(holder));
}
use of cn.taketoday.beans.factory.parsing.BeanComponentDefinition in project today-infrastructure by TAKETODAY.
the class JeeNamespaceHandlerEventTests method testLocalSlsbComponentEventReceived.
@Test
public void testLocalSlsbComponentEventReceived() {
ComponentDefinition component = this.eventListener.getComponentDefinition("simpleLocalEjb");
boolean condition = component instanceof BeanComponentDefinition;
assertThat(condition).isTrue();
}
use of cn.taketoday.beans.factory.parsing.BeanComponentDefinition in project today-infrastructure by TAKETODAY.
the class JeeNamespaceHandlerEventTests method testRemoteSlsbComponentEventReceived.
@Test
public void testRemoteSlsbComponentEventReceived() {
ComponentDefinition component = this.eventListener.getComponentDefinition("simpleRemoteEjb");
boolean condition = component instanceof BeanComponentDefinition;
assertThat(condition).isTrue();
}
use of cn.taketoday.beans.factory.parsing.BeanComponentDefinition in project today-infrastructure by TAKETODAY.
the class AnnotationDrivenBeanDefinitionParser method registerJtaTransactionAspect.
private void registerJtaTransactionAspect(Element element, ParserContext parserContext) {
String txAspectBeanName = TransactionManagementConfigUtils.JTA_TRANSACTION_ASPECT_BEAN_NAME;
String txAspectClassName = TransactionManagementConfigUtils.JTA_TRANSACTION_ASPECT_CLASS_NAME;
if (!parserContext.getRegistry().containsBeanDefinition(txAspectBeanName)) {
RootBeanDefinition def = new RootBeanDefinition();
def.setBeanClassName(txAspectClassName);
def.setFactoryMethodName("aspectOf");
registerTransactionManager(element, def);
parserContext.registerBeanComponent(new BeanComponentDefinition(def, txAspectBeanName));
}
}
use of cn.taketoday.beans.factory.parsing.BeanComponentDefinition in project today-infrastructure by TAKETODAY.
the class AnnotationDrivenBeanDefinitionParser method registerTransactionAspect.
private void registerTransactionAspect(Element element, ParserContext parserContext) {
String txAspectBeanName = TransactionManagementConfigUtils.TRANSACTION_ASPECT_BEAN_NAME;
String txAspectClassName = TransactionManagementConfigUtils.TRANSACTION_ASPECT_CLASS_NAME;
if (!parserContext.getRegistry().containsBeanDefinition(txAspectBeanName)) {
RootBeanDefinition def = new RootBeanDefinition();
def.setBeanClassName(txAspectClassName);
def.setFactoryMethodName("aspectOf");
registerTransactionManager(element, def);
parserContext.registerBeanComponent(new BeanComponentDefinition(def, txAspectBeanName));
}
}
Aggregations