Package org.glassfish.resource.common

Examples of org.glassfish.resource.common.PoolInfo


        propList.add(new ConnectorConfigProperty("StatementTimeout",
                adminPool.getStatementTimeoutInSeconds() + "",
                "Statement Timeout",
                "java.lang.String"));

        PoolInfo poolInfo = conConnPool.getPoolInfo();

        propList.add(new ConnectorConfigProperty("PoolMonitoringSubTreeRoot",
                ConnectorsUtil.getPoolMonitoringSubTreeRoot(poolInfo, true) + "",
                "Pool Monitoring Sub Tree Root",
                "java.lang.String"));

        propList.add(new ConnectorConfigProperty("PoolName",
                poolInfo.getName() + "",
                "Pool Name",
                "java.lang.String"));

        if (poolInfo.getApplicationName() != null) {
            propList.add(new ConnectorConfigProperty("ApplicationName",
                    poolInfo.getApplicationName() + "",
                    "Application Name",
                    "java.lang.String"));
        }

        if (poolInfo.getModuleName() != null) {
            propList.add(new ConnectorConfigProperty("ModuleName",
                    poolInfo.getModuleName() + "",
                    "Module name",
                    "java.lang.String"));
        }

        propList.add(new ConnectorConfigProperty("StatementCacheSize",
View Full Code Here


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

        final JdbcConnectionPool adminPool = (JdbcConnectionPool) resource;
        PoolInfo poolInfo = ConnectorsUtil.getPoolInfo(adminPool);

        //Only if pool has already been deployed in this server-instance
        //reconfig this pool

        if (!runtime.isConnectorConnectionPoolDeployed(poolInfo)) {
View Full Code Here

    private void handlePoolRecreation(final ConnectorConnectionPool connConnPool) throws ConnectorRuntimeException {
        debug("[DRC] Pool recreation required");

        final long reconfigWaitTimeout = connConnPool.getDynamicReconfigWaitTimeout();
        PoolInfo poolInfo = new PoolInfo(connConnPool.getName(), connConnPool.getApplicationName(),
                connConnPool.getModuleName());
        final ResourcePool oldPool = runtime.getPoolManager().getPool(poolInfo);

        if (reconfigWaitTimeout > 0) {
View Full Code Here

        Collection<BindableResource> resourcesList ;
        if(!connConnPool.isApplicationScopedResource()){
            resourcesList = domain.getResources().getResourcesOfPool(connConnPool.getName());
        }else{
            PoolInfo poolInfo = connConnPool.getPoolInfo();
            Resources resources = ResourcesUtil.createInstance().getResources(poolInfo);
            resourcesList = resources.getResourcesOfPool(connConnPool.getName());
        }
        for (BindableResource bindableResource : resourcesList) {
View Full Code Here

        this.dynamicReconfigWaitTimeout = dynamicReconfigWaitTimeout;
    }

    public PoolInfo getPoolInfo(){
        if(applicationName != null && moduleName != null){
            return new PoolInfo(name, applicationName, moduleName);
        }else if(applicationName != null){
            return new PoolInfo(name, applicationName);
        }else{
            return new PoolInfo(name);
        }
    }
View Full Code Here

    public static PoolInfo getPoolInfo(ResourcePool resource){

        if(resource.getParent() != null && resource.getParent().getParent() instanceof Application){
            Application application = (Application)resource.getParent().getParent();
            return new PoolInfo(resource.getName(), application.getName());
        }else if(resource.getParent() != null && resource.getParent().getParent() instanceof Module){
            Module module = (Module)resource.getParent().getParent();
            Application application = (Application)module.getParent();
            return new PoolInfo(resource.getName(), application.getName(), module.getName());
        }else{
            return new PoolInfo(resource.getName());
        }
    }
View Full Code Here

    public void resourceEnlisted(Transaction tran, com.sun.appserv.connectors.internal.api.ResourceHandle h)
            throws IllegalStateException {
        ResourceHandle res = (ResourceHandle) h;

        PoolInfo poolInfo = res.getResourceSpec().getPoolInfo();
        try {
            JavaEETransaction j2eeTran = (JavaEETransaction) tran;
            if (poolInfo != null && j2eeTran.getResources(poolInfo) == null) {
                addSyncListener(tran);
            }
View Full Code Here

    }

    public void putbackBadResourceToPool(ResourceHandle h) {

        // notify pool
        PoolInfo poolInfo = h.getResourceSpec().getPoolInfo();
        if (poolInfo != null) {
            ResourcePool pool = poolTable.get(poolInfo);
            if (pool != null) {
                synchronized (pool) {
                    pool.resourceClosed(h);
View Full Code Here

    public void putbackResourceToPool(ResourceHandle h,
                                      boolean errorOccurred) {

        // notify pool
        PoolInfo poolInfo = h.getResourceSpec().getPoolInfo();
        if (poolInfo != null) {
            ResourcePool pool = poolTable.get(poolInfo);
            if (pool != null) {
                if (errorOccurred) {
                    pool.resourceErrorOccurred(h);
View Full Code Here

           Iterator pools = poolTable.values().iterator();
           logFine("Killing all free connections in pools");
           while (pools.hasNext()) {
               ResourcePool pool = (ResourcePool) pools.next();
               if (pool != null) {
                   PoolInfo poolInfo = pool.getPoolStatus().getPoolInfo();
                   try {
                       if (poolInfo != null) {
                           ResourcePool poolToKill = poolTable.get(poolInfo);
                           if (poolToKill != null) {
                               pool.emptyFreeConnectionsInPool();
View Full Code Here

TOP

Related Classes of org.glassfish.resource.common.PoolInfo

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.