Search in sources :

Example 11 with JavaConfig

use of com.sun.enterprise.config.serverbeans.JavaConfig in project Payara by payara.

the class JavaConfigSubTypesTest method doTest.

@Test
public void doTest() throws TransactionFailure {
    JavaConfig javaConfig = habitat.getService(JavaConfig.class);
    ConfigSupport.apply(new SingleConfigCode<JavaConfig>() {

        public Object run(JavaConfig param) throws PropertyVetoException, TransactionFailure {
            List<String> jvmOptions = param.getJvmOptions();
            jvmOptions.add("-XFooBar=true");
            return jvmOptions;
        }
    }, javaConfig);
}
Also used : JavaConfig(com.sun.enterprise.config.serverbeans.JavaConfig) PropertyVetoException(java.beans.PropertyVetoException) TransactionFailure(org.jvnet.hk2.config.TransactionFailure) List(java.util.List) Test(org.junit.Test)

Aggregations

JavaConfig (com.sun.enterprise.config.serverbeans.JavaConfig)11 PropertyVetoException (java.beans.PropertyVetoException)4 ArrayList (java.util.ArrayList)4 List (java.util.List)4 Property (org.jvnet.hk2.config.types.Property)4 HashMap (java.util.HashMap)3 Test (org.junit.Test)3 TransactionFailure (org.jvnet.hk2.config.TransactionFailure)3 Config (com.sun.enterprise.config.serverbeans.Config)2 Profiler (com.sun.enterprise.config.serverbeans.Profiler)2 SystemProperty (com.sun.enterprise.config.serverbeans.SystemProperty)2 Map (java.util.Map)2 NetworkListener (org.glassfish.grizzly.config.dom.NetworkListener)2 ConfigBean (org.jvnet.hk2.config.ConfigBean)2 ConfigSupport (org.jvnet.hk2.config.ConfigSupport)2 AdminService (com.sun.enterprise.config.serverbeans.AdminService)1 AvailabilityService (com.sun.enterprise.config.serverbeans.AvailabilityService)1 Cluster (com.sun.enterprise.config.serverbeans.Cluster)1 Domain (com.sun.enterprise.config.serverbeans.Domain)1 HttpService (com.sun.enterprise.config.serverbeans.HttpService)1