After Reverse Engineering

The final touch

So, you have reverse engineering classes generated.

There is subfolder with your schema name along with column and table subfloder.

As you see, target reports a single problem:

You have to provide a DataSource implementation, and it's up to you haw to do it.

You may use the default DataSource implementation, depending of your database engine, you may use pooling, you may use @Resource injection if possible.

Example HikariCP Datasource:

private DataSource oracleDatabase(){
        HikariConfig config = new HikariConfig(); 
        config.setJdbcUrl( "jdbc:oracle:thin://@IP:PORT/orcl" );
        config.setUsername( USER ); 
        config.setPassword( PASS ); 
        return new HikariDataSource( config ); 

Also, you should set the target as a singleton.
it's also dependable of your framework.


Complete DataBaseTarget for local H2 database:

© Copyright 2018-2023 Elephant Software Klaudiusz Wojtkowiak