users@glassfish.java.net

Glassfish V2: Looking for source create-jdbc-connection-pool by xml

From: <glassfish_at_javadesktop.org>
Date: Sat, 03 Oct 2009 07:15:41 PDT

Hi,

I'm looking for GFv2.1-b60e source that performs the actual creation of jdbc connection pool through an xml file. From CLIDescriptor.xml, com.sun.enterprise.cli.commands.GenericCommand and com.sun.enterprise.cli.commands.S1ASCommand, I hardly find any reference to this. I'm certain that it's buried somewhere down there or on a different package(?)

Could someone shed some light?

GenericCommand:
-----------------------------------------------------------------------------------------------------------------------------

public void runCommand() throws CommandException, CommandValidationException
    {
        if (!validateOptions())
            throw new CommandValidationException("Validation is false");
            //use http connector
        MBeanServerConnection mbsc = getMBeanServerConnection(getHost(), getPort(),
                                                              getUser(), getPassword());
        final String objectName = getObjectName();
        final Object[] params = getParamsInfo();
        final String operationName = getOperationName();
        final String[] types = getTypesInfo();

        try
        {
            //if (System.getProperty("Debug") != null) printDebug(mbsc, objectName);
            Object returnValue = mbsc.invoke(new ObjectName(objectName),
                                             operationName, params, types);
            handleReturnValue(returnValue);
            CLILogger.getInstance().printDetailMessage(getLocalizedString(
                                                       "CommandSuccessful",
                                                       new Object[] {name}));
        }
        catch(Exception e)
        {
            displayExceptionMessage(e);
        }
    }

-----------------------------------------------------------------------------------------------------------------------------




CLIDescriptor.xml
-----------------------------------------------------------------------------------------------------------------------------

<Command name="create-jdbc-connection-pool" classname="com.sun.enterprise.cli.commands.GenericCommand" numberofoperands="1" usage-text="create-jdbc-connection-pool --datasourceclassname classname [--terse=false] [--echo=false] [--interactive=true] [--host localhost] [--port 4848|4849] [--secure | -s] [--user admin_user] [--passwordfile file_name] [--restype res_type] [--steadypoolsize 8] [--maxpoolsize 32] [--maxwait 60000] [--poolresize 2] [--idletimeout 300] [--isolationlevel isolation_level] [--isisolationguaranteed] [--isconnectvalidatereq=false] [--validationmethod auto-commit] [--validationtable tablename] [--failconnection=false] [--allownoncomponentcallers=false] [--nontransactionalconnections=false] [--description text] [--property (name=value)[:name=value]*] jdbc_connection_pool_id">
            <DeprecatedOption>instance</DeprecatedOption>
            <DeprecatedOption>target</DeprecatedOption>
            <RequiredOption name="datasourceclassname"/>
            <ValidOption name="user"/>
            <ValidOption name="password"/>
            <ValidOption name="passwordfile"/>
            <ValidOption name="host"/>
            <ValidOption name="port"/>
            <ValidOption name="secure"/>
            <ValidOption name="interactive"/>
            <ValidOption name="terse"/>
            <ValidOption name="echo"/>
            <ValidOption name="restype"/>
            <ValidOption name="steadypoolsize"/>
            <ValidOption name="maxpoolsize"/>
            <ValidOption name="maxwait"/>
            <ValidOption name="poolresize"/>
            <ValidOption name="idletimeout"/>
            <ValidOption name="validationmethod"/>
            <ValidOption name="validationtable"/>
            <ValidOption name="failconnection"/>
            <ValidOption name="isolationlevel"/>
            <ValidOption name="isisolationguaranteed"/>
            <ValidOption name="isconnectvalidatereq"/>
            <ValidOption name="allownoncomponentcallers"/>
            <ValidOption name="nontransactionalconnections"/>
            <ValidOption name="description"/>
            <ValidOption name="property"/>
            <properties>
                <property name="objectname">
                    <value>com.sun.appserv:type=resources,category=config</value>
                </property>
                <property name="operation">
                    <value>createJdbcConnectionPool</value>
                </property>
                <property name="params">
                    <value>name={#1},fail_all_connections={$failconnection},is_connection_validation_required={$isconnectvalidatereq},idle_timeout_in_seconds={$idletimeout},connection_validation_method={$validationmethod},transaction_isolation_level={$isolationlevel},is_isolation_level_guaranteed={$isisolationguaranteed},max_pool_size={$maxpoolsize},validation_table_name={$validationtable},steady_pool_size={$steadypoolsize},datasource_classname={$datasourceclassname},max_wait_time_in_millis={$maxwait},pool_resize_quantity={$poolresize},description={$description},res_type={$restype},non_transactional_connections={$nontransactionalconnections},allow_non_component_callers={$allownoncomponentcallers}</value>
                    <value>{$property}</value>
                    <value>domain</value>
                </property>
                <property name="paramtypes">
                    <value>javax.management.AttributeList</value>
                    <value>java.util.Properties</value>
                    <value>java.lang.String</value>
                </property>
                <property name="returntype">
                    <value>javax.management.ObjectName</value>
                </property>
                <property name="manpage">
                    <value>com.sun.enterprise.tools.cli.help</value>
                </property>
                <property name="command-type">
                    <value>create</value>
                </property>
            </properties>
        </Command>

-----------------------------------------------------------------------------------------------------------------------------
[Message sent by forum member 'lyeung' (lenming.yeung_at_gmail.com)]

http://forums.java.net/jive/thread.jspa?messageID=366659