Examples of ConnectorConnectionPool


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

    public boolean belongToRar(String rarName,ConnectorResource cr) {
        if(cr == null || rarName== null) {
            return false;
        }
        String poolName = cr.getPoolName();
        ConnectorConnectionPool ccp = res.getConnectorConnectionPoolByName(poolName);
        if (ccp == null) {
            return false;
        }
        return belongToRar(rarName, ccp);
    }
View Full Code Here

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

                list.add(adminObject.getJndiName());
            }

            for (Object c: connectorResources) {
                ConnectorResource cr = (ConnectorResource) c;
                ConnectorConnectionPool cp = (ConnectorConnectionPool) domain.getResources().getResourceByName(ConnectorConnectionPool.class, cr.getPoolName());

                if (cp  != null && JMSRA.equalsIgnoreCase(cp.getResourceAdapterName())){
                      list.add(cr.getJndiName());
                }
               //if(QUEUE_CF.equals(cp.getConnectionDefinitionName()) || TOPIC_CF.equals(cp.getConnectionDefinitionName())
                 //      || UNIFIED_CF.equals(cp.getConnectionDefinitionName()))

            }
            if (list.isEmpty()) {
                final ActionReport.MessagePart part = report.getTopMessagePart().addChild();
                part.setMessage(localStrings.getLocalString("nothingToList",
                    "Nothing to list."));
                extraProperties.put("jmsResources", list);
            } else {

               List <String> resourceList = null;
         //if("domain".equalsIgnoreCase(target))
    if(CommandTarget.DOMAIN.isValid(habitat, target))
      resourceList=list;
         else 
                   resourceList = filterListForTarget(list);
               if(resourceList == null)
                    resourceList = list;


                for (String jndiName : resourceList) {
                    final ActionReport.MessagePart part = report.getTopMessagePart().addChild();
                    part.setMessage(jndiName);
                }
                extraProperties.put("jmsResources", resourceList);
            }
            report.setExtraProperties(extraProperties);
        } catch (Exception e) {
            report.setMessage(localStrings.getLocalString("list.jms.resources.fail",
                    "Unable to list JMS Resources") + " " + e.getLocalizedMessage());
            report.setActionExitCode(ActionReport.ExitCode.FAILURE);
            report.setFailureCause(e);
            return;
        }
      } else {
          if(resourceType.equals(TOPIC_CF) || resourceType.equals(QUEUE_CF) || resourceType.equals(UNIFIED_CF)){


            for (Object c : connectorResources) {
               ConnectorResource cr = (ConnectorResource)c;
               ConnectorConnectionPool cp = (ConnectorConnectionPool) domain.getResources().getResourceByName(ConnectorConnectionPool.class, cr.getPoolName());
               if(cp != null && resourceType.equals(cp.getConnectionDefinitionName()) && JMSRA.equalsIgnoreCase(cp.getResourceAdapterName()))
                    list.add(cp.getName());
            }
          }  else if (resourceType.equals(TOPIC) || resourceType.equals(QUEUE))
          {
                for (Object r : adminObjectResources) {
                    AdminObjectResource res = (AdminObjectResource)r;
View Full Code Here

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

         }
         return securityMaps;
    }

    ConnectorConnectionPool getPool(String poolName, Collection<ConnectorConnectionPool> ccPools) {
         ConnectorConnectionPool pool = null;
         for (ConnectorConnectionPool ccp : ccPools) {
            if (ccp.getName().equals(poolName)) {
                pool = ccp;
                break;
            }
View Full Code Here

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

            return;
        }

        try {

            final ConnectorConnectionPool pool = getPool(poolName, ccPools);
            // delete connector-security-map
            ConfigSupport.apply(new SingleConfigCode<ConnectorConnectionPool>() {

                public Object run(ConnectorConnectionPool param) throws PropertyVetoException,
                        TransactionFailure {
View Full Code Here

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

                        (Integer.parseInt(steadyPoolSize))) {
                    //max pool size fault
                    return false;
                }
            } else if(pool instanceof ConnectorConnectionPool) {
                ConnectorConnectionPool connPool = (ConnectorConnectionPool) pool;
                String maxPoolSize = connPool.getMaxPoolSize();
                String steadyPoolSize = connPool.getSteadyPoolSize();
                if(steadyPoolSize == null) {
                    steadyPoolSize = Constants.DEFAULT_STEADY_POOL_SIZE;
                }
                if (maxPoolSize == null) {
                    maxPoolSize = Constants.DEFAULT_MAX_POOL_SIZE;
View Full Code Here

Examples of com.sun.enterprise.connectors.ConnectorConnectionPool

        _logger.fine(" JdbcConnectionPoolDeployer - actualDeployResource : " + resource );
        com.sun.enterprise.config.serverbeans.JdbcConnectionPool adminPool =
            (com.sun.enterprise.config.serverbeans.JdbcConnectionPool) resource;
       
 
  ConnectorConnectionPool connConnPool = createConnectorConnectionPool(
          adminPool);   
        
 
  //now do internal book keeping
  try {
View Full Code Here

Examples of com.sun.enterprise.connectors.ConnectorConnectionPool

                            + " is not referred or not yet created in this server "
                            + "instance and hence pool redeployment is ignored");
            return;
        }
       
  ConnectorConnectionPool connConnPool = createConnectorConnectionPool(
          adminPool);   

        if (connConnPool == null) {
      throw new ConnectorRuntimeException("Unable to create ConnectorConnectionPool"+
              "from JDBC connection pool");
View Full Code Here

Examples of com.sun.enterprise.connectors.ConnectorConnectionPool

  int txSupport = getTxSupport( moduleName );

  ConnectorDescriptor connDesc = createConnectorDescriptor( moduleDir );

        //Create the connector Connection Pool object from the configbean object
        ConnectorConnectionPool conConnPool = new ConnectorConnectionPool(
          adminPool.getName() );

        conConnPool.setTransactionSupport( txSupport );
        setConnectorConnectionPoolAttributes( conConnPool, adminPool );   
 
 

  //Initially create the ConnectorDescriptor
        ConnectorDescriptorInfo connDescInfo =
      createConnectorDescriptorInfo( connDesc, moduleName );


        connDescInfo.setMCFConfigProperties(
      getMCFConfigProperties( adminPool, conConnPool, connDesc ) );
       
        //since we are deploying a 1.0 RAR, this is null
  connDescInfo.setResourceAdapterConfigProperties((Set) null );

  conConnPool.setConnectorDescriptorInfo( connDescInfo );

  return conConnPool;

    }
View Full Code Here

Examples of com.sun.enterprise.connectors.ConnectorConnectionPool

          this.redeployResource(resource);
          return;
        }
         
      
        final ConnectorConnectionPool ccp =
            getConnectorConnectionPool(domainCcp);
        final String defName = domainCcp.getConnectionDefinitionName();
        final ConnectorRuntime crt = ConnectorRuntime.getRuntime();
       
        if (domainCcp.isEnabled()) {
View Full Code Here

Examples of com.sun.enterprise.connectors.ConnectorConnectionPool

       

        String rarName = domainCcp.getResourceAdapterName();
        String connDefName = domainCcp.getConnectionDefinitionName();
        ElementProperty[] props = domainCcp.getElementProperty();
        ConnectorConnectionPool ccp = getConnectorConnectionPool(domainCcp);
        populateConnectorConnectionPool( ccp, connDefName, rarName, props,
          securityMaps);
 
        boolean poolRecreateRequired = false;
        try
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.