Search in sources :

Example 1 with RuntimeType

use of org.glassfish.api.admin.RuntimeType in project Payara by payara.

the class ConfigModularityUtils method getRuntimeTypePrefix.

public String getRuntimeTypePrefix(StartupContext startupContext) {
    Properties args = startupContext.getArguments();
    RuntimeType serverType = RuntimeType.getDefault();
    String typeString = args.getProperty("-type");
    if (typeString != null)
        serverType = RuntimeType.valueOf(typeString);
    if (LOG.isLoggable(Level.FINE)) {
        LOG.fine("server type is: " + serverType.name());
    }
    if (serverType.isEmbedded())
        return "embedded";
    if (serverType.isSingleInstance() || serverType.isDas())
        return "admin";
    if (serverType.isInstance())
        return "instance";
    return "";
}
Also used : RuntimeType(org.glassfish.api.admin.RuntimeType) Properties(java.util.Properties)

Aggregations

Properties (java.util.Properties)1 RuntimeType (org.glassfish.api.admin.RuntimeType)1