Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

best practice to call procedure & function from database inside entity (ex : Doml method)

Hello,
1-what's the best practice to call database procedure and function in entity Impl ?
i made the procedure call inside Application module like ( DBTransaction trx = (DBTransaction) getTransaction();
CallableStatement st = null;
try {
String stmt = "begin my_procedure_name (?); end;";
st = trx.createCallableStatement(stmt, 0);
st.setObject(1, param);
st.executeUpdate();
} )
then call it inside the entity impl using ( ESAppModuleImpl am =(ESAppModuleImpl) Configuration.createRootApplicationModule
am.mymethod_name
)
this is the best practice for my case ?
thanks in advance.
my jdev ver. : 12.2.1.2.0

This post has been answered by Timo Hahn on May 19 2022
Jump to Answer
Comments
Post Details
Added on May 19 2022
5 comments
202 views