Package net.xoetrope.optional.data.sql

Examples of net.xoetrope.optional.data.sql.NamedConnectionManager


    XmlElement connEle = source.elementAt( 0 );
    String dbDriver = connEle.getAttribute( "driver" );
    String dbUrl = connEle.getAttribute( "url" );
    dbUrl = checkLocalHsqldb( dbDriver, dbUrl );

    NamedConnectionManager connMgr = ( NamedConnectionManager )NamedConnectionManager.getInstance();
    connMgr = ( NamedConnectionManager )connMgr.reset( connEle.getAttribute( "id" ),
        dbDriver,
        dbUrl,
        connEle.getAttribute( "user" ),
        connEle.getAttribute( "pwd" ) );

    registerDatabaseNode( connEle );
    Vector vRS = source.getChildren();
    int rsCount = vRS.size();
    int numChildren = model.getNumChildren();
    numChildren += rsCount;
    model.setNumChildren( numChildren );
    for ( int i = 1; i < rsCount; i++ ) {
      XmlElement rsEle = ( XmlElement )vRS.elementAt( i );
      if ( rsEle.getName().compareTo( "Connection" ) == 0 ) {
        String extraDbDriver = rsEle.getAttribute( "driver" );
        String extraDbUrl = rsEle.getAttribute( "url" );
        extraDbUrl = checkLocalHsqldb( extraDbDriver, extraDbUrl );
        connMgr.addConnection( rsEle.getAttribute( "id" ),
                               extraDbDriver,
                               extraDbUrl,
                               rsEle.getAttribute( "user" ),
                               rsEle.getAttribute( "pwd" ) );
      }
View Full Code Here

TOP

Related Classes of net.xoetrope.optional.data.sql.NamedConnectionManager

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.