< Prev - Documentation - Next >

Java RPC Connector Builder

This Connector Builder fits perfect if you want directly call the stored procedures and don't want to handle the transactions. The factory service interface is identically to the other Connector Builder except the Raw JDBC Connector Builder. Switching to another Connector Builder is possible without changing client code.

Generated Code

Dependencies

Manual Configuration

Example Data Source Java Class

This example demonstrate using the Oracle Universal Connection Pool (UCP). The Oracle Universal Connection Pool and the Spring connection pool are using unwrapped connections. Apache connections pools are using wrapped connections. Be sure to set the correct setting to the PL/SQL Connection Builder.
Java Class : DbwTestDataSource.java
package factory;

import java.util.Properties;
import javax.sql.DataSource;

import oracle.ucp.jdbc.PoolDataSource;
import oracle.ucp.jdbc.PoolDataSourceFactory;

class DbwTestDataSource {
  private DbwTestDataSource() {}
  private static DataSource dataSource;

  static DataSource getDataSource() throws Exception {
    if (dataSource == null) {
      PoolDataSource poolDataSource = PoolDataSourceFactory.getPoolDataSource();
      poolDataSource.setConnectionFactoryClassName("oracle.jdbc.pool.OracleDataSource");
      poolDataSource.setURL("jdbc:oracle:thin:@//192.168.243.141:1521/orcl");
      poolDataSource.setUser("test");
      poolDataSource.setPassword("password");
      poolDataSource.setMinPoolSize(3);
      poolDataSource.setMaxPoolSize(10);
      dataSource = poolDataSource;
    }
    return dataSource;
  }
}

UI Configuration

< Prev - Documentation - Next >