Skip to content

Commit

Permalink
Merge pull request #25138 from avpinchuk/get-and-set-commands
Browse files Browse the repository at this point in the history
Fixes the `get` and `set` asadmin commands
  • Loading branch information
arjantijms authored Sep 11, 2024
2 parents e945389 + d932ebb commit 8599440
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/*
* Copyright (c) 2024 Contributors to the Eclipse Foundation.
* Copyright (c) 2012, 2018 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
Expand All @@ -19,11 +20,14 @@
import com.sun.enterprise.config.serverbeans.Config;
import com.sun.enterprise.config.serverbeans.Domain;

import jakarta.annotation.PostConstruct;
import jakarta.inject.Inject;

import java.util.StringTokenizer;

import org.glassfish.api.naming.DefaultResourceProxy;
import org.glassfish.config.support.Singleton;
import org.glassfish.hk2.api.ServiceLocator;
import org.jvnet.hk2.annotations.Service;

/**
Expand All @@ -41,6 +45,14 @@ public class GetSetModularityHelper {
@Inject
private Domain domain;

@Inject
private ServiceLocator serviceLocator;

@PostConstruct
public void initDefaultResources() {
serviceLocator.getAllServices(DefaultResourceProxy.class);
}

/**
* @param prefix the entire . separated string
* @param position starts with one
Expand Down Expand Up @@ -90,7 +102,7 @@ public void getLocationForDottedName(String dottedName) {
// TODO temporary hard coded service names till all elements are supported, being tracked as part of FPP-121
if (dottedName.contains("monitor"))
return;
if (dottedName.contains("mdb-container") || dottedName.contains("ejb-container.") || dottedName.contains("web-container.")
if (dottedName.contains("mdb-container") || dottedName.contains("ejb-container.") || dottedName.endsWith("ejb-container") || dottedName.contains("web-container.")
|| dottedName.contains("cdi-service") || dottedName.contains("batch-runtime-configuration")
|| dottedName.contains("managed-job-config")) {
//TODO improve performance to improve command execution time
Expand Down

0 comments on commit 8599440

Please # to comment.