Re: Hi.. i have a question about annotations parser

2008-03-07 Thread Dain Sundstrom
I don't know the answer to this question, but if you are just looking for quick simple annotation scanning code, I suggest you take a look at xbean-finder. http://svn.apache.org/repos/asf/geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/ClassFinder.java This is what we

Re: EntityManager.lock not working

2008-02-21 Thread Dain Sundstrom
terms in the spec. The JPA 2.0 expert group is looking into this. In the mean time, only non-portable apps can get this behaviour. -Original Message- From: Dain Sundstrom [mailto:[EMAIL PROTECTED] Sent: Friday, 22 February 2008 9:50 a.m. To: dev@openjpa.apache.org Subject: EntityManager.lock

Re: EntityManager.lock not working

2008-02-21 Thread Dain Sundstrom
a pessimistic lock. The semantics of WRITE_LOCK are defined in optimistic terms in the spec. The JPA 2.0 expert group is looking into this. In the mean time, only non-portable apps can get this behaviour. -Original Message- From: Dain Sundstrom [mailto:[EMAIL PROTECTED] Sent: Frida

EntityManager.lock not working

2008-02-21 Thread Dain Sundstrom
I have a test case with two threads executing the following code: public void run() { try { beginTx(); Employee david = entityManager.getReference(Employee.class, pk); entityManager.lock(david, LockModeType.WRITE); entityManager.flus

Re: Memory leak in PCRegistry?

2008-01-17 Thread Dain Sundstrom
On Jan 17, 2008, at 5:46 PM, Kevan Miller wrote: On Jan 16, 2008, at 8:43 PM, Dain Sundstrom wrote: How about using a doubly weak map? Commons collections has one that can be forked http://commons.apache.org/collections/api-2.1.1/org/apache/commons/collections/ReferenceMap.html Google has

Re: Memory leak in PCRegistry?

2008-01-16 Thread Dain Sundstrom
, and adding a weak ref from class to classloader would effectively harden the ref to the class, and thus to the classloader. -Patrick On Jan 16, 2008 5:02 PM, Dain Sundstrom <[EMAIL PROTECTED]> wrote: Hummm, didn't an EMF have to say "I need this class enhanced"? If so, can

Re: Memory leak in PCRegistry?

2008-01-16 Thread Dain Sundstrom
class load, which is unrelated to EMF closure. -Patrick On Jan 16, 2008 4:19 PM, Dain Sundstrom <[EMAIL PROTECTED]> wrote: I'm getting the following class loader leak from PCRegistry. java.net.URLClassLoader of org.apache.openejb.test.entity.cmp.ContextLookupCmpBean pcSuper of org.ap

[jira] Reopened: (OPENJPA-316) Unenhanced OneToMany collection not loaded

2008-01-16 Thread Dain Sundstrom (JIRA)
[ https://issues.apache.org/jira/browse/OPENJPA-316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dain Sundstrom reopened OPENJPA-316: I would expect that when in unenhanced mode, OpenJPA would eager load all fields and store

Memory leak in PCRegistry?

2008-01-16 Thread Dain Sundstrom
I'm getting the following class loader leak from PCRegistry. java.net.URLClassLoader of org.apache.openejb.test.entity.cmp.ContextLookupCmpBean pcSuper of org.apache.openjpa.enhance.PCRegistry$Meta hard of org.apache.openjpa.lib.util.concurrent.ConcurrentReferenceHashMap $WeakEntr

Re: Register listener once and only once

2007-10-16 Thread Dain Sundstrom
On Oct 15, 2007, at 5:44 PM, Patrick Linskey wrote: o Add lifecycle listener at the EMF level which it is automatically added to all created EMs (of course I'll need a way to uniquely do that). I think that OpenJPAEntityManagerFactorySPI.addLifecycleListener() is your friend. Thanks Patrick.

Register listener once and only once

2007-10-15 Thread Dain Sundstrom
Background: The OpenEJB JPA based CMP engine is a wrapper around an EntityManger. The engine is designed to get out of the way of the JPA implementation so the performance is only a function of the JPA implementation. In the engine we do not have a cache or beans or even the entity manag

[jira] Resolved: (OPENJPA-315) Unenhanced generated id field of a primitive wrapper type causes NPE

2007-08-28 Thread Dain Sundstrom (JIRA)
[ https://issues.apache.org/jira/browse/OPENJPA-315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dain Sundstrom resolved OPENJPA-315. Resolution: Fixed Issue has been resolved and a test has been added > Unenhan

[jira] Commented: (OPENJPA-315) Unenhanced generated id field of a primitive wrapper type causes NPE

2007-08-28 Thread Dain Sundstrom (JIRA)
[ https://issues.apache.org/jira/browse/OPENJPA-315?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12523427 ] Dain Sundstrom commented on OPENJPA-315: Sorry. I was responding to your comment "Marking as res

Re: [VOTE] Approve OpenJPA 1.0.0 release (4th attempt)

2007-08-28 Thread Dain Sundstrom
meaux wrote: Dain- Changing the release notes now would require a re-spin and a re- vote. Would your concern be sufficiently allayed if we added a note on the OpenJPA site (e.g., in the FAQ) about this? On Aug 28, 2007, at 12:07 PM, Dain Sundstrom wrote: +1 as long as a textual descripti

Re: [VOTE] Approve OpenJPA 1.0.0 release (4th attempt)

2007-08-28 Thread Dain Sundstrom
+1 as long as a textual description is added to the release notes which documents the limits of the unenhanced mode and potential data corruption this could cause. -dain On Aug 23, 2007, at 7:10 PM, Marc Prud'hommeaux wrote: OpenJPA Developers- A fourth attempt is now being made to cut th

[jira] Reopened: (OPENJPA-315) Unenhanced generated id field of a primitive wrapper type causes NPE

2007-08-28 Thread Dain Sundstrom (JIRA)
[ https://issues.apache.org/jira/browse/OPENJPA-315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dain Sundstrom reopened OPENJPA-315: > I don't follow -- are you saying that you are seeing a data corruption > proble

Unenhanced bugs

2007-08-14 Thread Dain Sundstrom
I finally got bug reports and tests for the unenhanced issues I found: OPENJPA-314 Unenhanced complex id in MappedSuperclass causes NPE OPENJPA-315 Unenhanced generated id field of a primitive wrapper type causes NPE OPENJPA-316 Unenhanced OneToMany collection not loaded I the first one will

[jira] Updated: (OPENJPA-316) Unenhanced OneToMany collection not loaded

2007-08-14 Thread Dain Sundstrom (JIRA)
[ https://issues.apache.org/jira/browse/OPENJPA-316?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dain Sundstrom updated OPENJPA-316: --- Attachment: OPENJPA-316.patch > Unenhanced OneToMany collection not loa

[jira] Created: (OPENJPA-316) Unenhanced OneToMany collection not loaded

2007-08-14 Thread Dain Sundstrom (JIRA)
Unenhanced OneToMany collection not loaded -- Key: OPENJPA-316 URL: https://issues.apache.org/jira/browse/OPENJPA-316 Project: OpenJPA Issue Type: Bug Reporter: Dain Sundstrom

[jira] Updated: (OPENJPA-315) Unenhanced generated id field of a primitive wrapper type causes NPE

2007-08-14 Thread Dain Sundstrom (JIRA)
[ https://issues.apache.org/jira/browse/OPENJPA-315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dain Sundstrom updated OPENJPA-315: --- Attachment: OPENJPA-315.patch This patch has overrides for all the failing tests that do

[jira] Created: (OPENJPA-315) Unenhanced generated id field of a primitive wrapper type causes NPE

2007-08-14 Thread Dain Sundstrom (JIRA)
: Bug Reporter: Dain Sundstrom Priority: Critical Fix For: 1.0.0 Unenhanced generated id field of a primitive wrapper type causes NPE because the field value is null. This bug only occurs when the id field is an object type as primitive fields are automatically

Re: Unenhanced Classes

2007-08-14 Thread Dain Sundstrom
On Aug 13, 2007, at 5:23 PM, Dain Sundstrom wrote: On Aug 10, 2007, at 3:44 PM, Patrick Linskey wrote: Unenhanced, complex primary keys throw an exception when calling em.persist(myObject), but only if the id fields are in a MappedSuperclass. This is OPENJPA-314 It should be very easy

[jira] Updated: (OPENJPA-314) Unenhanced complex id in MappedSuperclass causes NPE

2007-08-14 Thread Dain Sundstrom (JIRA)
[ https://issues.apache.org/jira/browse/OPENJPA-314?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Dain Sundstrom updated OPENJPA-314: --- Attachment: OPENJPA-314.patch > Unenhanced complex id in MappedSuperclass causes

[jira] Created: (OPENJPA-314) Unenhanced complex id in MappedSuperclass causes NPE

2007-08-14 Thread Dain Sundstrom (JIRA)
Reporter: Dain Sundstrom Fix For: 1.0.0 When I have a complex id within an unenhanced MappedSuperClass, I get a NPE when calling persist. The NPE appears to be caused because ClassMetaData.getField(int) does not take unenhanced MappedSuperclass fields into account. Here

Re: Unenhanced Classes

2007-08-13 Thread Dain Sundstrom
On Aug 10, 2007, at 3:44 PM, Patrick Linskey wrote: Anyway, any ideas on a work around for these problems or is this something I can help with? Failing tests would be swell -- just make the test name be 'xtestFoo' or something so that we don't pick it up. The permanent lazy loading problem is

Re: Drop and recreate tables or clear tables?

2007-08-11 Thread Dain Sundstrom
add any schema elements that don't exist and then delete all rows from all mapped tables, do: openjpa.jdbc.SynchronizeMappings: buildSchema(SchemaAction='add,deleteTableContents') -Patrick On 8/10/07, Dain Sundstrom <[EMAIL PROTECTED]> wrote: Reading the archives it sounds

Drop and recreate tables or clear tables?

2007-08-10 Thread Dain Sundstrom
Reading the archives it sounds like drop and recreate table support was added along with support for clear tables. Unfortunately, I can't find any definitive docs on how I turn this on. Can anyone tell me the exact property settings to turn either of these two features on? Thanks, -dai

Re: Unenhanced Classes

2007-08-10 Thread Dain Sundstrom
lem you mentioned below? == Anyway, any ideas on a work around for these problems or is this something I can help with? -dain On Aug 9, 2007, at 8:05 PM, Dain Sundstrom wrote: On Aug 9, 2007, at 6:26 PM, Patrick Linskey wrote: Hi, Some brief notes: In Java5 wit

Re: Unenhanced Classes

2007-08-09 Thread Dain Sundstrom
On Aug 9, 2007, at 6:26 PM, Patrick Linskey wrote: Hi, Some brief notes: In Java5 without an agent and enhancement, what doesn't work perfectly (I don't care about performance issues)? - Lazy loading on user-created instances after flush What is this and is this something the user woul

Unenhanced Classes

2007-08-09 Thread Dain Sundstrom
I just discovered the new Unehanced Class support, and am super excited. I was one of the grumblers Craig mentioned :) I've read the archives, but have a few questions. I apologize if this was covered somewhere else. In Java5 without an agent and enhancement, what doesn't work perfect

Re: For review: OpenJPA is graduated to Top Level Project

2007-06-05 Thread Dain Sundstrom
On Jun 5, 2007, at 9:36 AM, Craig L Russell wrote: On Jun 5, 2007, at 9:26 AM, Dain Sundstrom wrote: On Jun 5, 2007, at 3:06 AM, Craig L Russell wrote: Apache OpenMQ What is Apache OpenMQ? I've never heard of it and can't find an entry in Google. Did you mean Apache Acti

Re: For review: OpenJPA is graduated to Top Level Project

2007-06-05 Thread Dain Sundstrom
On Jun 5, 2007, at 3:06 AM, Craig L Russell wrote: Apache OpenMQ What is Apache OpenMQ? I've never heard of it and can't find an entry in Google. Did you mean Apache ActiveMQ? -dain

Re: [DISCUSS] use backport-concurrent instead of repackaged concurrent classes

2007-06-04 Thread Dain Sundstrom
+1 (but I'd rather just drop 1.4 support) -dain On Jun 4, 2007, at 4:22 PM, Patrick Linskey wrote: Hi, In the process of doing some concurrency-related work on OpenJPA, I've run across the need for a ReentrantReadWriteLock, akin to what is in Java 5's java.util.concurrent package, Emory Unive

Re: Comparison Metrics for OpenJPA's ConcurrentHashMap

2007-06-04 Thread Dain Sundstrom
I think this thread shows that there are some critical maps at the core of JPA, and it shows that the optimal map for an environment is debatable. Is this something we could make configurable? I'm personally very very skeptical of micro-benchmarks, and won't be convinced which is best unt