Package com.sun.enterprise.config.serverbeans

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


            String unresolved = (String)invoke("getPropertyValue", new Object[]{name}, new String[]{"java.lang.String"});
            //This needs to be changed for SE/EE. The instanceName cant
            //be assumed to be the das server instance name.
            final String instanceName = MBeanRegistryFactory.getAdminContext().
                    getServerName();
            final String resolved =  new PropertyResolver(getConfigContext(),
                    instanceName).resolve(unresolved);
            return resolved;
        }
        catch (Exception e)
        {
View Full Code Here


        //FIXME: bResolvePathesAsWell=true is working correct only for DAS
        if(instanceName==null)
        {
            instanceName=MBeanRegistryFactory.getAdminContext().getServerName();
        }
        PropertyResolver resolver = new PropertyResolver(getConfigContext(), instanceName);
        return resolver.resolve(value, bResolvePathesAsWell);
    }
View Full Code Here

                            REDIRECT_PORT);
                    if (redirPort != null && !redirPort.trim().equals("")) {
                        portStr = redirPort;
                    }
                    String resolvedPort =
                        new PropertyResolver(getConfigContext(),
                            getInstanceName()).resolve(portStr);
                    port = Integer.parseInt(resolvedPort);
                    break;
                }
            }
View Full Code Here

                            String redirPort = (String)getNamedAttributeValue(attrs, REDIRECT_PORT);
                            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

        }
    }
    private String resolveTokensForDas(String value) throws ConfigException
    {
        String instanceName=MBeanRegistryFactory.getAdminContext().getServerName();
        PropertyResolver resolver = new PropertyResolver(getConfigContext(), instanceName);
        return resolver.resolve(value, true);
    }
View Full Code Here

          if ( (port != null) && (port.length() > 1) && (port.charAt(0) == '$')
          &&(port.charAt(1) == '{') &&(port.charAt(port.length()-1) == '}') ) {
           
                String portVar = port.substring(2, port.length()-1);
                String sVar = null;
                PropertyResolver propResolver= null;
                try {
                    propResolver = new PropertyResolver(_ctx,sName);
                } catch(ConfigException ce) {
                    // ignore this exception
                }

                if (propResolver != null) {
                    sVar = propResolver.getPropertyValue(portVar);
                }
                if (sVar != null) {
                    listenerStr += sVar;
                } else {
                    listenerStr += port;
View Full Code Here

                } else if(bean instanceof EjbModule) {
                    loc = ((EjbModule)bean).getLocation();
                }
                if(bean instanceof J2eeApplication ||
                                                 bean instanceof EjbModule) {
                    PropertyResolver pr = new PropertyResolver(_ctx, _dasName);
                    String rLocation = pr.resolve(loc);

                    // opening the application.xml descriptor
                    FileArchive in = new FileArchive();
                    in.open(rLocation);
                    ApplicationDeploymentDescriptorFile rootDD =
View Full Code Here

                   }

                }
                if(bean instanceof J2eeApplication) {

                    PropertyResolver pr = new PropertyResolver(_ctx, _dasName);
                    String rLocation = pr.resolve(loc);

                    // opening the application.xml descriptor
                    FileArchive in = new FileArchive();
                    in.open(rLocation);
                    ApplicationDeploymentDescriptorFile rootDD =
View Full Code Here

            if ((hostName != null) && (hostName.length() > 1) &&
                (hostName.charAt(0) == '$') && (hostName.charAt(1) == '{') &&
                (hostName.charAt(hostName.length() - 1) == '}')) {
                String hostVar = hostName.substring(2, hostName.length() - 1);
                // resolve hostName since it is a token from system-property
                PropertyResolver propResolver = null;

                try {
                    propResolver = new PropertyResolver(_configCtx, _serverRef.getRef());
                } catch (ConfigException ce) {
                    // ignore this exception
                }

                if (propResolver != null) {
                    hostName = propResolver.getPropertyValue(hostVar);
                }
            }
            else {
                address = InetAddress.getByName(hostName);
                if (address.isAnyLocalAddress())
View Full Code Here

        if ((port != null) && (port.length() > 1) &&
                (port.charAt(0) == '$') && (port.charAt(1) == '{') &&
                (port.charAt(port.length() - 1) == '}')) {
            String portVar = port.substring(2, port.length() - 1);
            String sVar = null;
            PropertyResolver propResolver = null;

            try {
                propResolver = new PropertyResolver(_configCtx, _serverRef.getRef());
            } catch (ConfigException ce) {
                // ignore this exception
            }

            if (propResolver != null) {
                sVar = propResolver.getPropertyValue(portVar);
            }

            if (sVar != null) {
                return sVar;
            } else {
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.