cancel
Showing results for 
Search instead for 
Did you mean: 

WILL using JDBC API instead of LookUp APIs hamper performance?????????????

Former Member
0 Kudos

hi forum experts,

i have done a JDBC call in a UDF in a message mapping to fetch some records from a database,

i tried doing it with LookUp APIs, but i think/found that LookUp APIs dont provide

any method to execute DML statements, and moreover these APIs dont provide transactional behaviour....

so i tried with JDBC APIs.......<<<<java.sql.*;>>>>.....where i used custom code to provide transactional behaviour........like explicitly using commit() methods. Where i m using Connection class...and in this case XI communication channels are not being used,,,....

will using JDBC API instead of LookUp APIs hamper performance????????????

Accepted Solutions (0)

Answers (1)

Answers (1)

prateek
Active Contributor
0 Kudos

Hi Sudeep,

This will surely help u,

/people/saravanakumar.kuppusamy2/blog/2005/01/19/rdbms-system-integration-using-xi-30-jdbc-senderreceiver-adapter

/people/william.li/blog/2007/03/30/using-jdbc-connection-pool-in-xi-message-mapping

According to help.sap

Use of Lookup API - Calls to other application systems are sometimes necessary to meet the following requirements:

&#9679; To get <b>read </b>access to application system data in the mapping program

&#9679; To call existing mapping routines in the application system

So DML statements couldnt be used

Additional help

/people/prasad.illapani/blog/2006/10/25/how-to-check-jdbc-sql-query-syntax-and-verify-the-query-results-inside-a-user-defined-function-of-the-lookup-api

<i>[Reward if helpful]</i>

Regards,

Prateek

Former Member
0 Kudos

thanks prateek for ur valuable response....

ur blog provided me the way....

as it says:

<<<Developing a user-function to connect to a datasource and execute the SQL statement, is the most inefficient, and the least desirable >>>

but i tried this way coz, i can atleast provide transactional behaviour to my code via commit and roll-backs, which i cant do with LookUp APIs

bhavesh_kantilal
Active Contributor
0 Kudos

><i>but i tried this way coz, i can atleast provide transactional behaviour to my code via commit and roll-backs, which i cant do with LookUp APIs</i>

What happens if your message mapping errors out after this Code has been executed due to someother reason and you correct this Mapping error and then restart the message? It would mean that the UDF would be re-executed and you would end up with duplication of data.

Something that is strictly not recommended. You should use the Receievr JDBC adapter with the correct data format etc to perfrom Transactional Calls on the database.

Regards

Bhavesh