Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #33116
| From | Cecil Westerhof <Cecil@decebal.nl> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Performance JPA |
| Date | 2015-11-13 08:30 +0100 |
| Organization | Decebal Computing |
| Message-ID | <87egfu2w6a.fsf@Equus.decebal.nl> (permalink) |
| References | (7 earlier) <87si4e49ja.fsf@Equus.decebal.nl> <n1u3ne$hvk$1@speranza.aioe.org> <8737wc425d.fsf@Equus.decebal.nl> <n20ld4$3dd$1@speranza.aioe.org> <87pozf3f7b.fsf@Equus.decebal.nl> |
On Thursday 12 Nov 2015 07:27 CET, Cecil Westerhof wrote:
> On Thursday 12 Nov 2015 01:10 CET, Arne Vajhøj wrote:
>
>> That persistence.xml does not look correct.
>>
>> <property name="openjpa.ConnectionDriverName"
>> value="com.ibm.db2.jcc.DB2Driver" />
>>
>> specifies a JDBC driver not DataSource.
>>
>> That may (*) make JPA not use WAS connection pool but try to
>> establish a connection for every operation. And that is very bad.
>
> That was what I thought was happening. (A new connection every
> time.)
>
>
>> The technique may work fine for a local database with a simple
>> login protocol but with a remote database and complex protocol,
>> then it could create a huge overhead.
>>
>> But we would need to see the rest of the persistence,xml to be sure
>> (the standard part actually determines whether it is driver or
>> data source).
>>
>> Try see:
>>
>> http://stackoverflow.com/questions/3526434/ibm-websphere-jpa-configuration-how-to-update-persistence-xml
>>
>> for an example of a persistence.xml that looks way
>> more I would expect (no driver, data source, all managed).
>
> I have been trying some things, but until now without success. I
> need to go to the office again and from there I do not have
> newsgroup access, so some silence on my part again. I will
> communicate my progress when I am back home.
Problem solved. I removed openjpa.ConnectionDriverName and
openjpa.jdbc.DBDictionary.
The unit starts with:
<persistence-unit name="cvu-persistence-test" transaction-type="JTA">
<description>Persistence Testen</description>
<jta-data-source>jdbc/cvu/datasource</jta-data-source>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<validation-mode>AUTO</validation-mode>
<properties>
I added transaction-type, jta-data-source and validation-mode.
The validation-mode needs to be entered just before properties,
otherwise it does not work.
The performance is now comparable with the performance of JDBC. So I
proved the naysayers wrong.
OneToMany relations are also going to be implemented, so maybe the JPA
version will be even faster as the JDBC version. ;-)
One question: I removed
<property name="openjpa.jdbc.DBDictionary" value="org.apache.openjpa.jdbc.sql.DB2Dictionary" />
It works, but I was told that I could better put it back, because it
was used to optimise complex queries. Is this true?
--
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
Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-02 09:47 +0100
Re: Performance JPA Silvio <silvio@internet.com> - 2015-11-02 14:23 +0100
Re: Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-03 07:52 +0100
Re: Performance JPA Martin Gregorie <martin@address-in-sig.invalid> - 2015-11-03 11:16 +0000
Re: Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-03 19:11 +0100
Re: Performance JPA Martin Gregorie <martin@address-in-sig.invalid> - 2015-11-03 19:15 +0000
Re: Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-04 09:28 +0100
Re: Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-10 08:07 +0100
Re: Performance JPA Silvio <silvio@internet.com> - 2015-11-10 10:35 +0100
Re: Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-11 06:20 +0100
Re: Performance JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-11-11 09:32 -0500
Re: Performance JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-11-10 19:56 -0500
Re: Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-11 06:50 +0100
Re: Performance JPA Martin Gregorie <martin@address-in-sig.invalid> - 2015-11-11 12:17 +0000
Re: Performance JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-11-11 09:30 -0500
Re: Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-11 23:20 +0100
Re: Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-11 23:11 +0100
Re: Performance JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-11-11 19:10 -0500
Re: Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-12 07:27 +0100
Re: Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-13 08:30 +0100
Re: Performance JPA Silvio <silvio@internet.com> - 2015-11-13 10:45 +0100
Re: Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-13 11:06 +0100
Re: Performance JPA Silvio <silvio@internet.com> - 2015-11-13 13:36 +0100
Re: Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-20 09:04 +0100
Re: Performance JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-11-13 21:46 -0500
Re: Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-20 09:09 +0100
Re: Performance JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-11-03 20:35 -0500
Re: Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-04 09:35 +0100
Re: Performance JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-11-07 22:09 -0500
Re: Performance JPA Silvio <silvio@internet.com> - 2015-11-03 12:29 +0100
Re: Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-03 19:23 +0100
Re: Performance JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-11-03 20:44 -0500
Re: Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-04 09:48 +0100
Re: Performance JPA Silvio <silvio@internet.com> - 2015-11-04 10:23 +0100
Re: Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-04 11:27 +0100
Re: Performance JPA Silvio <silvio@internet.com> - 2015-11-04 12:42 +0100
Re: Performance JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-11-07 22:18 -0500
Re: Performance JPA Silvio <silvio@internet.com> - 2015-11-09 10:43 +0100
Re: Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-20 09:13 +0100
Re: Performance JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-11-07 22:12 -0500
Re: Performance JPA Silvio <silvio@internet.com> - 2015-11-09 10:22 +0100
Re: Performance JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-11-10 21:35 -0500
Re: Performance JPA Silvio <silvio@internet.com> - 2015-11-11 11:29 +0100
Re: Performance JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-11-03 20:42 -0500
Re: Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-04 11:19 +0100
Re: Performance JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-11-07 22:05 -0500
Re: Performance JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-11-02 20:08 -0500
Re: Performance JPA Cecil Westerhof <Cecil@decebal.nl> - 2015-11-03 07:55 +0100
Re: Performance JPA Arne Vajhøj <arne@vajhoej.dk> - 2015-11-03 20:45 -0500
Re: Performance JPA Lew <lewbloch@gmail.com> - 2015-11-16 14:43 -0800
csiph-web