Skip to content

Commit

Permalink
WFLY-17423 Eliminate static references to batch-jberet ResourceDefini…
Browse files Browse the repository at this point in the history
…tion instances
  • Loading branch information
pferraro committed Dec 16, 2022
1 parent e02f190 commit 08ee110
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void initialize(final ExtensionContext context) {
// Register the deployment resources
if (context.isRuntimeOnlyRegistrationValid()) {
final ManagementResourceRegistration deployments = subsystem.registerDeploymentModel(new BatchDeploymentResourceDefinition());
final ManagementResourceRegistration jobRegistration = deployments.registerSubModel(BatchJobResourceDefinition.INSTANCE);
final ManagementResourceRegistration jobRegistration = deployments.registerSubModel(new BatchJobResourceDefinition());
jobRegistration.registerSubModel(new BatchJobExecutionResourceDefinition());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ public class BatchJobResourceDefinition extends SimpleResourceDefinition {
.setStorageRuntime()
.build();

public static final BatchJobResourceDefinition INSTANCE = new BatchJobResourceDefinition();

private BatchJobResourceDefinition() {
public BatchJobResourceDefinition() {
super(new Parameters(PathElement.pathElement(JOB), BatchResourceDescriptionResolver.getResourceDescriptionResolver("deployment", "job")).setRuntime());
}

Expand Down

0 comments on commit 08ee110

Please sign in to comment.