[jpa-spec users] [jsr338-experts] Uniqueness of names of NamedQuery/StoredProcedure

From: Pinaki Poddar <>
Date: Wed, 1 May 2013 13:09:33 -0700

The spec API uses name as the identifying moniker for named queries and
stored procedures as in
      public <T> TypedQuery<T> createNamedQuery(String name, Class<T>
             public StoredProcedureQuery createNamedStoredProcedureQuery
(String name);

While the name of a @NamedQuery is scoped within a persistence unit
(Section 3.10.14, pp 150), does this scope also include the named stored

For example, can we define a NamedQuery and a StoredProedure with the same

Regards --

Pinaki Poddar
Chair, Apache OpenJPA Project
JPA Expert Group Member
Application & Integration Middleware