Package org.glassfish.resourcebase.resources.api

Examples of org.glassfish.resourcebase.resources.api.PoolInfo


        return false;
    }

    boolean pingConnectionPool(String tmpJMSResource) throws ResourceException
    {
        PoolInfo poolInfo = new PoolInfo(tmpJMSResource);
        return connectorRuntime.pingConnectionPool(poolInfo);
    }
View Full Code Here


                if(resources.getResources() != null){
                    for(Resource resource : resources.getResources()){
                        if(resource instanceof ResourcePool){
                            ResourcePool pool = (ResourcePool)resource;
                            if(Boolean.valueOf(pool.getPing())){
                                PoolInfo poolInfo = ResourceUtil.getPoolInfo(pool);
                                CommandRunner commandRunner = commandRunnerProvider.get();
                                ActionReport report = actionReportProvider.get();
                                CommandRunner.CommandInvocation invocation =
                                        commandRunner.getCommandInvocation("ping-connection-pool", report);
                                ParameterMap params = new ParameterMap();
                                params.add("appname",poolInfo.getApplicationName());
                                params.add("modulename",poolInfo.getModuleName());
                                params.add("DEFAULT", poolInfo.getName());
                                invocation.parameters(params).execute();
                                if(report.getActionExitCode() == ActionReport.ExitCode.SUCCESS){
                                    logger.log(Level.INFO, "app-scoped.ping.connection.pool.success", poolInfo);
                                }else{
                                    Object args[] = new Object[]{poolInfo, report.getFailureCause()};
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

                if(resources.getResources() != null){
                    for(Resource resource : resources.getResources()){
                        if(resource instanceof ResourcePool){
                            ResourcePool pool = (ResourcePool)resource;
                            if(Boolean.valueOf(pool.getPing())){
                                PoolInfo poolInfo = ResourceUtil.getPoolInfo(pool);
                                CommandRunner commandRunner = commandRunnerProvider.get();
                                ActionReport report = actionReportProvider.get();
                                CommandRunner.CommandInvocation invocation =
                                        commandRunner.getCommandInvocation("ping-connection-pool", report, internalSystemAdministrator.getSubject());
                                ParameterMap params = new ParameterMap();
                                params.add("appname",poolInfo.getApplicationName());
                                params.add("modulename",poolInfo.getModuleName());
                                params.add("DEFAULT", poolInfo.getName());
                                invocation.parameters(params).execute();
                                if(report.getActionExitCode() == ActionReport.ExitCode.SUCCESS){
                                    logger.log(Level.INFO, "app-scoped.ping.connection.pool.success", poolInfo);
                                }else{
                                    Object args[] = new Object[]{poolInfo, report.getFailureCause()};
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

           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

            // do nothing
        }
    }

    public void reconfigPoolProperties(ConnectorConnectionPool ccp) throws PoolingException {
        PoolInfo poolInfo = ccp.getPoolInfo();
        ResourcePool pool = getPool( poolInfo );
        if (pool != null ) {
            pool.reconfigurePool( ccp );
        }       
    }
View Full Code Here

    protected void deleteDefaultConnectorConnectionPools() {
        for (ConnectionDefDescriptor aConnectionDefs_ : connectionDefs_) {
            String connectionDefName = aConnectionDefs_.getConnectionFactoryIntf();
            String resourceJndiName = connectorRuntime_.getDefaultPoolName(moduleName_, connectionDefName);
            try {
                PoolInfo poolInfo = new PoolInfo(resourceJndiName);
                connectorRuntime_.deleteConnectorConnectionPool(poolInfo);
            } catch (ConnectorRuntimeException cre) {
                _logger.log(Level.WARNING, "rar.undeployment.default_pool_delete_fail", resourceJndiName);
            }
        }
View Full Code Here

            String connectionDefName = descriptor.getConnectionFactoryIntf();
            String resourceName = connectorRuntime_.getDefaultResourceName(moduleName_, connectionDefName);
            String poolName = connectorRuntime_.getDefaultPoolName(moduleName_, connectionDefName);

            PoolInfo poolInfo = new PoolInfo(poolName);
            ResourceInfo resourceInfo = new ResourceInfo(resourceName);
            connectorRuntime_.createConnectorResource(resourceInfo, poolInfo, null);
            desc_.addDefaultResourceName(resourceName);

            if(_logger.isLoggable(Level.FINE)) {
View Full Code Here

    protected void createDefaultConnectorConnectionPools(boolean useSunRA)
            throws ConnectorRuntimeException {

        for (ConnectionDefDescriptor descriptor : connectionDefs_) {
            String poolName = connectorRuntime_.getDefaultPoolName(moduleName_, descriptor.getConnectionFactoryIntf());
            PoolInfo poolInfo = new PoolInfo(poolName);

            ConnectorDescriptorInfo connectorDescriptorInfo =
                    ConnectorDDTransformUtils.getConnectorDescriptorInfo(descriptor);
            connectorDescriptorInfo.setRarName(moduleName_);
            connectorDescriptorInfo.setResourceAdapterClassName(desc_.getResourceAdapterClass());
View Full Code Here

TOP

Related Classes of org.glassfish.resourcebase.resources.api.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.