× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hello All,
I know I have asked a few times before about JPA and all the help I've
received has been great! I think the persistence API is pretty amazing,
except for one thing. There doesn't, or at least I can't find it, seem to be
good support for stored procedure calls.

I've been using OpenJPA because RDi has it built in and it seems pretty
easy. They do allow stored procedure calls, but it doesn't allow return
values.

We use a few stored procedure calls in some of our code. There are some we
just can't get away from. I would rather not have to make a JDBC connection
with custom JDBC code as well as a JDBC connection through the persistence
API.

Does anybody else run JPA and use stored procedures? I'm interested to hear
how you handle it.

One work around I've played with was creating a custom inject class to
inject the values of a result set into a POJO that was annotated. I
basically stole ideas behind JPA and just create 2 simple annotations and a
simple class to inject the result set values. While this is probably kind of
a silly thing to do, it was rather fun :-). I can't say I think this is a
very good work around though. It works, but I kind of like the idea of using
a Java standard.

Well, after a bit more reading maybe I can accomplish this using Hibernate.
I will admit Hibernate seems confusing to me, although I think that's just
me. The site appears to be down too... ....anyway I'm still interested in
hearing if anybody is using stored procedures with JPA and how they handle
it.

Thanks in advance,
--
James R. Perkins

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.