Examples of DriverManagerDataSource


Examples of org.springframework.jdbc.datasource.DriverManagerDataSource

    context.setEventId("notmanaged");
    flowExecution.resume(context);
  }

  private DataSource getDataSource() {
    DriverManagerDataSource dataSource = new DriverManagerDataSource();
    dataSource.setDriverClassName("org.hsqldb.jdbcDriver");
    dataSource.setUrl("jdbc:hsqldb:mem:jpa");
    dataSource.setUsername("sa");
    dataSource.setPassword("");
    return dataSource;
  }
View Full Code Here

Examples of org.springframework.jdbc.datasource.DriverManagerDataSource

    context.setEventId("notmanaged");
    flowExecution.resume(context);
  }

  private DataSource getDataSource() {
    DriverManagerDataSource dataSource = new DriverManagerDataSource();
    dataSource.setDriverClassName("org.hsqldb.jdbcDriver");
    dataSource.setUrl("jdbc:hsqldb:mem:jpa");
    dataSource.setUsername("sa");
    dataSource.setPassword("");
    return dataSource;
  }
View Full Code Here

Examples of org.springframework.jdbc.datasource.DriverManagerDataSource

    jpaListener.exceptionThrown(context, new FlowExecutionException("foo", "bar", "test"));
    assertSessionNotBound();
  }

  private DataSource getDataSource() {
    DriverManagerDataSource dataSource = new DriverManagerDataSource();
    dataSource.setDriverClassName("org.hsqldb.jdbcDriver");
    dataSource.setUrl("jdbc:hsqldb:mem:jpa");
    dataSource.setUsername("sa");
    dataSource.setPassword("");
    return dataSource;
  }
View Full Code Here

Examples of org.springframework.jdbc.datasource.DriverManagerDataSource

    Hibernate.initialize(bean.getAddresses());
    assertTrue("addresses should be initialized", Hibernate.isInitialized(bean.getAddresses()));
  }

  private DataSource getDataSource() {
    DriverManagerDataSource dataSource = new DriverManagerDataSource();
    dataSource.setDriverClassName("org.hsqldb.jdbcDriver");
    dataSource.setUrl("jdbc:hsqldb:mem:hspcl");
    dataSource.setUsername("sa");
    dataSource.setPassword("");
    return dataSource;
  }
View Full Code Here

Examples of org.springframework.jdbc.datasource.DriverManagerDataSource

      TransactionSynchronizationManager.clearSynchronization();
    }
  }

  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");
View Full Code Here

Examples of org.springframework.jdbc.datasource.DriverManagerDataSource

    assertNull(info[0].getNonJtaDataSource());
  }

  public void testExample4() throws Exception {
    SimpleNamingContextBuilder builder = SimpleNamingContextBuilder.emptyActivatedContextBuilder();
    DataSource ds = new DriverManagerDataSource();
    builder.bind("java:comp/env/jdbc/MyDB", ds);

    PersistenceUnitReader reader = new PersistenceUnitReader(
        new PathMatchingResourcePatternResolver(), new JndiDataSourceLookup());
    String resource = "/org/springframework/orm/jpa/persistence-example4.xml";
View Full Code Here

Examples of org.springframework.jdbc.datasource.DriverManagerDataSource

    assertEquals("com.acme.AcmePersistence", info[0].getPersistenceProviderClassName());
    assertEquals(0, info[0].getProperties().keySet().size());
  }

  public void testExampleComplex() throws Exception {
    DataSource ds = new DriverManagerDataSource();

    String resource = "/org/springframework/orm/jpa/persistence-complex.xml";
    MapDataSourceLookup dataSourceLookup = new MapDataSourceLookup();
    Map<String, DataSource> dataSources = new HashMap<String, DataSource>();
    dataSources.put("jdbc/MyPartDB", ds);
View Full Code Here

Examples of org.springframework.jdbc.datasource.DriverManagerDataSource

            // END SNIPPET: route
        };
    }

    public void setUp() throws Exception {
        DriverManagerDataSource dataSource = new DriverManagerDataSource(url, user, password);
        dataSource.setDriverClassName(driverClass);
        ds = dataSource;

        JdbcTemplate jdbc = new JdbcTemplate(ds);
        // START SNIPPET: setup
        jdbc.execute("create table customer (id varchar(15), name varchar(10))");
View Full Code Here

Examples of org.springframework.jdbc.datasource.DriverManagerDataSource

            }
           
        } else {
            // construct a DataSource adhoc
            DriverManagerDataSource ds = new DriverManagerDataSource();
            ds.setDriverClassName(info.getDriver());
            ds.setUsername(info.getLogonid());
            ds.setPassword(info.getLogonpassword());
            ds.setUrl(info.getUrl());
           
            source = ds;
        }
       
        final JdbcPersonAttributeDaoImpl jdbcImpl = new JdbcPersonAttributeDaoImpl(source, QUERY_ATTRIBUTE_LIST, sql);
View Full Code Here

Examples of org.springframework.jdbc.datasource.DriverManagerDataSource

    }
   
    public static void setupJndiDataSourceContext(String jndiPath, Logger logger) throws Exception {
        setup();
        SimpleNamingContextBuilder builder = SimpleNamingContextBuilder.emptyActivatedContextBuilder();
        DriverManagerDataSource ds = new DriverManagerDataSource();
        Map<String, String> jndiValuesMap = getJndiProperties( logger );
        ds.setDriverClassName( jndiValuesMap.get( "hibernate.connection.driver_class" ) );
        ds.setUrl( jndiValuesMap.get( "hibernate.connection.url" ) );
        ds.setUsername( jndiValuesMap.get( "hibernate.connection.username" ) );
        ds.setPassword( jndiValuesMap.get( "hibernate.connection.password" ) );
        builder.bind( jndiPath, ds );
        builder.bind( "java:/TransactionManager", new MockTransactionManager() );
    }
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.