Examples of DriverManagerConnectionProvider


Examples of com.et.ar.connections.DriverManagerConnectionProvider

                pp.setProperty("pool_size", prop.getProperty(bc+".pool_size"));
                String testTable = prop.getProperty(bc+".test_table");
                if (testTable != null){
                    pp.setProperty("test_table", testTable);
                }
                ConnectionProvider cp = new DriverManagerConnectionProvider(pp);
                getConnections().put(bc, cp);
               
                String adapterClassName = prop.getProperty(bc+".adapter_class");
                if (adapterClassName != null){
                    Class<?> adapterClass = Class.forName(adapterClassName);
View Full Code Here

Examples of org.hibernate.connection.DriverManagerConnectionProvider

    tx.commit();
    s.close();
  }

  public void testUserProvidedConnection() throws Exception {
    ConnectionProvider dcp = new DriverManagerConnectionProvider();
    dcp.configure( Environment.getProperties() );
    Session s = getSessions().openSession( dcp.getConnection() );
    Transaction tx = s.beginTransaction();
    s.createQuery( "from Fo" ).list();
    tx.commit();
    Connection c = s.disconnect();
    assertTrue( c!=null );
View Full Code Here

Examples of org.hibernate.connection.DriverManagerConnectionProvider

     * @param props
     * @throws org.apache.tools.ant.BuildException
     *
     */
    private void testDBConnection(Properties props) {
        DriverManagerConnectionProvider dmcp = new DriverManagerConnectionProvider();
        try {
            dmcp.configure(props);
            Connection con = dmcp.getConnection();
            dmcp.closeConnection(con);
        } catch (HibernateException e) {
            log.error(e);
            throw new RuntimeException(DATABASE_CONNECTION_NOT_VALID + " " + CHECK_PROPS + " " + e.getMessage(), e);
        } catch (SQLException e) {
            log.error(e);
View Full Code Here

Examples of org.hibernate.connection.DriverManagerConnectionProvider

     * @param props
     * @throws org.apache.tools.ant.BuildException
     *
     */
    private void testDBConnection(Properties props) {
        DriverManagerConnectionProvider dmcp = new DriverManagerConnectionProvider();
        try {
            dmcp.configure(props);
            Connection con = dmcp.getConnection();
            dmcp.closeConnection(con);
        } catch (HibernateException e) {
            log.error(e);
            throw new RuntimeException(DATABASE_CONNECTION_NOT_VALID + " " + CHECK_PROPS + " " + e.getMessage(), e);
        } catch (SQLException e) {
            log.error(e);
View Full Code Here

Examples of org.hibernate.connection.DriverManagerConnectionProvider

    s.close();

  }

  public void testUserProvidedConnection() throws Exception {
    ConnectionProvider dcp = new DriverManagerConnectionProvider();
    dcp.configure( Environment.getProperties() );
    Session s = getSessions().openSession( dcp.getConnection() );
    Transaction tx = s.beginTransaction();
    s.find("from Fo");
    tx.commit();
    Connection c = s.disconnect();
    assertTrue( c!=null );
View Full Code Here

Examples of org.hibernate.connection.DriverManagerConnectionProvider

    s.close();

  }

  public void testUserProvidedConnection() throws Exception {
    ConnectionProvider dcp = new DriverManagerConnectionProvider();
    dcp.configure( Environment.getProperties() );
    Session s = getSessions().openSession( dcp.getConnection() );
    Transaction tx = s.beginTransaction();
    s.find("from Fo");
    tx.commit();
    Connection c = s.disconnect();
    assertTrue( c!=null );
View Full Code Here

Examples of org.hibernate.connection.DriverManagerConnectionProvider

    s.close();

  }

  public void testUserProvidedConnection() throws Exception {
    ConnectionProvider dcp = new DriverManagerConnectionProvider();
    dcp.configure( Environment.getProperties() );
    Session s = getSessions().openSession( dcp.getConnection() );
    Transaction tx = s.beginTransaction();
    s.find("from Fo");
    tx.commit();
    Connection c = s.disconnect();
    assertTrue( c!=null );
View Full Code Here

Examples of org.hibernate.connection.DriverManagerConnectionProvider

    s.close();

  }

  public void testUserProvidedConnection() throws Exception {
    ConnectionProvider dcp = new DriverManagerConnectionProvider();
    dcp.configure( Environment.getProperties() );
    Session s = getSessions().openSession( dcp.getConnection() );
    Transaction tx = s.beginTransaction();
    s.find("from Fo");
    tx.commit();
    Connection c = s.disconnect();
    assertTrue( c!=null );
View Full Code Here

Examples of org.hibernate.connection.DriverManagerConnectionProvider

    s.close();

  }

  public void testUserProvidedConnection() throws Exception {
    ConnectionProvider dcp = new DriverManagerConnectionProvider();
    dcp.configure( Environment.getProperties() );
    Session s = getSessions().openSession( dcp.getConnection() );
    Transaction tx = s.beginTransaction();
    s.find("from Fo");
    tx.commit();
    Connection c = s.disconnect();
    assertTrue( c!=null );
View Full Code Here

Examples of org.hibernate.connection.DriverManagerConnectionProvider

    s.close();

  }

  public void testUserProvidedConnection() throws Exception {
    ConnectionProvider dcp = new DriverManagerConnectionProvider();
    dcp.configure( Environment.getProperties() );
    Session s = getSessions().openSession( dcp.getConnection() );
    Transaction tx = s.beginTransaction();
    s.find("from Fo");
    tx.commit();
    Connection c = s.disconnect();
    assertTrue( c!=null );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.