简体   繁体   中英

Invoke stored procedure using JPA (JpaDaoSupport) in java

I would like to know how to invoke/call a stored procedure in java using JPA API. We are extending our class to use JpaDaoSupport class. I have tried invoking Call/ begin stored proc method but its not working as expected. Any help in this is highly appreciated.

If you are using Spring's JpaDaoSupport then you can call your stored procedure two ways:

1) via SimpleJdbcCall which you are passing the datasource and it is using underneath jdbcTemplate to make the call (an example here )

2) implementing as an inner class the abstract StoredProcedure and therefore encapsulating all the stored procedure logic (an example here ).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM