Examples of JavaConfig


Examples of com.sun.appserv.management.config.JavaConfig

            @HandlerInput(name="ConfigName", type=String.class, required=true)})
        public static void saveProfilerJvmOptions(HandlerContext handlerCtx) {
        ArrayList names = (ArrayList)handlerCtx.getInputValue("NameList");
        ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
        try{
            JavaConfig javaConfig = config.getJavaConfig();
            ProfilerConfig profilerConfig = javaConfig.getProfilerConfig();
            if(profilerConfig != null && names != null) {
                String[] options = (String[])names.toArray(new String[names.size()]);
                profilerConfig.setJVMOptions(options);
            }
        }catch (Exception ex){
View Full Code Here

Examples of com.sun.appserv.management.config.JavaConfig

        @HandlerOutput(name="NativeLibrary", type=String.class)})
        public static void getServerProfilerAttributes(HandlerContext handlerCtx) {
       
        ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
        try{
            JavaConfig javaConfig = config.getJavaConfig();
            if(javaConfig.getProfilerConfig() != null) {
                ProfilerConfig profilerConfig = javaConfig.getProfilerConfig();
                String name = profilerConfig.getName();
                boolean enabled = profilerConfig.getEnabled();
                String classPath = profilerConfig.getClasspath();
                String nativeLibrary = profilerConfig.getNativeLibraryPath();
                handlerCtx.setOutputValue("Classpath", classPath);
View Full Code Here

Examples of com.sun.appserv.management.config.JavaConfig

        @HandlerInput(name="ProfilerEnabled", type=Boolean.class),
        @HandlerInput(name="NativeLibrary", type=String.class)})
        public static void saveServerProfilerSettings(HandlerContext handlerCtx) {
       
      ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
      JavaConfig javaConfig = config.getJavaConfig();
        boolean removeProfiler = true;
        if(javaConfig.getProfilerConfig() == null){
            createProfiler(handlerCtx, javaConfig);
        } else {
            javaConfig.removeProfilerConfig();
            createProfiler(handlerCtx, javaConfig);
        }
    }
View Full Code Here

Examples of com.sun.appserv.management.config.JavaConfig

       
        //more null pointer checking put in due to issue#2247
        String configName = (String)handlerCtx.getInputValue("ConfigName");
        ConfigConfig config = AMXUtil.getConfig(configName);
        List<List<Map<String, Object>>> list = new ArrayList<List<Map<String, Object>>>();
        JavaConfig javaConfig = null;
        try{
            if (config == null){
                System.out.println("getJvmOptions: getConfig() returns NULL,  configName = "+ configName);
            }else{
                javaConfig = config.getJavaConfig();
                if (javaConfig == null){
                    System.out.println("getJvmOptions: getJavaConfig() returns NULL,  configName = "+ configName);
                }else{
                    String[] jvmOptions = javaConfig.getJVMOptions();
                    list.add(convertToListOfMap(jvmOptions, "option"));
                }
            }
        }catch(Exception ex){
            System.out.println("Catch exception when trying to get the jvm option list.");
View Full Code Here

Examples of com.sun.appserv.management.config.JavaConfig

        //more null pointer checking put in due to issue#2247
        try{
            if (config == null){
                System.out.println("!!!!! getJvmOptionsForProfiler:  getConfig() returns NULL. configName="+configName);
            }else{
                JavaConfig javaConfig = config.getJavaConfig();
                if (javaConfig == null){
                    System.out.println("!!!!! getJvmOptionsForProfiler: getJavaConfig() returns NULL; configName="+ configName);
                }else{
                    ProfilerConfig profilerConfig = javaConfig.getProfilerConfig();
                    if(profilerConfig == null) {
                        System.out.println("!!!!! getJvmOptionsForProfiler: getProfilerConfig() returns NULL; configName="+ configName);
                    }else{
                        String[] jvmOptions = profilerConfig.getJVMOptions();
                        list.add(convertToListOfMap(jvmOptions, "option"));
View Full Code Here

Examples of com.sun.appserv.management.config.JavaConfig

        @HandlerOutput(name="RmicOptions", type=String.class),
        @HandlerOutput(name="BytecodePreprocessor", type=String.class)})
        public static void getServerJvmAttributes(HandlerContext handlerCtx) {
       
        ConfigConfig config = AMXUtil.getConfig(((String)handlerCtx.getInputValue("ConfigName")));
        JavaConfig javaConfig = config.getJavaConfig();
        String javaHome = javaConfig.getJavaHome();
        String javacOptions = javaConfig.getJavacOptions();
        boolean debugEnabled = javaConfig.getDebugEnabled();
        String debugOptions = javaConfig.getDebugOptions();
        String rmicOptions = javaConfig.getRMICOptions();
        String bytecodePreprocessors = javaConfig.getBytecodePreprocessors();
        handlerCtx.setOutputValue("JavaHome", javaHome);
        handlerCtx.setOutputValue("JavacOptions", javacOptions);
        handlerCtx.setOutputValue("DebugEnabled", debugEnabled);
        handlerCtx.setOutputValue("DebugOptions", debugOptions);
        handlerCtx.setOutputValue("RmicOptions", rmicOptions);
View Full Code Here

Examples of com.sun.enterprise.config.serverbeans.JavaConfig

     */   
      public boolean isByteCodePreprocessingEnabled()
        throws ConfigException {       
        boolean result = false;
        //ROB: config changes
        JavaConfig jc = ServerBeansFactory.getJavaConfigBean(configContext);
        if (jc != null) {
            if (jc.getBytecodePreprocessors() != null) {
                result = true;
            }
        }
        return result;
    }     
View Full Code Here

Examples of com.sun.enterprise.config.serverbeans.JavaConfig

     */   
    public String[] getBytecodeProcessorClassNames()
        throws ConfigException {
        String result[] = null;       
        //ROB: config changes - use of domain.xml
        JavaConfig jc = ServerBeansFactory.getJavaConfigBean(configContext);
        if (jc != null) {
           String value = jc.getBytecodePreprocessors();
           _logger.log(Level.INFO,
              "core.preprocessor_class_name", value);
           // Split the comma delimited list of bytecode preprocessor
           // class names into the result array
           result = value.split(",");
View Full Code Here

Examples of com.sun.enterprise.config.serverbeans.JavaConfig

    public List getSystemCPathPrefixNSuffix() throws ConfigException {

        List classPath = new ArrayList();

        // bean that represents the java configuration
        JavaConfig jconfig = (JavaConfig) ConfigBeansFactory.
                                    getConfigBeanByXPath(this.configContext,
                                        ServerXPathHelper.XPATH_JAVACONFIG);

        // add the class path prefix first
        String prefix = jconfig.getClasspathPrefix();
        if (prefix != null) {
            prefix = RelativePathResolver.resolvePath(prefix);
            StringTokenizer st = new StringTokenizer(prefix,File.pathSeparator);
            while (st.hasMoreTokens()) {
                classPath.add(st.nextToken());
            }
        }

        // adds the class path suffix to the list
        String suffix = jconfig.getClasspathSuffix();
        if (suffix != null) {
            suffix = RelativePathResolver.resolvePath(suffix);
            StringTokenizer st = new StringTokenizer(suffix,File.pathSeparator);
            while (st.hasMoreTokens()) {
                classPath.add(st.nextToken());
View Full Code Here

Examples of com.sun.enterprise.config.serverbeans.JavaConfig

    public List getSystemClasspath() throws ConfigException {
    if(!Boolean.getBoolean(com.sun.enterprise.server.PELaunch.USE_NEW_CLASSLOADER_PROPERTY)){
        List classPath = new ArrayList();

        // bean that represents the java configuration
        JavaConfig jconfig = (JavaConfig) ConfigBeansFactory.
                                    getConfigBeanByXPath(this.configContext,
                                        ServerXPathHelper.XPATH_JAVACONFIG);

        // add the class path prefix first
        String prefix = jconfig.getClasspathPrefix();
        if (prefix != null) {
            StringTokenizer st = new StringTokenizer(prefix,File.pathSeparator);
            while (st.hasMoreTokens()) {
                classPath.add(st.nextToken());
            }
        }

        // adds the server classpath to the list
        String serverClasspath = jconfig.getServerClasspath();
        if (serverClasspath != null) {
            StringTokenizer st =
                new StringTokenizer(serverClasspath,File.pathSeparator);
            while (st.hasMoreTokens()) {
                classPath.add(st.nextToken());
            }
        }

        // adds the class path suffix to the list
        String suffix = jconfig.getClasspathSuffix();
        if (suffix != null) {
            StringTokenizer st = new StringTokenizer(suffix,File.pathSeparator);
            while (st.hasMoreTokens()) {
                classPath.add(st.nextToken());
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.