Re: OpenJPA vs EclipseLink

2012-05-09 Thread Mark Struberg
Here we go:

http://struberg.wordpress.com/2012/05/10/using-jpa-in-real-projects-part-1/

This just covers the project setup for now. But already contains a few neat 
tricks.

I'll continue to work on the 2nd part collecting and outlining some concept 
issues and workaround options for the programming model in your apps.

LieGrue,
strub



- Original Message -
 From: José Luis Cetina maxtorz...@gmail.com
 To: users@openjpa.apache.org; Mark Struberg strub...@yahoo.de
 Cc: 
 Sent: Friday, May 4, 2012 4:58 PM
 Subject: Re: OpenJPA vs EclipseLink
 
T hanks Mark, I'll be pendent for your post012/5/4 Mark Struberg 
 strub...@yahoo.de
 
  Another such 'JPA performance test'I've seen was one using an 
 Oracle
  database.
 
  The funny thing was that it did NOT use any additional SQL other than the
  generated one.
 
  Which means that ALL foreign key relations didn't have an Index set up!
  (Contrary to MySQL, Oracle doesn't automatically create indices for 
 foreign
  keys by default)
 
  I'm not sure what I should think about a guy who is doing a 
 'serious'
  performance test without even getting the DB indexes setup correctly ;)
 
  I'll currently working on a blog article which describes how to make 
 use
  of the openjpa-maven-plugin and sql-maven-plugin to efficiently handle
  databases in big applications. Not sure if I get it done before I travel to
  confess-2012 on sunday. Will keep you updated.
 
 
  LieGrue,
  strub
 
 
 
  - Original Message -
   From: Matthew Adams matt...@matthewadams.me
   To: users@openjpa.apache.org
   Cc:
   Sent: Friday, May 4, 2012 4:27 PM
   Subject: Re: OpenJPA vs EclipseLink
  
   ...or tests without your data...
  
   On Thu, May 3, 2012 at 4:28 PM, Mark Struberg 
 strub...@yahoo.de wrote:
  
  
  
    or tests without any jdbc pool ;)
  
    LieGrue,
    strub
  
  
  
    
     From: afryer apfr...@hotmail.com
    To: users@openjpa.apache.org
    Sent: Thursday, May 3, 2012 11:27 PM
    Subject: Re: OpenJPA vs EclipseLink
    
    One thing to be aware of is if you see performance 
 comparisons on the
    internet, make sure you know if the OpenJPA results are using 
 openjpa
    enhanced classes or not.  I've seen some very misleading 
 stats
   comparing
    OpenJPA to other ORMs using non-enhanced classes.
    
    --
    View this message in context:
  
  
 
 http://openjpa.208410.n2.nabble.com/OpenJPA-vs-EclipseLink-tp7521217p7525247.html
    Sent from the OpenJPA Users mailing list archive at 
 Nabble.com.
    
    
    
  
  
  
  
   --
   @matthewadams12
   mailto:matt...@matthewadams.me
   skype:matthewadams12
   yahoo:matthewadams
   aol:matthewadams12
   google-talk:matthewadam...@gmail.com
   msn:matt...@matthewadams.me
   http://matthewadams.me
   http://www.linkedin.com/in/matthewadams
  
 
 
 
 
 -- 
 ---
 *SCJA. José Luis Cetina*
 ---



Re: OpenJPA vs EclipseLink

2012-05-04 Thread Matthew Adams
...or tests without your data...

On Thu, May 3, 2012 at 4:28 PM, Mark Struberg strub...@yahoo.de wrote:



 or tests without any jdbc pool ;)

 LieGrue,
 strub



 
  From: afryer apfr...@hotmail.com
 To: users@openjpa.apache.org
 Sent: Thursday, May 3, 2012 11:27 PM
 Subject: Re: OpenJPA vs EclipseLink
 
 One thing to be aware of is if you see performance comparisons on the
 internet, make sure you know if the OpenJPA results are using openjpa
 enhanced classes or not.  I've seen some very misleading stats comparing
 OpenJPA to other ORMs using non-enhanced classes.
 
 --
 View this message in context:
 http://openjpa.208410.n2.nabble.com/OpenJPA-vs-EclipseLink-tp7521217p7525247.html
 Sent from the OpenJPA Users mailing list archive at Nabble.com.
 
 
 




-- 
@matthewadams12
mailto:matt...@matthewadams.me
skype:matthewadams12
yahoo:matthewadams
aol:matthewadams12
google-talk:matthewadam...@gmail.com
msn:matt...@matthewadams.me
http://matthewadams.me
http://www.linkedin.com/in/matthewadams


Re: OpenJPA vs EclipseLink

2012-05-04 Thread Mark Struberg
Another such 'JPA performance test'I've seen was one using an Oracle database.

The funny thing was that it did NOT use any additional SQL other than the 
generated one.

Which means that ALL foreign key relations didn't have an Index set up! 
(Contrary to MySQL, Oracle doesn't automatically create indices for foreign 
keys by default)

I'm not sure what I should think about a guy who is doing a 'serious' 
performance test without even getting the DB indexes setup correctly ;)

I'll currently working on a blog article which describes how to make use of the 
openjpa-maven-plugin and sql-maven-plugin to efficiently handle databases in 
big applications. Not sure if I get it done before I travel to confess-2012 on 
sunday. Will keep you updated.


LieGrue,
strub



- Original Message -
 From: Matthew Adams matt...@matthewadams.me
 To: users@openjpa.apache.org
 Cc: 
 Sent: Friday, May 4, 2012 4:27 PM
 Subject: Re: OpenJPA vs EclipseLink
 
 ...or tests without your data...
 
 On Thu, May 3, 2012 at 4:28 PM, Mark Struberg strub...@yahoo.de wrote:
 
 
 
  or tests without any jdbc pool ;)
 
  LieGrue,
  strub
 
 
 
  
   From: afryer apfr...@hotmail.com
  To: users@openjpa.apache.org
  Sent: Thursday, May 3, 2012 11:27 PM
  Subject: Re: OpenJPA vs EclipseLink
  
  One thing to be aware of is if you see performance comparisons on the
  internet, make sure you know if the OpenJPA results are using openjpa
  enhanced classes or not.  I've seen some very misleading stats 
 comparing
  OpenJPA to other ORMs using non-enhanced classes.
  
  --
  View this message in context:
 
 http://openjpa.208410.n2.nabble.com/OpenJPA-vs-EclipseLink-tp7521217p7525247.html
  Sent from the OpenJPA Users mailing list archive at Nabble.com.
  
  
  
 
 
 
 
 -- 
 @matthewadams12
 mailto:matt...@matthewadams.me
 skype:matthewadams12
 yahoo:matthewadams
 aol:matthewadams12
 google-talk:matthewadam...@gmail.com
 msn:matt...@matthewadams.me
 http://matthewadams.me
 http://www.linkedin.com/in/matthewadams



Re: OpenJPA vs EclipseLink

2012-05-04 Thread José Luis Cetina
Thanks Mark, I'll be pendent for your post012/5/4 Mark Struberg 
strub...@yahoo.de

 Another such 'JPA performance test'I've seen was one using an Oracle
 database.

 The funny thing was that it did NOT use any additional SQL other than the
 generated one.

 Which means that ALL foreign key relations didn't have an Index set up!
 (Contrary to MySQL, Oracle doesn't automatically create indices for foreign
 keys by default)

 I'm not sure what I should think about a guy who is doing a 'serious'
 performance test without even getting the DB indexes setup correctly ;)

 I'll currently working on a blog article which describes how to make use
 of the openjpa-maven-plugin and sql-maven-plugin to efficiently handle
 databases in big applications. Not sure if I get it done before I travel to
 confess-2012 on sunday. Will keep you updated.


 LieGrue,
 strub



 - Original Message -
  From: Matthew Adams matt...@matthewadams.me
  To: users@openjpa.apache.org
  Cc:
  Sent: Friday, May 4, 2012 4:27 PM
  Subject: Re: OpenJPA vs EclipseLink
 
  ...or tests without your data...
 
  On Thu, May 3, 2012 at 4:28 PM, Mark Struberg strub...@yahoo.de wrote:
 
 
 
   or tests without any jdbc pool ;)
 
   LieGrue,
   strub
 
 
 
   
From: afryer apfr...@hotmail.com
   To: users@openjpa.apache.org
   Sent: Thursday, May 3, 2012 11:27 PM
   Subject: Re: OpenJPA vs EclipseLink
   
   One thing to be aware of is if you see performance comparisons on the
   internet, make sure you know if the OpenJPA results are using openjpa
   enhanced classes or not.  I've seen some very misleading stats
  comparing
   OpenJPA to other ORMs using non-enhanced classes.
   
   --
   View this message in context:
 
 
 http://openjpa.208410.n2.nabble.com/OpenJPA-vs-EclipseLink-tp7521217p7525247.html
   Sent from the OpenJPA Users mailing list archive at Nabble.com.
   
   
   
 
 
 
 
  --
  @matthewadams12
  mailto:matt...@matthewadams.me
  skype:matthewadams12
  yahoo:matthewadams
  aol:matthewadams12
  google-talk:matthewadam...@gmail.com
  msn:matt...@matthewadams.me
  http://matthewadams.me
  http://www.linkedin.com/in/matthewadams
 




-- 
---
*SCJA. José Luis Cetina*
---


Re: OpenJPA vs EclipseLink

2012-05-03 Thread Mark Struberg
Hi Andrew!

When I did my first evaluations for a new project 3 years ago. Back then I was 
checking out the sources fo EclipseLink, Hibernate and OpenJPA.

EclipseLink just didn't cut it at all. From what I've heard, the Eclipse 
community now rewrote a huge part of the code already, but they are imo still 
quite a few miles away from being production ready. I have honestly no idea how 
it could have become the RI for JPA...

Hibernate is much better. It basically works pretty well and is also relatively 
fast. There is only one thing which I don't like that much and this is their 
subclassing approach for 'enhancement'. This has a few nasty side effects and 
you need to know them.

I finally picked OpenJPA because it was (in my tests) the only JPA provider 
which was able to reliably serialize/deserialize entities without loosing state 
or trashing the database afterwards. I really need this because we have a real 
cluster environment and peak 5 mio page hits/day in our app, so not being able 
to serialize is a knock out. Of course you need a few magic properties in your 
persistence.xml:

property name=openjpa.DetachState value=loaded(DetachedStateField=true)/
property name=openjpa.Compatibility 
value=IgnoreDetachedStateFieldForProxySerialization=true/

The problem with the other JPA providers was the following scenario: 

1.) load from db
2.) change
3.) serialize (store in JSF @ViewScoped and wait for 2nd request)
4.) deserialize 

5.) change in the JSF applyValues phase

6.) merge in a JSF action


if you could change 5 and 6 then the other providers work as well. Too bad that 
doesn't fit the JSF workflow!
OpenJPA accomplishes this by _still_ using a StateManager, even if the entity 
is detached. 


In EclipseLink this didn't work at all.

In Hibernate it will work if you do _not_ use any Lazy Loading. Maybe that's 
the reason why HIbernate in the default modeeven ignores FetchType.LAZY in the 
top layer of your entity and always does eager fetching.




LieGrue,
strub


PS: I'm using build-time-enhancement with the openjpa-maven-plugin



- Original Message -
 From: Andrew Hastie and...@ahastie.net
 To: users@openjpa.apache.org
 Cc: 
 Sent: Wednesday, May 2, 2012 8:56 PM
 Subject: Re: OpenJPA vs EclipseLink
 
 For information, OpenJPA it is also embedded with IBM WebSphere.
 
 On 02/05/12 19:25, José Luis Cetina wrote:
  Hi im newbie in OpenJPA i know OpenJPA is an implementation as EclipseLink,
  i always used EclipseLink, now im moving from Glassfish to TomEE and i see
  openjpa is embeded with TomEE, i read the OpenJPA manual and i like the
  innovations in openjpa, but i just want to know the
  advantages/disadvantages of openjpa, or a little comparative with openjpa
  vs eclipselink or hibernate, and one more thing about how fast is openjpa
  vs others.
 



Re: OpenJPA vs EclipseLink

2012-05-03 Thread afryer
One thing to be aware of is if you see performance comparisons on the
internet, make sure you know if the OpenJPA results are using openjpa
enhanced classes or not.  I've seen some very misleading stats comparing
OpenJPA to other ORMs using non-enhanced classes.

--
View this message in context: 
http://openjpa.208410.n2.nabble.com/OpenJPA-vs-EclipseLink-tp7521217p7525247.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.


Re: OpenJPA vs EclipseLink

2012-05-03 Thread Mark Struberg


or tests without any jdbc pool ;)

LieGrue,
strub




 From: afryer apfr...@hotmail.com
To: users@openjpa.apache.org 
Sent: Thursday, May 3, 2012 11:27 PM
Subject: Re: OpenJPA vs EclipseLink
 
One thing to be aware of is if you see performance comparisons on the
internet, make sure you know if the OpenJPA results are using openjpa
enhanced classes or not.  I've seen some very misleading stats comparing
OpenJPA to other ORMs using non-enhanced classes.

--
View this message in context: 
http://openjpa.208410.n2.nabble.com/OpenJPA-vs-EclipseLink-tp7521217p7525247.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.





Re: OpenJPA vs EclipseLink

2012-05-02 Thread Andrew Hastie

For information, OpenJPA it is also embedded with IBM WebSphere.

On 02/05/12 19:25, José Luis Cetina wrote:

Hi im newbie in OpenJPA i know OpenJPA is an implementation as EclipseLink,
i always used EclipseLink, now im moving from Glassfish to TomEE and i see
openjpa is embeded with TomEE, i read the OpenJPA manual and i like the
innovations in openjpa, but i just want to know the
advantages/disadvantages of openjpa, or a little comparative with openjpa
vs eclipselink or hibernate, and one more thing about how fast is openjpa
vs others.