Search in sources :

Example 1 with BatchDeploymentResourceDefinition

use of org.wildfly.extension.batch.jberet.deployment.BatchDeploymentResourceDefinition in project wildfly by wildfly.

the class BatchSubsystemExtension method initialize.

@Override
public void initialize(final ExtensionContext context) {
    final SubsystemRegistration subsystem = context.registerSubsystem(BatchSubsystemDefinition.NAME, CURRENT_MODEL_VERSION);
    subsystem.registerSubsystemModel(new BatchSubsystemDefinition(context.isRuntimeOnlyRegistrationValid()));
    subsystem.registerXMLElementWriter(new BatchSubsystemWriter());
    // Register the deployment resources
    if (context.isRuntimeOnlyRegistrationValid()) {
        final ManagementResourceRegistration deployments = subsystem.registerDeploymentModel(new BatchDeploymentResourceDefinition());
        final ManagementResourceRegistration jobRegistration = deployments.registerSubModel(BatchJobResourceDefinition.INSTANCE);
        jobRegistration.registerSubModel(new BatchJobExecutionResourceDefinition());
    }
}
Also used : BatchDeploymentResourceDefinition(org.wildfly.extension.batch.jberet.deployment.BatchDeploymentResourceDefinition) BatchJobExecutionResourceDefinition(org.wildfly.extension.batch.jberet.deployment.BatchJobExecutionResourceDefinition) ManagementResourceRegistration(org.jboss.as.controller.registry.ManagementResourceRegistration) SubsystemRegistration(org.jboss.as.controller.SubsystemRegistration)

Aggregations

SubsystemRegistration (org.jboss.as.controller.SubsystemRegistration)1 ManagementResourceRegistration (org.jboss.as.controller.registry.ManagementResourceRegistration)1 BatchDeploymentResourceDefinition (org.wildfly.extension.batch.jberet.deployment.BatchDeploymentResourceDefinition)1 BatchJobExecutionResourceDefinition (org.wildfly.extension.batch.jberet.deployment.BatchJobExecutionResourceDefinition)1