Package com.sun.enterprise.config.serverbeans

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


                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

         }
         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

            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

                        (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

     */
    private void checkAndDeletePool(ConnectorResource cr) throws Exception {
        String poolName = cr.getPoolName();
        try {
            ResourceInfo resourceInfo = ConnectorsUtil.getResourceInfo(cr);
            ConnectorConnectionPool ccp = ResourcesUtil.createInstance().getConnectorConnectionPoolOfResource(resourceInfo);
            PoolInfo poolInfo = ConnectorsUtil.getPoolInfo(ccp);

            boolean poolReferred =
                ResourcesUtil.createInstance().isPoolReferredInServerInstance(poolInfo);
            if (!poolReferred) {
View Full Code Here

TOP

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

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.