Package org.glassfish.jdbc.config

Examples of org.glassfish.jdbc.config.JdbcConnectionPool$Duck


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

        JdbcConnectionPool jdbcCp = new MyJdbcConnectionPool(desc, poolName);

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

        //deploy resource
View Full Code Here


        //undeploy resource
        JdbcResource jdbcResource = new MyJdbcResource(poolName, resourceName);
        getDeployer(jdbcResource).undeployResource(jdbcResource);

        //undeploy pool
        JdbcConnectionPool jdbcCp = new MyJdbcConnectionPool(desc, poolName);
        getDeployer(jdbcCp).undeployResource(jdbcCp);

        desc.setDeployed(false);
    }
View Full Code Here

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

        JdbcConnectionPool jdbcCp = new MyJdbcConnectionPool(desc, poolName);

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

        //deploy resource
View Full Code Here

        //undeploy resource
        JdbcResource jdbcResource = new MyJdbcResource(poolName, resourceName);
        getDeployer(jdbcResource).undeployResource(jdbcResource);

        //undeploy pool
        JdbcConnectionPool jdbcCp = new MyJdbcConnectionPool(desc, poolName);
        getDeployer(jdbcCp).undeployResource(jdbcCp);

        desc.setDeployed(false);
    }
View Full Code Here

            }

            // delete jdbc connection pool
            if (ConfigSupport.apply(new SingleConfigCode<Resources>() {
                public Object run(Resources param) throws PropertyVetoException, TransactionFailure {
                    JdbcConnectionPool cp = (JdbcConnectionPool)
                            ConnectorsUtil.getResourceByName(resources, JdbcConnectionPool.class, poolName);
                    return param.getResources().remove(cp);
                }
            }, resources) == null) {
                String msg = localStrings.getLocalString("delete.jdbc.connection.pool.notfound",
View Full Code Here

        return status;
    }

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

        return newResource;
    }

    private JdbcConnectionPool createConfigBean(Resources param, Properties properties) throws PropertyVetoException,
            TransactionFailure {
        JdbcConnectionPool newResource = param.createChild(JdbcConnectionPool.class);
        newResource.setWrapJdbcObjects(wrapJDBCObjects);
        if (validationtable != null)
            newResource.setValidationTableName(validationtable);
        newResource.setValidateAtmostOncePeriodInSeconds(validateAtmostOncePeriod);
        if (isolationlevel != null) {
            newResource.setTransactionIsolationLevel(isolationlevel);
        }
        newResource.setSteadyPoolSize(steadypoolsize);
        if(statementTimeout != null){
            newResource.setStatementTimeoutInSeconds(statementTimeout);
        }
        if (restype != null) {
            newResource.setResType(restype);
        }
        newResource.setPoolResizeQuantity(poolresize);
        newResource.setNonTransactionalConnections(nontransactionalconnections);
        newResource.setMaxWaitTimeInMillis(maxwait);
        newResource.setMaxPoolSize(maxpoolsize);
        if(maxConnectionUsageCount != null){
            newResource.setMaxConnectionUsageCount(maxConnectionUsageCount);
        }
        if(matchConnections != null){
            newResource.setMatchConnections(matchConnections);
        }
        if(lazyConnectionEnlistment != null){
            newResource.setLazyConnectionEnlistment(lazyConnectionEnlistment);
        }
        if(lazyConnectionAssociation != null){
            newResource.setLazyConnectionAssociation(lazyConnectionAssociation);
        }
        newResource.setIsIsolationLevelGuaranteed(isisolationguaranteed);
        newResource.setIsConnectionValidationRequired(isconnectvalidatereq);
        newResource.setIdleTimeoutInSeconds(idletimeout);
        newResource.setFailAllConnections(failconnection);
        if (datasourceclassname != null) {
            newResource.setDatasourceClassname(datasourceclassname);
        }
        newResource.setConnectionValidationMethod(validationmethod);
        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(allownoncomponentcallers != null){
            newResource.setAllowNonComponentCallers(allownoncomponentcallers);
        }
        if(statementcachesize != null){
            newResource.setStatementCacheSize(statementcachesize);
        }
        if (validationclassname != null) {
            newResource.setValidationClassname(validationclassname);
        }
        if(initsql != null){
            newResource.setInitSql(initsql);
        }
        if (sqltracelisteners != null) {
            newResource.setSqlTraceListeners(sqltracelisteners);
        }
        if(pooling != null){
            newResource.setPooling(pooling);
        }
        if(ping != null){
            newResource.setPing(ping);
        }
        if (driverclassname != null) {
            newResource.setDriverClassname(driverclassname);
        }
        if (description != null) {
            newResource.setDescription(description);
        }
        newResource.setName(jdbcconnectionpoolid);
        if (properties != null) {
            for (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

                (ResourcePool) ConnectorsUtil.getResourceByName(resources, ResourcePool.class, poolName);
        if(pool instanceof ConnectorConnectionPool){
            ConnectorConnectionPool ccp = (ConnectorConnectionPool)pool;
            poolingEnabled = Boolean.valueOf(ccp.getPooling());
        }else{
            JdbcConnectionPool ccp = (JdbcConnectionPool)pool;
            poolingEnabled = Boolean.valueOf(ccp.getPooling());
        }

        if(!poolingEnabled){
            String i18nMsg = localStrings.getLocalString("flush.connection.pool.pooling.disabled",
                    "Attempt to Flush Connection Pool failed because Pooling is disabled for pool : {0}", poolName);
View Full Code Here

        //they would be available only to server instances that have a resoruce-ref
        //that maps to a pool. So deploy resource would not be called during
        //JDBC connection pool creation. The actualDeployResource method
        //below is invoked by JdbcResourceDeployer when a resource-ref for a
        //resource that is pointed to this pool is added to a server instance
        JdbcConnectionPool jcp = (JdbcConnectionPool)resource;
        PoolInfo poolInfo = new PoolInfo(jcp.getName(), applicationName, moduleName);
        if(_logger.isLoggable(Level.FINE)){
            _logger.fine(" JdbcConnectionPoolDeployer - deployResource : " + poolInfo + " calling actualDeploy");
        }
        actualDeployResource(resource, poolInfo);
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public void deployResource(Object resource) throws Exception {

        JdbcConnectionPool jcp = (JdbcConnectionPool)resource;
        PoolInfo poolInfo = ConnectorsUtil.getPoolInfo(jcp);
        actualDeployResource(resource, poolInfo);
    }
View Full Code Here

TOP

Related Classes of org.glassfish.jdbc.config.JdbcConnectionPool$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.