import static com.jengine.utils.commons.CollectionUtil.map;
public class Test {
public static void main(String [] args) throws Exception {
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));