Re: out of memory issues

2009-01-28 Thread Adam Hardy
Hi Mike, thanks for the input. The child objects are mapped entities and they total around 25 * 300, so 7500. This is their structure: private Long id; private BigDecimal total; private DollarReturn dollarReturn; private TestAnalysis testAnalysis; where DollarReturn and

[URGENT] performance issues

2009-01-28 Thread is_maximum
Hi We have a big problem in performance. We are using JProbe to inspect what happens in our code and there is a critical business method which is required to have a high TPS but unfortunately this method is doing its job really slow. Using JProbe, we found out that in a simple query or persist

Re: out of memory issues

2009-01-28 Thread Jeremy Bauer
Adam, Are you using compile time enhancement or does the web container do enhancement? If not, runtime enhancement will be used and I've seen cases where non-agent runtime enhancement can significantly increase memory usage. If you aren't certain, an easy way to check is to disable runtime

Re: out of memory issues

2009-01-28 Thread Adam Hardy
Hi Jeremy, compile-time enhancement is being used. I figured it would have to be something like that. I just upgraded to JDK 1.6 to see if the enhancement provided that way is better, so fingers crossed. Otherwise I'll have to build in the enhancement stage into the maven build and from

Re: Merge of an already managed instance before query execution

2009-01-28 Thread Michael Dick
Hi, Are you executing the queries using the same EntityManager, or are there different EM instances? Also are you using a DataCache? I believe there have been similar issues reported with caching enabled. If you're using the same em then you shouldn't need to flush or call merge. The state of

Re: out of memory issues

2009-01-28 Thread Adam Hardy
Sorry, didn't mean compile-time enhancement, I was just mindlessly parroting the words I was reading :$ I started off using nothing, making no changes. No javaagent, nada. Now I've upgraded to Java 1.6 and I'm trying to get that working but today's not being very productive. However Java 6

Re: out of memory issues

2009-01-28 Thread Adam Hardy
I'm now trying the build-time enhancement. My set-up is not playing well with the PCEnhancer. I get this: 158 OpenJPA INFO [main] openjpa.Tool - No targets were given. Running on all classes in your persistent classes list, or all metadata files in classpath directories if you have not

Re: out of memory issues

2009-01-28 Thread Adam Hardy
Just to report back on my results using Java 6 class retransformation: the performance isn't any better. I just double checked what was going on in terms of workload and I underestimated the number of child entities that I am creating. It's more in the area of 30,000 or 4 to 5 times more than

Re: [URGENT] performance issues

2009-01-28 Thread is_maximum
Hi Kevin Thanks for your reply How are you invoking the enhancer? First I tried to set the javaagent in my App server but there was a NoClassDefFoundError so I leave it out and in OpenJPA manual I found that the enhancer in Java EE 5 will be automatically enabled. Thus actually I am relying on

Re: out of memory issues

2009-01-28 Thread Adam Hardy
Yet another question, just in case you weren't entirely sick of me already: is it so that the byte code manipulation algorithms cannot handle inner classes on the entity classes? I have several such inner classes and I get this compile error (when compiling after doing the enhancement):

Re: [URGENT] performance issues

2009-01-28 Thread Kevin Sutter
More comments inline... On Wed, Jan 28, 2009 at 12:13 PM, is_maximum mnr...@gmail.com wrote: Hi Kevin Thanks for your reply How are you invoking the enhancer? First I tried to set the javaagent in my App server but there was a NoClassDefFoundError so I leave it out and in OpenJPA manual I

Re: out of memory issues

2009-01-28 Thread Jeremy Bauer
Adam, I've found that if you want to run enhancement on a specific pu you can target it by using the -p parameter with the path to your persistence file suffixed by an anchor followed by the specific pu name. example: java -cp %ENHANCER_PATH% org.apache.openjpa.enhance.PCEnhancer -p

lucene integration with openjpa?

2009-01-28 Thread Roger Keays
Hi, Is is possible to index openjpa entities with lucene ala Hibernate Search? Cheers, Roger

Re: lucene integration with openjpa?

2009-01-28 Thread Pinaki Poddar
Hi, AFAIK something of similar nature has been attempted. Am not sure of the details but please refer [1] [1] http://www.opensymphony.com/compass/versions/1.2M3/html/gps-embeddedopenjpa.html -- View this message in context:

Re: [URGENT] performance issues

2009-01-28 Thread Pinaki Poddar
Hi, 1. If locking is less of a priority then performance, then use property name=openjpa.LockManager value=none/ By default, OpenJPA goes for optimistic lock mode. So as Kevin pointed out, without @Version and default Optimistic lock mode -- many wasted SQL to compare state for version

Re: orderBy

2009-01-28 Thread Pinaki Poddar
Hi, Check @OrderBy annotation in OpenJPA docs for something similiar. -- View this message in context: http://n2.nabble.com/orderBy-tp2203853p2237172.html Sent from the OpenJPA Users mailing list archive at Nabble.com.

Re: Alternatives to annotations for metadata?

2009-01-28 Thread Pinaki Poddar
Hi Philip, OpenJPA specific annotations do not have a counterpart in orm.xml. The pain is obvious but that the orm.xml XSD did not allow a vendor-extension clause makes it somewhat more difficult to get these vendor-specific annotations in xml descriptors. If a persistent entity in annotated

Re: How to delete polymorphic entity?

2009-01-28 Thread Pinaki Poddar
Hi, The argument is mixing type-level inheritance with instance level parent-child relationship. class A extends B {} A a1 = new A(); B b1 = new B(); OOP does not say a1 and shares a a parent-child relationship. But loosely speaking, one can say A is a child class of B. Now if the

Re: @OneToMany/@ManyToOne Weirdness (List contains non-matching elements)

2009-01-28 Thread Pinaki Poddar
Hi, The way RFW_RFC_CODE column is used at following two different context, it leaves open a possibility of coding error. @ManyToOne @JoinColumn(name=RFW_RFC_CODE) private ReferenzCode parent; @Column(name = RFW_RFC_CODE) private String referenzCode; For

Re: lucene integration with openjpa?

2009-01-28 Thread Roger Keays
Pinaki Poddar a écrit : Hi, AFAIK something of similar nature has been attempted. Am not sure of the details but please refer [1] [1] http://www.opensymphony.com/compass/versions/1.2M3/html/gps-embeddedopenjpa.html That looks perfect, thanks!