Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #32333

Re: Is it possible to use JPA and JDBC at the same time

Path csiph.com!au2pb.net!feeder.erje.net!1.eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail
From Cecil Westerhof <Cecil@decebal.nl>
Newsgroups comp.lang.java.programmer
Subject Re: Is it possible to use JPA and JDBC at the same time
Date Mon, 17 Aug 2015 08:24:04 +0200
Organization Decebal Computing
Lines 27
Message-ID <87mvxqsa9n.fsf@Equus.decebal.nl> (permalink)
References <87vbcj3vja.fsf@Equus.decebal.nl> <55cd346e$0$304$14726298@news.sunsite.dk>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 8bit
Injection-Info mx02.eternal-september.org; posting-host="528adfd6ad074c92fdc6a7f8fb9e23d8"; logging-data="829"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19U0fvotDbUYzCaS6KALwcBFmUJRdrTAiE="
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)
Cancel-Lock sha1:eyHi0rzj0qiVk1+lU+M3CgZxaHA= sha1:zCi/q247M5AQTlyK3JAHEZnQTZM=
X-Homepage http://www.decebal.nl/
Xref csiph.com comp.lang.java.programmer:32333

Show key headers only | View raw


On Friday 14 Aug 2015 02:21 CEST, Arne Vajhøj wrote:

> On 8/13/2015 2:14 PM, Cecil Westerhof wrote:
>> I am new to JPA and have to migrate an application from JDBC to
>> JPA. There are quite some queries. Would it be possible to mix JDBC
>> and JPA together?
>>
>> I would suppose not, but if it was possible, that would circumvent
>> a big bang.
>
> The standard problems with using two persistence frameworks are
> cache inconsistencies and transactional issues.
>
> I have not read the fine print in the JPA specs to say whether
> this would be a problem for JPA and JDBC.
>
> But I would probably go for big bang JPA. Lower risk. And
> with createNativeQuery you can execute SQL queries (so you
> can reuse you existent SQL queries).

I was afraid for that. ;-) There are a lot of queries. :-( But for
testing purposes I could maybe do it class by class.

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Is it possible to use JPA and JDBC at the same time Cecil Westerhof <Cecil@decebal.nl> - 2015-08-13 20:14 +0200
  Re: Is it possible to use JPA and JDBC at the same time Arne Vajhøj <arne@vajhoej.dk> - 2015-08-13 20:21 -0400
    Re: Is it possible to use JPA and JDBC at the same time Cecil Westerhof <Cecil@decebal.nl> - 2015-08-17 08:24 +0200
      Re: Is it possible to use JPA and JDBC at the same time Arne Vajhøj <arne@vajhoej.dk> - 2015-08-17 19:43 -0400
        Re: Is it possible to use JPA and JDBC at the same time Cecil Westerhof <Cecil@decebal.nl> - 2015-08-19 11:57 +0200

csiph-web