Package org.hsqldb.jdbc

Examples of org.hsqldb.jdbc.jdbcDataSource


    DataSource _ds;
    BPELDAOConnectionFactoryImpl factory;

    @Override
    protected void setUp() throws Exception {
        jdbcDataSource hsqlds = new jdbcDataSource();
        hsqlds.setDatabase("jdbc:hsqldb:mem:" + new GUID().toString());
        hsqlds.setUser("sa");
        hsqlds.setPassword("");
        _ds = hsqlds;

        _txm = new EmbeddedGeronimoFactory().getTransactionManager();

        factory = new BPELDAOConnectionFactoryImpl();
View Full Code Here


            throw new IllegalArgumentException("Config directory is not a directory or does not exist: " + configDir);
        this._configDir = configDir;
    }

    public static DataSource createInternalDS(String guid) {
        jdbcDataSource hsqlds = new jdbcDataSource();
        hsqlds.setDatabase("jdbc:hsqldb:mem:" + guid);
        hsqlds.setUser("sa");
        hsqlds.setPassword("");
        return hsqlds;
    }
View Full Code Here

  private JBIContainer jbi;
  private DataSource dataSource;
  private JdbcComponent jdbc;
 
  protected void setUp() throws Exception {
        jdbcDataSource ds = new jdbcDataSource();
        ds.setDatabase("jdbc:hsqldb:mem:aname");
        ds.setUser("sa");
    dataSource = ds;
   
    jbi = new JBIContainer();
    jbi.setEmbedded(true);
    jbi.init();
View Full Code Here

    private Connection connection;

    private JBIContainer jbi;

    protected void setUp() throws Exception {
        jdbcDataSource ds = new jdbcDataSource();
        ds.setDatabase("jdbc:hsqldb:mem:aname");
        ds.setUser("sa");
        dataSource = ds;
        connection = dataSource.getConnection();
        jbi = new JBIContainer();
        jbi.setFlowName("st");
        jbi.setEmbedded(true);
View Full Code Here

    private JBIContainer jbi;
  private DataSource dataSource;
  private JdbcComponent jdbc;
 
  protected void setUp() throws Exception {
        jdbcDataSource ds = new jdbcDataSource();
        ds.setDatabase("jdbc:hsqldb:mem:aname");
        ds.setUser("sa");
    dataSource = ds;
   
    jbi = new JBIContainer();
    jbi.setEmbedded(true);
    jbi.init();
View Full Code Here

    }

    public void testDirectDataSource() throws Exception {
        Properties properties = new Properties();

        DataSource dataSource = new jdbcDataSource();
        properties.put("DataSource", dataSource);

        OpenEjbBrokerFactory.setThreadProperties(properties);
        BrokerService broker = null;
        try {
View Full Code Here

    }

    public void testLookupDataSource() throws Exception {
        Properties properties = new Properties();

        DataSource dataSource = new jdbcDataSource();
        MockInitialContextFactory.install(Collections.singletonMap("java:openejb/Resource/TestDs", dataSource));
        assertSame(dataSource, new InitialContext().lookup("java:openejb/Resource/TestDs"));

        CoreContainerSystem containerSystem = new CoreContainerSystem();
        containerSystem.getJNDIContext().bind("java:openejb/Resource/TestDs", dataSource);
View Full Code Here

     * username if salted is true. Sets the DataSource of the realm associated with the test
     * to a DataSource connected to the database.  (To prevent concurrency problems when tests
     * are executed in multithreaded mode, each test method gets its own database.)
     */
    protected void createDefaultSchema(String testName, boolean salted) {
        jdbcDataSource ds = new jdbcDataSource();
        ds.setDatabase("jdbc:hsqldb:mem:" + name);
        ds.setUser("SA");
        ds.setPassword("");
        Connection conn = null;
        Statement sql = null;
        try {
            conn = ds.getConnection();
            sql = conn.createStatement();
            sql.executeUpdate("create table users (username varchar(20), password varchar(20))");
            Sha256Hash sha256Hash = salted ? new Sha256Hash(plainTextPassword, salt) :
                new Sha256Hash(plainTextPassword);
            String password = sha256Hash.toHex();
View Full Code Here

    /**
     * Creates a test database with a separate salt column in the users table. Sets the
     * DataSource of the realm associated with the test to a DataSource connected to the database.
     */
    protected void createSaltColumnSchema(String testName) {
        jdbcDataSource ds = new jdbcDataSource();
        ds.setDatabase("jdbc:hsqldb:mem:" + name);
        ds.setUser("SA");
        ds.setPassword("");
        Connection conn = null;
        Statement sql = null;
        try {
            conn = ds.getConnection();
            sql = conn.createStatement();
            sql.executeUpdate(
                    "create table users (username varchar(20), password varchar(20), password_salt varchar(20))");
            Sha256Hash sha256Hash = new Sha256Hash(plainTextPassword, salt);
            String password = sha256Hash.toHex();
View Full Code Here

    private Connection connection;
    private JBIContainer jbi;
   
   
    protected void setUp() throws Exception {
        jdbcDataSource ds = new jdbcDataSource();
        ds.setDatabase("jdbc:hsqldb:mem:aname");
        ds.setUser("sa");
        dataSource = ds;
        connection = dataSource.getConnection();
        jbi = new JBIContainer();
        jbi.setFlowName("st");
        jbi.setEmbedded(true);
View Full Code Here

TOP

Related Classes of org.hsqldb.jdbc.jdbcDataSource

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.