Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class RepositoryCheck {
- final static String DB_HOST = "localhost";
- final static int DB_PORT = 3308;
- public static final String DB_USER = "root";
- public static final String DB_PASS = "root";
- public static final String DB_NAME = "wallet_wms";
- public static void main(String[] args) {
- ConfigurationImpl conf = new ConfigurationImpl("", DB_HOST, DB_PORT, DB_USER, DB_PASS, DB_NAME, 300, 5, "");
- ExecutorService keepAliveCheckPool = new CommonExecutorService("my-exec-service", 5);
- SQLConnectionProvider connections = new SQLConnectionProviderOnlyFirst(conf, keepAliveCheckPool);
- ComponentsServer maintainerService = new ComponentsServer(new RayIdGenerator20Base64());
- BasicDataSourceSQLOperator basicDataSourceSQLOperator = new BasicDataSourceSQLOperator(
- connections,
- new ResultSetBeanBuilder(),
- 5,
- maintainerService);
- WalletRepository walletRepository = new MySQLWalletRepository(basicDataSourceSQLOperator);
- Wallet wallet = walletRepository.create(
- Context.EMPTY,
- WalletType.INDIVIDUAL,
- 1);
- System.out.println("Created wallet with id = " + wallet.getId());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement