Examples of SystemProperty


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

                        if (systemProperties != null) {
                            for (final Map.Entry<Object, Object> entry : systemProperties.entrySet()) {
                                final String propName = (String) entry.getKey();
                                final String propValue = (String) entry.getValue();
                                SystemProperty newSP = newServer.createChild(SystemProperty.class);
                                //newSP.setDescription(sp.getDescription());
                                newSP.setName(propName);
                                newSP.setValue(propValue);
                                newServer.getSystemProperty().add(newSP);
                            }
                        }

                        param.getServer().add(newServer);
View Full Code Here

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

    public void addSystemPropertyForToken(List<ConfigCustomizationToken> tokens, SystemPropertyBag bag)
            throws TransactionFailure, PropertyVetoException {
        for (ConfigCustomizationToken token : tokens) {
            if (!bag.containsProperty(token.getKey())) {
                SystemProperty prop = bag.createChild(SystemProperty.class);
                prop.setName(token.getKey());
                prop.setDescription(token.getDescription());
                prop.setValue(token.getDefaultValue());
                bag.getSystemProperty().add(prop);
            }
        }
    }
View Full Code Here

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

            setSystemProperty(DEBUG, getDebugPort());
        }
    }

    private void setSystemProperty(String name, String value) throws TransactionFailure, PropertyVetoException {
        SystemProperty sp = _server.getSystemProperty(name);
        if (sp == null) {
            SystemProperty newSP = _server.createChild(SystemProperty.class);
            newSP.setName(name);
            newSP.setValue(value);
            _server.getSystemProperty().add(newSP);
        } else {
            //Don't change the system property if it already exists - leave the original port assignment
            //sp.setName(name);
            //sp.setValue(value);
View Full Code Here

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

        // isToken returned true so we are NOT assuming anything below!
        String key = portString.substring(2, portString.length() - 1);

        // check cluster and the cluster's config if applicable
        // bnevins Jul 18, 2010 -- don't botehr this should never be called anymore
        SystemProperty prop = server.getSystemProperty(key);

        if (prop != null) {
            return prop.getValue();
        }

        prop = config.getSystemProperty(key);

        if (prop != null) {
            return prop.getValue();
        }

        return null;
    }
View Full Code Here

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

    public void addSystemPropertyForToken(List<ConfigCustomizationToken> tokens, SystemPropertyBag bag)
            throws TransactionFailure, PropertyVetoException {
        for (ConfigCustomizationToken token : tokens) {
            if (!bag.containsProperty(token.getKey())) {
                SystemProperty prop = bag.createChild(SystemProperty.class);
                prop.setName(token.getKey());
                prop.setDescription(token.getDescription());
                prop.setValue(token.getDefaultValue());
                bag.getSystemProperty().add(prop);
            }
        }
    }
View Full Code Here

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

                                break;
                            }
                        }
                       
                        // create system-property
                        SystemProperty newSysProp = param.createChild(SystemProperty.class);
                        newSysProp.setName(propName);
                        newSysProp.setValue(properties.getProperty(propName));
                        param.getSystemProperty().add(newSysProp);                   
                        return newSysProp;
                    }
                }, spb);
                report.setActionExitCode(ActionReport.ExitCode.SUCCESS);
View Full Code Here

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

                    oldAttrs = curAttrs;
                   
                    result = reasons.isEmpty() ? null : new NotProcessed( CombinedJavaConfigSystemPropertyListener.toString(reasons) );
                }
                else if (tc == SystemProperty.class && t instanceof SystemProperty) {
                    final SystemProperty sp = (SystemProperty) t;
                    // check to see if this system property is for this instance
                    ConfigBeanProxy proxy = sp.getParent();
                    ConfigView p = ConfigSupport.getImpl(proxy);

                   
                    if (p == ConfigSupport.getImpl(server) ||
                            p == ConfigSupport.getImpl(config) ||
                            (cluster != null && p == ConfigSupport.getImpl(cluster)) ||
                            p == ConfigSupport.getImpl(domain)) {
                        // check to see if this system property is referenced by any of the options
                        String pname = sp.getName();
                        if (referencesProperty(pname, oldProps) ||
                            referencesProperty(pname, oldAttrs.values())) {
                            result = new NotProcessed("The system-property, " + pname + ", that is referenced by the Java configuration, was modified");
                        }
                    }
View Full Code Here

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

     * on an existing property sends an ADD or the new one, a CHANGE, followed by
     * a REMOVE of the old one. So we need to check if the property is still
     * there.
     */
    private NotProcessed removeFromServer(SystemProperty sp) {
        SystemProperty sysProp = getServerSystemProperty(sp.getName());
        if (sysProp == null)
            sysProp = getClusterSystemProperty(sp.getName());
        if (sysProp == null)
            sysProp = getConfigSystemProperty(sp.getName());
        if (sysProp == null)
            sysProp = getDomainSystemProperty(sp.getName());
        if (sysProp == null) {
            System.clearProperty(sp.getName());
        } else {
            System.setProperty(sysProp.getName(), sysProp.getValue());
        }
        return null; //processed
    }
View Full Code Here

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

        }
        return null; //processed
    }

    private NotProcessed removeFromCluster(SystemProperty sp) {
        SystemProperty sysProp = getConfigSystemProperty(sp.getName());
        if (sysProp == null)
            sysProp = getDomainSystemProperty(sp.getName());
        if (sysProp == null) {
            if (!serverHas(sp))
                System.clearProperty(sp.getName()); //if server overrides it anyway, this should be a noop
        } else {
            if (!serverHas(sp))
                System.setProperty(sysProp.getName(), sysProp.getValue());
        }
        return null; //processed
    }
View Full Code Here

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

        }
        return null; //processed
    }

    private NotProcessed removeFromConfig(SystemProperty sp) {
        SystemProperty sysProp = getDomainSystemProperty(sp.getName());
        if (sysProp == null) {
            if (!serverHas(sp) && !clusterHas(sp))
                System.clearProperty(sp.getName()); //if server overrides it anyway, this should be a noop
        } else {
            if (!serverHas(sp) && !clusterHas(sp))
                System.setProperty(sysProp.getName(), sysProp.getValue());
        }
        return null; //processed
    }
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.