Search in sources :

Example 1 with DescribedPojoPhase

use of org.jboss.as.pojo.service.DescribedPojoPhase in project wildfly by wildfly.

the class ParsedKernelDeploymentProcessor method describeBean.

protected void describeBean(final Module module, final ServiceTarget serviceTarget, DeploymentReflectionIndex deploymentIndex, BeanMetaDataConfig beanConfig) {
    final BeanState state = BeanState.NOT_INSTALLED;
    final ServiceName describedServiceName = BeanMetaDataConfig.toBeanName(beanConfig.getName(), state.next());
    final DescribedPojoPhase describedService = new DescribedPojoPhase(deploymentIndex, beanConfig);
    final ServiceBuilder describedServiceBuilder = serviceTarget.addService(describedServiceName, describedService);
    describedService.registerAliases(describedServiceBuilder);
    final ConfigVisitor visitor = new DefaultConfigVisitor(describedServiceBuilder, state, module, deploymentIndex);
    beanConfig.visit(visitor);
    describedServiceBuilder.setInitialMode(beanConfig.getMode().getMode());
    describedServiceBuilder.install();
}
Also used : DescribedPojoPhase(org.jboss.as.pojo.service.DescribedPojoPhase) DefaultConfigVisitor(org.jboss.as.pojo.descriptor.DefaultConfigVisitor) ConfigVisitor(org.jboss.as.pojo.descriptor.ConfigVisitor) DefaultConfigVisitor(org.jboss.as.pojo.descriptor.DefaultConfigVisitor) ServiceName(org.jboss.msc.service.ServiceName) ServiceBuilder(org.jboss.msc.service.ServiceBuilder)

Aggregations

ConfigVisitor (org.jboss.as.pojo.descriptor.ConfigVisitor)1 DefaultConfigVisitor (org.jboss.as.pojo.descriptor.DefaultConfigVisitor)1 DescribedPojoPhase (org.jboss.as.pojo.service.DescribedPojoPhase)1 ServiceBuilder (org.jboss.msc.service.ServiceBuilder)1 ServiceName (org.jboss.msc.service.ServiceName)1