Package com.sun.enterprise.config.serverbeans

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


            ElementProperty[] properties, String description ) {
        String eventName = "*"; // any event
        String serverName = "*"; // any server
       
        for( int i = 0; i < properties.length; i++ ){
            ElementProperty property = properties[i];
            String propertyName = property.getName( ).toLowerCase( );
            if( propertyName.equals("name")) {
                eventName = "cluster." + property.getValue( ).toLowerCase( );
                if (!GMSEvent.isValidType(eventName))
                    throw new IllegalArgumentException(" name property of cluster event is invalid " );
            } else if ( propertyName.equals("servername") ) {
                serverName = property.getValue( );
            }
        }
        return new GMSEvent(eventName, new GMSNotificationFilter(serverName, eventName), description);
    }
View Full Code Here


                    slcm.setIsFatal(next.isIsFailureFatal());
                       
                    final ElementProperty[] s = next.getElementProperty();
                    if(s != null) {
                        for(int j=0;j< s.length;j++) {
                            final ElementProperty next1 = s[j];
                            slcm.setProperty(next1.getName(), next1.getValue());
                        }
                    }

                    final LifecycleListener listener = slcm.loadServerLifecycle();
                    listenerSet.add(slcm);
View Full Code Here

        } catch (Exception ce) {
            throw new Exception(ce);
        }

        String contextRoot = null;
        ElementProperty ep = em.getElementPropertyByName("contextRoot");
        if(ep != null ){
            contextRoot = ep.getValue();
        } else {
            contextRoot = em.getName();
        }
             
        String virtualServers = null;
View Full Code Here

        } catch (Exception ce) {
            throw new Exception(ce);
        }
       
        String contextRoot = null;
        ElementProperty ep = em.getElementPropertyByName("contextRoot");
        if(ep != null ){
            contextRoot = ep.getValue();
        } else {
            contextRoot = em.getName();
        }
       
        String virtualServers = null;
View Full Code Here

        // set the values in the ExtensionModule config bean
        em = new com.sun.enterprise.config.serverbeans.ExtensionModule();
        em.setLocation(dir.toString().trim());
        em.setConfigContext(eventConfigContext);
        em.setName(moduleName);
        ElementProperty isConvergedProperty = new ElementProperty();
        isConvergedProperty.setName("isConverged");
        if(wbd.getContextRoot() != null) {
            isConvergedProperty.setValue("true");
            ElementProperty contextRootProperty = new ElementProperty();
            contextRootProperty.setName("contextRoot");
            contextRootProperty.setValue(wbd.getContextRoot());
            em.addElementProperty(contextRootProperty);
        } else {
            isConvergedProperty.setValue("false");
        }  
        em.addElementProperty(isConvergedProperty);
View Full Code Here

     * if so, ensures that its value identifies a valid realm.
     *
     * @param securityService The security-service element from domain.xml
     */
    void configureAuthRealm(SecurityService securityService) {
        ElementProperty prop = vsBean.getElementPropertyByName("authRealm");
        if (prop != null && prop.getValue() != null) {
            if (securityService.getAuthRealmByName(prop.getValue()) != null) {
                authRealmName = prop.getValue();
            } else {
                _logger.log(Level.SEVERE, "vs.invalidAuthRealm",
                            new Object[] { getID(), prop.getValue() });
            }
        }
    }
View Full Code Here

                //SingleSignOn sso = ssoFactory.createSingleSignOnValve();
                String vsName = this.getName();
                SingleSignOn sso = ssoFactory.createSingleSignOnValve(vsName);
               
                // set max idle time if given
                ElementProperty idle =
                    vsBean.getElementPropertyByName(SSO_MAX_IDLE);
                if (idle != null && idle.getValue() != null) {
                    _logger.fine("SSO entry max idle time set to: " +
                                 idle.getValue());
                    int i = Integer.parseInt(idle.getValue());
                    sso.setMaxInactive(i);
                }

                // set expirer thread sleep time if given
                ElementProperty expireTime =
                    vsBean.getElementPropertyByName(SSO_REAP_INTERVAL);
                if (expireTime !=null && expireTime.getValue() != null) {
                    _logger.fine("SSO expire thread interval set to : " +
                                 expireTime.getValue());
                    int i = Integer.parseInt(expireTime.getValue());
                    sso.setReapInterval(i);
                }

                // Remove existing SSO valve (if any), in case of a reconfig
                Valve[] valves = getValves();
View Full Code Here

        if (vsBean == null) {
            return;
        }

        ElementProperty allow = vsBean.getElementPropertyByName(
            "allowRemoteAddress");
        ElementProperty deny = vsBean.getElementPropertyByName(
            "denyRemoteAddress");
        if ((allow != null && allow.getValue() != null)
                || (deny != null && deny.getValue() != null))  {
            remoteAddrValve = new RemoteAddrValve();
        }

        if (allow != null && allow.getValue() != null) {
            _logger.fine("Allowing access to " + getID()+ " from " +
                         allow.getValue());
            remoteAddrValve.setAllow(allow.getValue());
        }

        if (deny != null && deny.getValue() != null) {
            _logger.fine("Denying access to " + getID()+ " from " +
                         deny.getValue());
            remoteAddrValve.setDeny(deny.getValue());
        }

        if (remoteAddrValve != null) {
            // Remove existing RemoteAddrValve (if any), in case of a reconfig
            Valve[] valves = getValves();
View Full Code Here

        if (vsBean == null) {
            return;
        }

        ElementProperty allow = vsBean.getElementPropertyByName(
            "allowRemoteHost");
        ElementProperty deny = vsBean.getElementPropertyByName(
            "denyRemoteHost");
        if ((allow != null && allow.getValue() != null)
                || (deny != null && deny.getValue() != null))  {
            remoteHostValve = new RemoteHostValve();
        }

        if (allow != null && allow.getValue() != null) {
            _logger.fine("Allowing access to " + getID()+ " from " +
                         allow.getValue());
            if (httpProtocol == null || !httpProtocol.isDnsLookupEnabled()) {
                _logger.log(Level.WARNING,
                            "webcontainer.allowRemoteHost.dnsLookupDisabled",
                            getID());
            }
            remoteHostValve.setAllow(allow.getValue());
        }

        if (deny != null && deny.getValue() != null) {
            _logger.fine("Denying access to " + getID()+ " from " +
                         deny.getValue());
            if (httpProtocol == null || !httpProtocol.isDnsLookupEnabled()) {
                _logger.log(Level.WARNING,
                            "webcontainer.denyRemoteHost.dnsLookupDisabled",
                            getID());
            }
            remoteHostValve.setDeny(deny.getValue());
        }

        if (remoteHostValve != null) {
            // Remove existing RemoteHostValve (if any), in case of a reconfig
            Valve[] valves = getValves();
View Full Code Here

     *
     * @return The value of the sso-enabled property for this VirtualServer
     */
    private boolean isSSOEnabled(boolean globalSSOEnabled)
    {
        ElementProperty ssoProperty  =
            vsBean.getElementPropertyByName(Constants.SSO_ENABLED);

        if (ssoProperty == null || ssoProperty.getValue() == null) {
            return globalSSOEnabled;
        } else {
            return ConfigBean.toBoolean(ssoProperty.getValue());
        }
    }
View Full Code Here

TOP

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

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.