Package org.glassfish.resource.common

Examples of org.glassfish.resource.common.PoolInfo


        }
        try
        {
            final ConnectorRuntime connRuntime = mHabitat.getComponent(ConnectorRuntime.class, null);
            //as per the method parameters, this is not applicable for "application-scoped" pools
            PoolInfo poolInfo = new PoolInfo(poolName);
            boolean flushStatus = connRuntime.flushConnectionPool(poolInfo);

            result.put(ConnectorRuntimeAPIProvider.FLUSH_CONNECTION_POOL_KEY, flushStatus);   
        }           
        catch (ConnectorRuntimeException ex)
View Full Code Here


        try
        {
            final ConnectorRuntime connRuntime = mHabitat.getComponent(ConnectorRuntime.class, null);
            //as per the method parameters, this is not applicable for "application-scoped" pools
            PoolInfo poolInfo = new PoolInfo(poolName);
            final Set<String> tableNames = connRuntime.getValidationTableNames(poolInfo);
            result.put(ConnectorRuntimeAPIProvider.VALIDATION_TABLE_NAMES_KEY, tableNames);
        }
        catch (ComponentException e)
        {
View Full Code Here

        }
        try
        {
            final ConnectorRuntime connRuntime = mHabitat.getComponent(ConnectorRuntime.class, null);
            //as per the method parameters, this is not applicable for "application-scoped" pools
            PoolInfo poolInfo = new PoolInfo(poolName);
            final boolean pingStatus = connRuntime.pingConnectionPool(poolInfo);
            result.put(ConnectorRuntimeAPIProvider.PING_CONNECTION_POOL_KEY, pingStatus);
        }
        catch (ResourceException ex)
        {
View Full Code Here

        if(!poolUtil.isValidPool(resources, poolName, scope, report)){
            return;
        }

        PoolInfo poolInfo = new PoolInfo(poolName, applicationName, moduleName);
        try {
            status = connRuntime.pingConnectionPool(poolInfo);
            if (status) {
                report.setActionExitCode(ActionReport.ExitCode.SUCCESS);
            } else {
View Full Code Here

                            ping = Boolean.valueOf(((JdbcConnectionPool)pool).getPing());
                        }else if (pool instanceof ConnectorConnectionPool) {
                            ping = Boolean.valueOf(((ConnectorConnectionPool)pool).getPing());
                        }
                        if(ping){
                            PoolInfo poolInfo = ConnectorsUtil.getPoolInfo(pool);
                            CommandRunner commandRunner = habitat.getComponent(CommandRunner.class);
                            ActionReport report = habitat.getComponent(ActionReport.class);
                            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

            report.setActionExitCode(ActionReport.ExitCode.FAILURE);
            return;
        }

        try {
            PoolInfo poolInfo = new PoolInfo(poolName, applicationName, moduleName);
            _runtime.flushConnectionPool(poolInfo);
            report.setActionExitCode(ActionReport.ExitCode.SUCCESS);
        } catch (ConnectorRuntimeException e) {
            report.setMessage(localStrings.getLocalString("flush.connection.pool.fail",
                    "Failed to flush connection pool {0} due to {1}.", poolName, e.getMessage()));
View Full Code Here

        @HandlerInput(name = "poolName", type = String.class, required = true)})
    public static void pingJms(HandlerContext handlerCtx) {
        try {
            String poolName = (String) handlerCtx.getInputValue("poolName");
            ConnectorRuntime connectorRuntime = GuiUtil.getHabitat().getComponent(ConnectorRuntime.class);
            PoolInfo poolInfo = new PoolInfo(poolName);
            connectorRuntime.pingConnectionPool(poolInfo);
            GuiUtil.prepareAlert("success", GuiUtil.getMessage("msg.PingSucceed"), null);
        } catch (Exception ex) {
            GuiUtil.prepareAlert("error", GuiUtil.getMessage("msg.Error"), ex.getMessage());
        }
View Full Code Here

    public String getDriverProperties() {
        return spec.getDetail(DataSourceSpec.DRIVERPROPERTIES);
    }

    protected PoolInfo getPoolInfo(){
        return new PoolInfo(getPoolName(), getApplicationName(), getModuleName());   
    }
View Full Code Here

            report.setActionExitCode(ActionReport.ExitCode.FAILURE);
            return;
        }

        try {
            PoolInfo poolInfo = new PoolInfo(poolName, applicationName, moduleName);
            _runtime.flushConnectionPool(poolInfo);
            report.setActionExitCode(ActionReport.ExitCode.SUCCESS);
        } catch (ConnectorRuntimeException e) {
            report.setMessage(localStrings.getLocalString("flush.connection.pool.fail",
                    "Flush connection pool for {0} failed", poolName));
View Full Code Here

        if(!poolUtil.isValidPool(resources, poolName, scope, report)){
            return;
        }

        PoolInfo poolInfo = new PoolInfo(poolName, applicationName, moduleName);
        try {
            status = connRuntime.pingConnectionPool(poolInfo);
            if (status) {
                report.setActionExitCode(ActionReport.ExitCode.SUCCESS);
            } else {
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.