Package org.glassfish.connectors.config

Examples of org.glassfish.connectors.config.ConnectorConnectionPool$Duck


            }

            // delete connector connection pool
            if (ConfigSupport.apply(new SingleConfigCode<Resources>() {
                public Object run(Resources param) throws PropertyVetoException, TransactionFailure {
                    ConnectorConnectionPool cp = (ConnectorConnectionPool)
                            ConnectorsUtil.getResourceByName(domain.getResources(),ConnectorConnectionPool.class, poolname);
                    if(cp != null){
                        return param.getResources().remove(cp);
                    }
                    // not found
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

         }
         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 status;
    }

    private ConnectorConnectionPool createResource(Resources param, Properties properties) throws PropertyVetoException,
            TransactionFailure {
        ConnectorConnectionPool newResource = createConfigBean(param, properties);
        param.getResources().add(newResource);
        return newResource;
    }
View Full Code Here

    }


    private ConnectorConnectionPool createConfigBean(Resources param, Properties properties) throws PropertyVetoException,
            TransactionFailure {
        ConnectorConnectionPool newResource = param.createChild(ConnectorConnectionPool.class);

        newResource.setResourceAdapterName(raname);
        newResource.setConnectionDefinitionName(connectiondefinition);
        if(validateAtmostOncePeriod != null){
            newResource.setValidateAtmostOncePeriodInSeconds(validateAtmostOncePeriod);
        }
        newResource.setSteadyPoolSize(steadypoolsize);
        newResource.setPoolResizeQuantity(poolresize);
        newResource.setMaxWaitTimeInMillis(maxwait);
        newResource.setMaxPoolSize(maxpoolsize);
        if(maxConnectionUsageCount != null){
            newResource.setMaxConnectionUsageCount(maxConnectionUsageCount);
        }
        newResource.setMatchConnections(matchConnections);
        if(lazyConnectionEnlistment != null){
            newResource.setLazyConnectionEnlistment(lazyConnectionEnlistment);
        }
        if(lazyConnectionAssociation != null){
            newResource.setLazyConnectionAssociation(lazyConnectionAssociation);
        }
        if(isconnectvalidatereq != null){
            newResource.setIsConnectionValidationRequired(isconnectvalidatereq);
        }
        newResource.setIdleTimeoutInSeconds(idletimeout);
        newResource.setFailAllConnections(failconnection);
        if(connectionLeakTimeout != null){
            newResource.setConnectionLeakTimeoutInSeconds(connectionLeakTimeout);
        }
        if(connectionLeakReclaim != null){
            newResource.setConnectionLeakReclaim(connectionLeakReclaim);
        }
        if(connectionCreationRetryInterval != null){
            newResource.setConnectionCreationRetryIntervalInSeconds(connectionCreationRetryInterval);
        }
        if(connectionCreationRetryAttempts != null){
            newResource.setConnectionCreationRetryAttempts(connectionCreationRetryAttempts);
        }
        if(associateWithThread != null){
            newResource.setAssociateWithThread(associateWithThread);
        }
        if(pooling != null){
            newResource.setPooling(pooling);
        }
        if(ping != null){
            newResource.setPing(ping);
        }
        if (transactionSupport != null) {
            newResource.setTransactionSupport(transactionSupport);
        }
        if (description != null) {
            newResource.setDescription(description);
        }
        newResource.setName(poolname);
        if (properties != null) {
            for ( java.util.Map.Entry e : properties.entrySet()) {
                Property prop = newResource.createChild(Property.class);
                prop.setName((String)e.getKey());
                prop.setValue((String)e.getValue());
                newResource.getProperty().add(prop);
            }
        }
        return newResource;
    }
View Full Code Here

        if (res == null) {
            String msg = sm.getString("ajra.mdb_cf_not_created", cfName);
        throw new ConnectorRuntimeException(msg);
        }

        ConnectorConnectionPool ccp = (ConnectorConnectionPool)
             ResourcesUtil.createInstance().getResource(res.getPoolName(), appName, moduleName, ConnectorConnectionPool.class);
            //rbeans.getResourceByName(ConnectorConnectionPool.class, res.getPoolName());

        ep = ccp.getProperty();
        } catch(Exception ce) {
        String msg = sm.getString("ajra.mdb_cf_not_created", cfName);
        ConnectorRuntimeException cre = new ConnectorRuntimeException( msg );
        cre.initCause( ce );
            throw cre;
View Full Code Here

        if(_logger.isLoggable(Level.FINE)) {
            _logger.log(Level.FINE, "JMSConnectionFactoryDefinitionDeployer.deployResource() : pool-name [" + poolName + "], " +
                    " resource-name ["+resourceName+"]");
        }

        ConnectorConnectionPool connectorCp = new MyJMSConnectionFactoryConnectionPool(desc, poolName);

        //deploy pool
        getDeployer(connectorCp).deployResource(connectorCp);

        //deploy resource
View Full Code Here

        //undeploy resource
        ConnectorResource connectorResource = new MyJMSConnectionFactoryResource(poolName, resourceName);
        getDeployer(connectorResource).undeployResource(connectorResource);

        //undeploy pool
        ConnectorConnectionPool connectorCp = new MyJMSConnectionFactoryConnectionPool(desc, poolName);
        getDeployer(connectorCp).undeployResource(connectorCp);

    }
View Full Code Here

        if (res == null) {
            String msg = sm.getString("ajra.mdb_cf_not_created", cfName);
        throw new ConnectorRuntimeException(msg);
        }

        ConnectorConnectionPool ccp = (ConnectorConnectionPool)
             ResourcesUtil.createInstance().getResource(res.getPoolName(), appName, moduleName, ConnectorConnectionPool.class);
            //rbeans.getResourceByName(ConnectorConnectionPool.class, res.getPoolName());

        ep = ccp.getProperty();
        } catch(Exception ce) {
        String msg = sm.getString("ajra.mdb_cf_not_created", cfName);
        ConnectorRuntimeException cre = new ConnectorRuntimeException( msg );
        cre.initCause( ce );
            throw cre;
View Full Code Here

        if(_logger.isLoggable(Level.FINE)) {
            _logger.log(Level.FINE, "JMSConnectionFactoryDefinitionDeployer.deployResource() : pool-name [" + poolName + "], " +
                    " resource-name ["+resourceName+"]");
        }

        ConnectorConnectionPool connectorCp = new MyJMSConnectionFactoryConnectionPool(desc, poolName);

        //deploy pool
        getDeployer(connectorCp).deployResource(connectorCp);

        //deploy resource
View Full Code Here

TOP

Related Classes of org.glassfish.connectors.config.ConnectorConnectionPool$Duck

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.