use of org.wildfly.extension.batch.jberet.deployment.BatchJobExecutionResourceDefinition 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());
}
}
use of org.wildfly.extension.batch.jberet.deployment.BatchJobExecutionResourceDefinition in project wildfly by wildfly.
the class BatchSubsystemExtension method initialize.
@Override
public void initialize(ExtensionContext context) {
final SubsystemRegistration subsystem = context.registerSubsystem(BatchSubsystemDefinition.NAME, CURRENT_MODEL_VERSION);
subsystem.registerSubsystemModel(BatchSubsystemDefinition.INSTANCE);
subsystem.registerXMLElementWriter(BatchSubsystemParser.INSTANCE);
// Register the deployment resources
if (context.isRuntimeOnlyRegistrationValid()) {
final SimpleResourceDefinition deploymentResource = new SimpleResourceDefinition(new SimpleResourceDefinition.Parameters(BatchSubsystemDefinition.SUBSYSTEM_PATH, BatchResourceDescriptionResolver.getResourceDescriptionResolver("deployment")).setRuntime());
final ManagementResourceRegistration deployments = subsystem.registerDeploymentModel(deploymentResource);
final ManagementResourceRegistration jobRegistration = deployments.registerSubModel(BatchJobResourceDefinition.INSTANCE);
jobRegistration.registerSubModel(new BatchJobExecutionResourceDefinition());
}
}
Aggregations