Products Resources Support About Us

Run a basic program trhough JDBC


#1

Hi,

I created a web service that connects to universe db.
I used to connect uv stablishing a direct session and getting the result witth the response command like this:
session = Conn_d.getConnection();
cmdString = “EXTRA.PROGRAM.WS”;
command = session.command();
command.setCommand(cmdString);
command.exec();
data_d = command.response().toString();

And it worked.
But now I’m working with a pool connection.
initContext = new InitialContext();
DataSource ds = (DataSource) initContext.lookup(“java:/comp/env/jdbc/universe”);
cn = ds.getConnection();
I stablished the connection, but I´m having troubles calling the “EXTRA.PROGRAM.WS” program trhough my ws.
What could be the equivalent to command.setCommand(cmdString) using the connection pooling?


#2

There is a great How To Article on the Rocket Community Portal.

“How to use the U2 JDBC driver from the July 2014 U2 Clients with the connection pooling option”

https://my.rocketsoftware.com/RocketCommunity/articles/Tech_Note/How-to-use-the-U2-JDBC-driver-from-the-July-2014-U2-Clients-with-the-connection-pooling-option-1478610314450

If you do not have access to the Portal, please reach out to your support provider.