Examples of LazyConnectionDataSourceProxy


Examples of org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy

    }
  }

  public void testClobStringTypeWithSynchronizedConnection() throws Exception {
    DataSource dsTarget = new DriverManagerDataSource();
    DataSource ds = new LazyConnectionDataSourceProxy(dsTarget);

    lobHandler.getClobAsString(rs, 1);
    lobHandlerControl.setReturnValue("content", 2);
    lobCreator.setClobAsString(ps, 1, "content");
    lobCreatorControl.setVoidCallable(1);
View Full Code Here

Examples of org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy

    assertTrue("JTA synchronizations not active", !TransactionSynchronizationManager.isSynchronizationActive());
  }

  public void testTransactionCommitWithNonExistingDatabaseAndLazyConnection() throws Exception {
    DriverManagerDataSource dsTarget = new DriverManagerDataSource();
    final LazyConnectionDataSourceProxy ds = new LazyConnectionDataSourceProxy();
    ds.setTargetDataSource(dsTarget);
    ds.setDefaultAutoCommit(true);
    ds.setDefaultTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);
    //ds.setDefaultTransactionIsolationName("TRANSACTION_READ_COMMITTED");

    LocalSessionFactoryBean lsfb = new LocalSessionFactoryBean();
    lsfb.setDataSource(ds);
    Properties props = new Properties();
View Full Code Here

Examples of org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy

                }
            }
        });
       
        // Springframework provided proxies that make working with transactions much easier
        LazyConnectionDataSourceProxy lazyProxy = new LazyConnectionDataSourceProxy(dataSource);
       
        setInstance(dsName, lazyProxy);
    }
View Full Code Here

Examples of org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy

  }

  @Test
  public void testTransactionCommitWithNonExistingDatabaseAndLazyConnection() throws Exception {
    DriverManagerDataSource dsTarget = new DriverManagerDataSource();
    final LazyConnectionDataSourceProxy ds = new LazyConnectionDataSourceProxy();
    ds.setTargetDataSource(dsTarget);
    ds.setDefaultAutoCommit(true);
    ds.setDefaultTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);
    //ds.setDefaultTransactionIsolationName("TRANSACTION_READ_COMMITTED");

    LocalSessionFactoryBean lsfb = new LocalSessionFactoryBean();
    lsfb.setDataSource(ds);
    Properties props = new Properties();
View Full Code Here

Examples of org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy

  }

  @Test
  public void testTransactionCommitWithNonExistingDatabaseAndLazyConnection() throws Exception {
    DriverManagerDataSource dsTarget = new DriverManagerDataSource();
    final LazyConnectionDataSourceProxy ds = new LazyConnectionDataSourceProxy();
    ds.setTargetDataSource(dsTarget);
    ds.setDefaultAutoCommit(true);
    ds.setDefaultTransactionIsolation(Connection.TRANSACTION_READ_COMMITTED);
    //ds.setDefaultTransactionIsolationName("TRANSACTION_READ_COMMITTED");

    LocalSessionFactoryBean lsfb = new LocalSessionFactoryBean();
    lsfb.setDataSource(ds);
    Properties props = new Properties();
View Full Code Here

Examples of org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy

    }
  }

  public DataSource getDataSource(String uri) {
    HiveBasicDataSource ds = new HiveBasicDataSource(uri);
    LazyConnectionDataSourceProxy dataSourceProxy = new LazyConnectionDataSourceProxy(ds);
    dataSourcesToClose.add(ds);
    return dataSourceProxy;
  }
View Full Code Here

Examples of org.springframework.jdbc.datasource.LazyConnectionDataSourceProxy

                        dataSourceToUse = pp.postProcess(dataSourceToUse);
                    }
                }
            }

            dataSources.put(descriptor.getIdentity(), new LazyConnectionDataSourceProxy(
                    dataSourceToUse));
        }
    }
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.