Package com.sun.enterprise.deployment

Examples of com.sun.enterprise.deployment.EnvironmentProperty


                sb.append(connectorDescriptorInfo_.getResourceAdapterClassName());
                sb.append("\nconnection def name: ");
                sb.append(connectorDescriptorInfo_.getConnectionDefinitionName());
                sb.append("\nMCF Config properties-> ");
                for (Object o : connectorDescriptorInfo_.getMCFConfigProperties()) {
                    EnvironmentProperty ep = (EnvironmentProperty) o;
                    sb.append(ep.getName());
                    sb.append(":");
                    sb.append(("password".equalsIgnoreCase(ep.getName()) ?
                            "****" : ep.getValue()));
                    sb.append("\n");
                }
            }
            if (securityMaps != null) {
                sb.append("SecurityMaps -> {");
View Full Code Here


        String destName = getPhysicalDestinationFromConfiguration(jndiName);
       
        //1.3 jndi-name ==> 1.4 setDestination
        descriptor_.putRuntimeActivationConfigProperty(
                new EnvironmentProperty(DESTINATION,
                        destName, null));
 
       
        //1.3 (standard) destination-type == 1.4 setDestinationType
        //XXX Do we really need this???
        if (descriptor_.getDestinationType() != null &&
                !"".equals(descriptor_.getDestinationType())) {
            descriptor_.putRuntimeActivationConfigProperty(
                    new EnvironmentProperty(DESTINATION_TYPE,
                            descriptor_.getDestinationType(), null));
        } else {
            /*
             * If destination type is not provided by the MDB component
             * [typically used by EJB3.0 styled MDBs which create MDBs without
             * a destination type activation-config property] and the MDB is for
             * the default JMS RA, attempt to infer the destination type by trying
             * to find out if there has been any JMS destination resource already
             * defined for default JMS RA. This is a best attempt guess and if there
             * are no JMS destination resources/admin-objects defined, AS would pass
             * the properties as defined by the MDB.
             */
            ConfigBean[] cb;
            try {
                cb = ResourcesUtil.createInstance().getEnabledAdminObjectResources(
                        ConnectorConstants.DEFAULT_JMS_ADAPTER);
                for (int i = 0; i < cb.length; i++) {
                    AdminObjectResource aor = (AdminObjectResource) cb[i];
                    if (aor.getJndiName().equals(jndiName)) {
                        descriptor_.putRuntimeActivationConfigProperty(
                                new EnvironmentProperty(DESTINATION_TYPE,
                                        aor.getResType(), null));
                        logger.log(Level.INFO, "endpoint.determine.destinationtype", new
                                Object[]{aor.getResType() , aor.getJndiName() , descriptor_.getName()});                       
                    }
                }
            } catch (ConfigException e) {
               
            }
        }
       
       
        //1.3 durable-subscription-name == 1.4 setSubscriptionName
        descriptor_.putRuntimeActivationConfigProperty(
                new EnvironmentProperty(SUBSCRIPTION_NAME,
                        descriptor_.getDurableSubscriptionName(), null));

        String mdbCF = null;
  try {
      mdbCF = descriptor_.getIASEjbExtraDescriptors().
                    getMdbConnectionFactory().getJndiName();
  } catch(NullPointerException ne ) {
      // Dont process connection factory.
  }

        if (mdbCF != null && mdbCF != "") {
      setValuesFromConfiguration(mdbCF, descriptor_);
        }

        // a null object is passes as a PoolDescriptor during recovery.
        // See com/sun/enterprise/resource/ResourceInstaller
       
        if (poolDescriptor != null) {
        descriptor_.putRuntimeActivationConfigProperty
            (new EnvironmentProperty (MAXPOOLSIZE, ""+
                 poolDescriptor.getMaxPoolSize(),"", "java.lang.Integer" ));
        descriptor_.putRuntimeActivationConfigProperty
            (new EnvironmentProperty (MINPOOLSIZE,""+
                 poolDescriptor.getSteadyPoolSize(),"", "java.lang.Integer"));
        descriptor_.putRuntimeActivationConfigProperty
            (new EnvironmentProperty (RESIZECOUNT,""+
                 poolDescriptor.getPoolResizeQuantity(),"", "java.lang.Integer"));
        descriptor_.putRuntimeActivationConfigProperty
            (new EnvironmentProperty (RESIZETIMEOUT,""+
                 poolDescriptor.getPoolIdleTimeoutInSeconds(),"", "java.lang.Integer"));
         /**
          * The runtime activation config property holds all the
          * vendor specific properties, unfortunately the vendor
          * specific way of configuring exception count and the
          * standard way of configuring redelivery attempts is
          * through the same property REDELIVERYCOUNT . So, we first
          * check if the user (MDB assember) has configured a value
          * if not we set the one from mdb-container props
          * We have to check for both cases here because it has been
          * documented as "endpointExceptionRedeliveryAttempts" but
          * used in the code as "EndpointExceptionRedeliveryAttempts"
          */
         if ((descriptor_.getActivationConfigValue
                          (REDELIVERYCOUNT) == null)
                && (descriptor_.getActivationConfigValue
                              (LOWERCASE_REDELIVERYCOUNT) == null))  {
             descriptor_.putRuntimeActivationConfigProperty
               (new EnvironmentProperty (REDELIVERYCOUNT,""+
                         MdbContainerProps.getMaxRuntimeExceptions(),"", "java.lang.Integer"));
         }
        }
       
        //Set SE/EE specific MQ-RA ActivationSpec properties
View Full Code Here

     * @throws ConfigException
     */
    private void setClusterActivationSpecProperties(EjbMessageBeanDescriptor
                    descriptor_) throws ConfigException {
        //Set MDB Identifier in a clustered instance.
        descriptor_.putRuntimeActivationConfigProperty(new
                        EnvironmentProperty(MDBIDENTIFIER,""+
                        getMDBIdentifier(descriptor_),"MDB Identifier",
                        "java.lang.String"));
        logFine("CLUSTERED instance - setting MDB identifier as" +
                        getMDBIdentifier(descriptor_));               
View Full Code Here

      String val = prop.getValue();
      if (val == null || val.equals("")) {
    continue;
      }
            descriptor_.putRuntimeActivationConfigProperty(
                new EnvironmentProperty(name, val, null));
  }

    }
View Full Code Here

        ConnectionDefDescriptor cdd =
                connectorDescriptor.getConnectionDefinitionByCFType(
                connectionDefName);
        Set configProps = cdd.getConfigProperties();
        for(Iterator iter = configProps.iterator(); iter.hasNext();) {
            EnvironmentProperty envProp= (EnvironmentProperty)iter.next();
            String prop = envProp.getName().toUpperCase();
           
            if("USER".equals( prop ) || "USERNAME".equals( prop )) {
               
                userPassword[0]=envProp.getValue();
            } else if( "PASSWORD".equals(prop) ) {
                userPassword[1]=envProp.getValue();
            }
           
        }
       
        if ( userPassword[0] != null && ! "".equals(userPassword[0].trim()) ) {
View Full Code Here

                ServletFilterDescriptor filter = (ServletFilterDescriptor) filterEnum.nextElement();
                Vector epVector = filter.getInitializationParameters();

                if (epVector.size() != 0) {
                    for ( int i = 0; i < epVector.size(); i++) {
                        EnvironmentProperty ep = (EnvironmentProperty)epVector.elementAt(i);
                        String epValue = ep.getValue();
                        if (epValue.length() != 0) {
                            onePassed=true;
                            addGoodDetails(result, compName);
                            result.addGoodDetails(smh.getLocalString
                                              ("com.sun.enterprise.tools.verifier.tests.web.FilterInitParamValue" + ".passed",
View Full Code Here

    ServletFilterDescriptor filter = (ServletFilterDescriptor)filterEnum.nextElement();
                HashSet<String> envSet = new HashSet<String>();
                Vector epVector = filter.getInitializationParameters();             
                for ( int i = 0; i < epVector.size(); i++) {
                   
                    EnvironmentProperty ep = (EnvironmentProperty)epVector.elementAt(i);
                    String epName = ep.getName();
                   
                    if (epName.length() == 0) {
                        oneFailed = true;
      result.addErrorDetails(smh.getLocalString
             ("tests.componentNameConstructor",
View Full Code Here

        if (!descriptor.getEnvironmentProperties().isEmpty()) {
            // The value must be a string that is valid for the
            // constructor of the specified type that takes a single String parameter
            for (Iterator itr = descriptor.getEnvironmentProperties().iterator();
                 itr.hasNext();) {
                EnvironmentProperty nextEnvironmentProperty =
                        (EnvironmentProperty) itr.next();
                if ((nextEnvironmentProperty.getValue() != null)
                        && (nextEnvironmentProperty.getValue().length() > 0)) {
                    if(!validEnvType(nextEnvironmentProperty)) {
                        addErrorDetails(result, compName);
                        result.failed(smh.getLocalString
                                (getClass().getName() + ".failed",
                                "Error: Environment entry name [ {0} ] does not have" +
                                " valid value [ {1} ] for constructor of the specified type" +
                                " [ {2} ] that takes a single String parameter within bean [ {3} ]",
                                new Object[] {nextEnvironmentProperty.getName(),
                                nextEnvironmentProperty.getValue(), nextEnvironmentProperty.getType(),
                                descriptor.getName()}));
                    }
                }
            }
        }
View Full Code Here

        if (!descriptor.getEnvironmentProperties().isEmpty()) {
            // environment entry value type must be one of the following Java types:
            // String, Integer, Boolean, Double, Byte, Short, Long, and Float.
            for (Iterator itr = descriptor.getEnvironmentProperties().iterator();
                 itr.hasNext();) {
                EnvironmentProperty nextEnvironmentProperty =
                        (EnvironmentProperty) itr.next();
                String envType = nextEnvironmentProperty.getType();
                if (!((envType.equals("java.lang.String")) ||
                        (envType.equals("java.lang.Integer")) ||
                        (envType.equals("java.lang.Boolean")) ||
                        (envType.equals("java.lang.Double")) ||
                        (envType.equals("java.lang.Byte")) ||
                        (envType.equals("java.lang.Short")) ||
                        (envType.equals("java.lang.Long")) ||
                        (envType.equals("java.lang.Character")) ||
                        (envType.equals("java.lang.Float")))) {
                    addErrorDetails(result, compName);
                    result.failed(smh.getLocalString
                            (getClass().getName() + ".failed",
                            "Error: Environment entry value [ {0} ] does not have" +
                            " valid value type [ {1} ] within bean [ {2} ]",
                            new Object[] {nextEnvironmentProperty.getName(),envType, descriptor.getName()}));
                }
            }
        }
        if(result.getStatus() != Result.FAILED) {
            addGoodDetails(result, compName);
View Full Code Here

        doDescriptionProcessing(mdAn.description(), ejbMsgBeanDesc);
        doMappedNameProcessing(mdAn.mappedName(), ejbMsgBeanDesc);

        for (ActivationConfigProperty acProp : mdAn.activationConfig()) {
            EnvironmentProperty envProp = new EnvironmentProperty(
                    acProp.propertyName(), acProp.propertyValue(), "");
                                                // with empty description
            // xml override
            if (ejbMsgBeanDesc.getActivationConfigValue(envProp.getName()) == null) {
                ejbMsgBeanDesc.putActivationConfigProperty(envProp);
            }
        }

        return procResult;
View Full Code Here

TOP

Related Classes of com.sun.enterprise.deployment.EnvironmentProperty

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.