How to use Hibernate JPA 2.1 for invoking stored procedures in the database ?

Solution Unverified - Updated -

Issue

  • I need to use Hibernate JPA 2.1 and entitymanager . Used for invoking stored procedures in the database.
  • Configuring Hibernate JPA 2.1 in Red Hat JBoss Fuse 6.2, using the below dependency.
<dependency>
   <groupId>org.hibernate.javax.persistence</groupId>
   <artifactId>hibernate-jpa-2.1-api</artifactId>
   <version>1.0.0.Final</version>
</dependency>
<dependency>
    <groupId>org.hibernate</groupId>
    <artifactId>hibernate-entitymanager</artifactId>
    <version>4.3.10.Final</version>
</dependency>
  • I am using, in my source code, the class "javax.persistence.StoredProcedureQuery" imported via the following dependence
<dependency>
   <groupId>org.hibernate.javax.persistence</groupId>
   <artifactId>hibernate-jpa-2.1-api</artifactId>
   <version>1.0.0.Final</version>
</dependency>

I see that the Fuse server uses the "org.apache.geronimo.specs/geronimo-jpa_2.0_spec" dependences that implement/expose javax.persistence, but It doesn't contain the class "StoredProcedureQuery".

Environment

  • Red Hat JBoss Fuse
    • 6.2.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content