Package com.jengine.orm

Examples of com.jengine.orm.DB


        ConnectionManager connectionManager = new DBCPConnectionPool(newDBCPDataSource());
//        ConnectionManager connectionManager = new SingleConnectionManager("com.mysql.jdbc.Driver", "jdbc:mysql://localhost:3306/bookdb?", "root", "");
        Adapter adapter = new JDBCAdapter(connectionManager);
        EhcacheManager cacheManager = new EhcacheManager(newEhcacheManager());
        Provider provider = new MySQLProvider(adapter, cacheManager);
        DB db = DBFactory.register(new DB(provider));

        // testing
        DBConnection connection = db.getConnection();
        try {
            test1();
            test2();
            test3();
            test4();
            test5();
            test6();
            test7();
            test8();
            test9();
            test10();
            test11();
        } finally {
            db.closeConnection(connection);
            db.getCacheManager().shutdown();
        }
    }
View Full Code Here

TOP

Related Classes of com.jengine.orm.DB

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.