Getting JDBC Connection from Webmethods connection pool in Java Service

Hi,

Is there a way to get a JDBC Connection from the connection pool maintained by webmethods in a Java Service.

My intention is to get the connection from the pool in Java service and there by use transactions provided by JDBC.

Thanks in Advance
Kiran

Is there a reason why you cannot use the transaction facilities of the JDBC adapter?

Hi Rob,

My requirment is i get an XML file in the webmethods.It contains data to be inserted into multiple tables in Database.

If using ordinary JDBC i can parse the document build insert queries add them to batch and execute the batch and i can use JDBC transactions.

I generate these insert queries based on XMLToDB configuration mapping files.

i am figuring out how to do this in Webmethods using JDBC Adapter.

Thanks a lot.
Kiran

This is one of the types of integrations that webMethods Integration Server is very good at. Don’t use Java to parse the XML. Use the built-in facilities of IS. Don’t write JDBC code. Use the JDBC adapter and its capabilities. One of the primary benefits of IS is that you can very quickly create a solution using simple FLOW services and calls to JDBC adapter services that you create using the JDBC administrator.

Resist the urge to use Java. Work through the docs and the samples. You’ll be happier and more productive in the long run.

But even if we use JDBC Adapter ,how can we insert data into multiple tables using Batch Insert service.

Correct me if i am wrong, my understanding is using the batch Insert service of JDBC adapter we can only insert multiple queries into a single table.

Thanks
Kiran

Are the tables all in a single DB? Accessed via a single JDBC connection? If so, then I believe you can use a BatchInsertSQL service. The restriction of the BatchInsertSQL is that the connection must use LOCAL_TRANSACTION. A single transaction context can use only one LOCAL_TRANSACTION connection–but you can access any number of tables within that connection.

If the tables are in different databases, or accessed via different JDBC connections, you cannot use a BatchInsertSQL service but you can use InsertSQL, CustomSQL, or DynamicSQL services. Use JDBC connections that are configured to use XA_TRANSACTION.

Be sure to review the JDBC Adapter User’s Guide thoroughly to make sure you get things set up to do what you need.

Someone please jump in to correct me if I got any of this incorrect.