Package com.sun.enterprise.config.serverbeans

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


            timeoutInSeconds = timeout;
            String val  = httpListener.getAcceptorThreads();
            countAcceptorThreads = Integer.parseInt(val);
       
            val = httpListener.getPort();           
            PropertyResolver pr = new PropertyResolver(InstanceHangAction.configCtx,
                                                       inst.getName());
            String resolvedPort = pr.resolve(val);
            listenerPort = Integer.parseInt(resolvedPort);
            /* the default value used by LB; which has been factored in from
             *proxy config - 5 seconds
             */
            connectTimeout = 5 * 1000;
 
View Full Code Here


    public static String getResolvedPort(IiopListener l,
            String server)
  throws ConfigException
    {
  String rawPort = l.getRawAttributeValue("port");
  PropertyResolver pr = new PropertyResolver(configCtx, server);
  return pr.resolve(rawPort);
    }
View Full Code Here

    }
   
    protected String resolvePath(String path) {
        String resolved = path;
        try {
            resolved =  new PropertyResolver(configContext,
                getInstanceEnvironment().getName()).resolve(path);
        } catch (ConfigException ce) {
            //log this.
        }
        return resolved;
View Full Code Here

                boolean autodeployEnabled=dasConfig.isAutodeployEnabled();
                if(autodeployEnabled){                   
                    autoDeployDir=dasConfig.getAutodeployDir() ;
                    if(autoDeployDir != null) {
                        try {
                            autoDeployDir = new PropertyResolver(confContext,
                                context.getInstanceName()).
                                    resolve(autoDeployDir);
                            autoDeployDir=autoDeployDir.trim();
                        } catch (ConfigException ce) {
                            //log
View Full Code Here

        */
    }

    private void createPathResolver() {
        try {
            mPathResolver = new PropertyResolver(
                ConfigFactory.createConfigContext(mConfigFilePath),
                mLogicalName);
        } catch (Exception e) {
            //log it.
        }
View Full Code Here

        J2eeApplication app = (J2eeApplication) getJ2eeApplication(appId);
        InstanceEnvironment instEnv;
        if ((instEnv = getInstanceEnvironment()) == null) {
            throw new ConfigException("instEnv was null");
        }
        PropertyResolver resolver = new PropertyResolver(super.configContext,
                instEnv.getName());
        String appLocation;
        if ((appLocation = app.getLocation()) == null) {
            throw new ConfigException("appLocation was null");
        };
        String resolvedPath = resolver.resolve(appLocation);
        return resolvedPath;
       
    }
View Full Code Here

                portNb = hl.getPort();
            }
            if(targetName == null) {
                targetName = ApplicationServer.getServerContext().getInstanceName();
            }
            PropertyResolver pr = new PropertyResolver(cc, targetName);
            String resolvedPort = pr.resolve(portNb);
           
            int port = Integer.parseInt(resolvedPort);
            if (hl.isSecurityEnabled()) {
                wsi.setHttpsVS(new VirtualServerInfo("https", targetHostName, port));               
            } else {
View Full Code Here

                }
                /*
                 *Resolve any property expression to an integer.
                 */
                String resolvedPortStr =
                    new PropertyResolver(configContext,
                        getInstanceName()).resolve(portStr);
                int port = Integer.parseInt(resolvedPortStr);
               
                result = new HostAndPort(serverName, port, listener.isSecurityEnabled());
                break;
View Full Code Here

                            String redirPort = listener.getRedirectPort();
                            if (redirPort != null && !redirPort.trim().equals("")) {
                                portStr = redirPort;
                            }
                            final String resolvedPort =
                                    new PropertyResolver(getConfigContext(),
                                        getInstanceName()).resolve(portStr);
                            port = Integer.parseInt(resolvedPort);
                            return new HostAndPort(serverName, port);
                        }
                    }
View Full Code Here

     * @throws ConfigException
     **/
    static public boolean checkIfAttributesAndPropertiesAreResolvable(ConfigBean element, String instanceName)
                              throws ConfigException
    {
        final PropertyResolver resolver = new PropertyResolver(element.getConfigContext(), instanceName);
        final String[] attrNames = element.getAttributeNames();
        //first - check attributes;
        if(attrNames!=null)
        {
            for(int i=0; i<attrNames.length; i++)
            {
               String value = element.getAttributeValue(attrNames[i]);
               if(value!=null && !resolver.isResolvable(value, true))
               {
                   return false;
               }
            }
        }
        //then - properties;
        ElementProperty[] props = getElementProperties(element);
        if(props!=null)
        {
            for(int i=0; i<props.length; i++)
            {
               String value = props[i].getValue();
               if(value!=null && !resolver.isResolvable(value, true))
               {
                   return false;
               }
            }
        }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.config.serverbeans.PropertyResolver

Copyright © 2018 www.massapicom. 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.