Invoking a procedure with JPA 2.0 or 1.0

Dificuldade    

Hello guys,

Today I will post a solution for you to be able to invoke a procedure from an Oracle database using an older JPA such as 2.0.
For this we will turn Entity Manager into a JDBC connection.

Here’s an example below:

Note: getEmOracle () is the EntityManager.

To find out how to make the jdbc connection with JPA 1.0, access the link below:

http://wiki.eclipse.org/EclipseLink/Examples/JPA/EMAPI#Getting_a_JDBC_Connection_from_an_EntityManager

That’s it!

Hugs