Bad Derby query

2007-04-02 Thread Dain Sundstrom
I have the following query: SELECT a.alias FROM AliasBean AS a WHERE (a.alias IS NULL AND ?1 IS NULL) OR a.alias = ?1 Which works great when run against HSQLDB. When I switch the database to Derby I get the following exception: <0|false|0.9.6-incubating> org.apache.openjpa.persistence

Re: Bad Derby query

2007-04-02 Thread Dain Sundstrom
On Apr 2, 2007, at 8:06 PM, Craig L Russell wrote: Hi Dain, I've seen this problem as well, with a different provider. The JPA spec lead sez that "?1 IS NULL" is not a portable JPAQL query, even though some providers can generate SQL that some databases can execute properly. OpenJPA is

Re: Duplicate Query - where none exists

2007-04-04 Thread Dain Sundstrom
I think I saw this once. The problem is in JPA named queries are all contained in a single global namespace, so if you have to persistent beans that define queries with the same name you get a warning. It would be nice if the warning told you where the duplicate declarations are located.

Re: Bad Derby query

2007-04-04 Thread Dain Sundstrom
this being something that was fixed recently, but a quick search through JIRA doesn't reveal anything. Could you try it out against the latest 0.9.7-incubating-SNAPSHOT and let us know if still happens? On Apr 2, 2007, at 5:27 PM, Dain Sundstrom wrote: I have the following query: SELE

Re: [VOTE] ArgumentException : More parameters were passed to execute() than were declared

2007-04-04 Thread Dain Sundstrom
I tested the fix and it solved my problem. Thanks, -dain On Apr 2, 2007, at 3:00 PM, Marc Prud'hommeaux wrote: Dain- On Apr 2, 2007, at 12:23 PM, Dain Sundstrom wrote: Is this something we can put in 0.9.7 or has that been cut already? I've gone ahead and committed the fi

Can I reuse instances?

2007-04-08 Thread Dain Sundstrom
Is it possible to reuse instances from transaction to transaction? I would like to be able to create a bean in one transaction, detach it and reattach the same instance in a new transaction. My goal here is specifically to reuse instances across transactions because they have a very expens

Re: Can I reuse instances?

2007-04-08 Thread Dain Sundstrom
On Apr 8, 2007, at 10:20 AM, Craig L Russell wrote: Hi Dain, On Apr 8, 2007, at 12:17 AM, Dain Sundstrom wrote: Is it possible to reuse instances from transaction to transaction? I would like to be able to create a bean in one transaction, detach it and reattach the same instance in a new

Re: Can I reuse instances?

2007-04-08 Thread Dain Sundstrom
ndividual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it. -Original Message- From: Dain Sundstrom [mailto:[EMAIL PROTECTED] Sent: Sunday, April 08, 2007 12:18 AM To:

Re: Can I reuse instances?

2007-04-09 Thread Dain Sundstrom
On Apr 8, 2007, at 1:56 PM, Craig L Russell wrote: Hi Dain, I haven't looked in detail at the life cycle of CMP beans in a couple of years, but in general you can't simply keep the state of the underlying Entities through the life cycle. CMP beans are pooled and reused in transaction cont

Re: Can I reuse instances?

2007-04-10 Thread Dain Sundstrom
On Apr 9, 2007, at 5:44 PM, Craig L Russell wrote: Hi Dain, On Apr 9, 2007, at 11:10 AM, Dain Sundstrom wrote: On Apr 8, 2007, at 1:56 PM, Craig L Russell wrote: Hi Dain, I haven't looked in detail at the life cycle of CMP beans in a couple of years, but in general you can't s

Re: Can I reuse instances?

2007-04-10 Thread Dain Sundstrom
On Apr 9, 2007, at 12:41 PM, Patrick Linskey wrote: you need an instance. In CMP the assumption is that entity instances are expensive to create, so less safe route and you pool them. Reusing instances is really a CMP problem, but I don't think it can be implemented without the help of the JPA

Re: Can I reuse instances?

2007-04-10 Thread Dain Sundstrom
On Apr 10, 2007, at 1:24 PM, Craig L Russell wrote: Hi Dain, On Apr 10, 2007, at 12:58 PM, Dain Sundstrom wrote: On Apr 9, 2007, at 5:44 PM, Craig L Russell wrote: Hi Dain, On Apr 9, 2007, at 11:10 AM, Dain Sundstrom wrote: On Apr 8, 2007, at 1:56 PM, Craig L Russell wrote: Hi Dain

Float primary key?

2007-04-10 Thread Dain Sundstrom
I know it is a really really really stupid idea to use an approximate type at a primary key, but there is a test in the CMP test suite that uses a float for a primary key. When I deploy this bean, I get an exception like the following: Caused by: <0.9.7-incubating-SNAPSHOT fatal user error

Re: Float primary key?

2007-04-11 Thread Dain Sundstrom
On Apr 11, 2007, at 7:28 AM, Kevin Sutter wrote: Okay, I looked at the spec a bit closer and it looks like we need to allow for floats as primary keys: "The primary key (or field or property of a composite primary key) should be one of the following types: any Java primitive type; any prim

Re: Artifact names

2007-04-12 Thread Dain Sundstrom
In Geronimo, we publish to the maven repo as maven likes, but when we publish to the apache distribution mirrors (for website downloads), we name the files as we like. -dain On Apr 11, 2007, at 8:34 AM, Michael Dick wrote: Hi, I'm hitting a bit of a snag with the staging repository for re

Set query params without TX?

2007-04-24 Thread Dain Sundstrom
I have some code that runs outside of a transaction which does basically the following: Query query = entityManager.createNamedQuery(name) query.setParameter(1, "foo"); List results = query.getResultList(); If I don't set the parameter the code works fine (assuming the query didn

Re: Possible problem with ddl with only a jta-datasource and sequences

2007-04-24 Thread Dain Sundstrom
On Apr 24, 2007, at 2:17 PM, Kevin Sutter wrote: Patrick, On 4/24/07, Patrick Linskey <[EMAIL PROTECTED]> wrote: > One way to do this would > be to package the work up in a Runnable and execute it in an > appropriate transactional environment. It might be easier to > understand if the sequen

Re: Set query params without TX?

2007-04-24 Thread Dain Sundstrom
24, 2007, at 3:07 PM, Marc Prud'hommeaux wrote: Dain- Can you send the embedded exception as well? That should tell us who closed the query, and it might give us a hint why... On Apr 24, 2007, at 3:03 PM, Dain Sundstrom wrote: I have some code that runs outside of a transaction which

Re: Set query params without TX?

2007-04-24 Thread Dain Sundstrom
I am "they", the one writing the cmp code in OpenEJB. On first read of the stack trace I thought as you that, I was the one close the entity manager, but on a second read I notice it was OpenJPA calling "closeIfNoTx" that closes the broker. On Apr 24, 2007, at 7:0

Re: Set query params without TX?

2007-04-24 Thread Dain Sundstrom
privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it. -----Original Message- From: Dain Sundstrom [mai

Re: Set query params without TX?

2007-04-25 Thread Dain Sundstrom
On Apr 24, 2007, at 10:35 PM, Patrick Linskey wrote: Yep -- you've gotta keep it open. If you want to support any JPA impl, you need to have an EM proxy (please please please make it a dynamic proxy that implements all the interfaces that the proxied thing implements). That code is from my pro

Re: Set query params without TX?

2007-04-25 Thread Dain Sundstrom
On Apr 25, 2007, at 10:22 AM, Patrick Linskey wrote: If I want to have generic code, how am I supposed to implement the createNamedQuery method? Do I leave the EM open forever? That doesn't seem right. So when am I supposed to close the EM? 1. Create an EM proxy. You've already got one, so

Re: Set query params without TX?

2007-04-25 Thread Dain Sundstrom
Is a query a one time use object? Meaning, I only get to call getResultList(), getSingleResult(), or executeUpdate() once and then I have to get a new instance. Also you stated: On Apr 24, 2007, at 10:35 PM, Patrick Linskey wrote: (please please please make it a dynamic proxy that implemen

Re: More questions on runtime schema generation

2007-04-27 Thread Dain Sundstrom
On Apr 26, 2007, at 1:49 PM, David Jencks wrote: Thanks for all the comments, I've learned a lot. 1. I have a classloader scanning strategy written and apparently working, however it is rather slow at least in geronimo. Is anyone interested in it, seeing as how its not an appropriate appro

Re: [VOTE] Graduate from Incubation

2007-05-03 Thread Dain Sundstrom
+1 -dain On May 3, 2007, at 7:22 AM, Craig L Russell wrote: This vote is to send the attached draft board resolution to the incubator for the purpose of graduation from the incubator to the Apache OpenJPA project. +1 We're ready; let's graduate 0 Don't care -1 Let's wait Establish the

Re: [VOTE] Graduate from Incubation

2007-05-04 Thread Dain Sundstrom
I personally define OpenJPA by the persistence engine and not the spec it implements. A good persistence engine is very hard to write, but adapting it to new persistence specs if fairly easy in comparison. I would like to see the scope be limited to java persistence with an eye toward the

Re: [VOTE] Graduate from Incubation

2007-05-04 Thread Dain Sundstrom
On May 4, 2007, at 10:50 AM, Phill Moran wrote: Would we then not have to change the overall name from JPA to openPersistence or some such? That would suck. I see no reason we would "have to change" the name. It is a choice of the community. Why not let another project lift out the en

Re: [VOTE] Graduate from Incubation

2007-05-04 Thread Dain Sundstrom
Now I'm sorry I sent this email and would like to withdraw my comments. If the community wants to change the charter or name they can petition the board later. I'd like to see the vote continue as is. -dain On May 4, 2007, at 10:36 AM, Dain Sundstrom wrote: I personally define

Re: Enable Java 2 Security in EE environment causes Access denied exception

2007-05-23 Thread Dain Sundstrom
On May 23, 2007, at 7:56 PM, Marc Prud'hommeaux wrote: I asked a number of times for a security audit to be made of the security implications of JPA and it was never taken up. Most of the vendors make extensive use of privileged operations including getting system properties, reflection,

new-delete-new-find doesn't work

2007-05-24 Thread Dain Sundstrom
I have a piece of code that effectively does the same thing the following test does: private void newDeleteNew() throws Exception { beginTx(); // Create new Person dain = new Person(); dain.setName("dain"); assertFalse(entityManager.contains(dain));

Re: new-delete-new-find doesn't work

2007-05-29 Thread Dain Sundstrom
^nudge -dain On May 24, 2007, at 8:13 PM, Dain Sundstrom wrote: I have a piece of code that effectively does the same thing the following test does: private void newDeleteNew() throws Exception { beginTx(); // Create new Person dain = new Person

Re: new-delete-new-find doesn't work

2007-05-29 Thread Dain Sundstrom
x27;t hurt). I have a few inline comments below... I haven't tried your specific example yet, just some observations... Thanks. Kevin On 5/29/07, Dain Sundstrom <[EMAIL PROTECTED]> wrote: ^nudge -dain On May 24, 2007, at 8:13 PM, Dain Sundstrom wrote: > I have a piece of c

Re: new-delete-new-find doesn't work

2007-05-31 Thread Dain Sundstrom
Kevin On 5/29/07, Dain Sundstrom <[EMAIL PROTECTED]> wrote: Thanks for taking a look at this. I tried adding a flush after the remove but the test fails at the same location. I also tried commenting out the merge calls, but it fails at the same point. Any ideas? Do you think it is a bug?

Flush all caches?

2006-12-07 Thread Dain Sundstrom
I've been trying to write some test cases using JPA and can't seem to find a way to get OpenJPA to flush the cached beans between transactions. Basically, I've been trying to do this: void test1() { cleanDB try { beginTx testSomething commitTx } finally { rollbackLeftOv

Re: Flush all caches?

2006-12-08 Thread Dain Sundstrom
On Dec 8, 2006, at 10:24 AM, Abe White wrote: 1. You must use a new EntityManager for each test. Other than the cost of not having a cache (which is what I want), it is expensive to be creating a new EntityManager for each transaction? 2. If you have the DataCache enabled, you'll have to c

Re: Flush all caches?

2006-12-08 Thread Dain Sundstrom
On Dec 8, 2006, at 11:29 AM, Abe White wrote: Other than the cost of not having a cache (which is what I want), it is expensive to be creating a new EntityManager for each transaction? No. In general, is it a good strategy to use a new EntityManager for each transaction? I think it is

Re: Flush all caches?

2006-12-08 Thread Dain Sundstrom
On Dec 8, 2006, at 1:34 PM, Pinaki Poddar wrote: I think it is great for testing, but I am concerned about having to write code two different ways, one for single node deployment and another way for a clustered deployment. is the testing environment a Weblogic cluster? Kodo has a new cluster-w

Derby support?

2006-12-08 Thread Dain Sundstrom
Does OpenJPA support derby auto generated identity columns? If so, is there anything special I need to add to get it to work? Also, I noticed that OpenJPA seems to have automatic database type discovery logic, but it doesn't seem to properly identify Derby. Is there logic to detect Derby?

Re: Derby support?

2006-12-08 Thread Dain Sundstrom
Dain- On Dec 8, 2006, at 5:20 PM, Dain Sundstrom wrote: Does OpenJPA support derby auto generated identity columns? If so, is there anything special I need to add to get it to work? It should work automatically. What kind of problems are you having with it? It was trying to insert into th

Re: extending the life of a LRS query

2006-12-09 Thread Dain Sundstrom
I am by no means an OpenJPA expert, but I did see something related to this when reading the docs yesterday. OpenJPA has a QueryResultsCache where it keeps the results of a query so if you run the query again you get the same results (I'm not sure if that is what you want). Here is the co

EntityManager usage pattern

2006-12-09 Thread Dain Sundstrom
Based on the feed back I got on the "Flush all caches" thread, I wanted to clarify the preferred usage pattern for EntityManager. Abe White said, "You must use a new EntityManager for each test" and I'm not sure if that was advice for my specific use case, or if in general, I should create

Auto create tables?

2006-12-09 Thread Dain Sundstrom
Is there a way to make openjpa create tables automatically for me? It would make testing much easier. -dain

OneToOne Broken

2006-12-09 Thread Dain Sundstrom
I have a very simple one-to-one test that doesn't seem to be working. The test executes three transactions each with a new entity manager. In the first tx, I create two bean and persist them. In the second transaction, I find the two beans again and set the relationship property. In the

Re: Flush all caches?

2006-12-11 Thread Dain Sundstrom
On Dec 11, 2006, at 2:09 AM, Patrick Linskey wrote: -Original Message- From: Dain Sundstrom [mailto:[EMAIL PROTECTED] Sent: Friday, December 08, 2006 1:12 PM To: open-jpa-dev@incubator.apache.org Subject: Re: Flush all caches? On Dec 8, 2006, at 11:29 AM, Abe White wrote: Other than

Collection (or Map) relationships and null

2006-12-11 Thread Dain Sundstrom
When I access a collection (or Map) valued relation field when will the field value be null and when won't it be null? In CMP 2, it was gaurenteed that the field was always non-null, but I'd expect with OpenJPA that it is at least null form new() to em.persist(). Also, what happens when so

Get primary key from persistent bean

2006-12-11 Thread Dain Sundstrom
Is there a way to extract the primary key from a persistent bean using a spec JPA API or an API specific to OpenJPA? I'm thinking of something like this: MyBean bean = new MyBean(); entityManager.persist(bean); Object pk = entityManager.getPrimaryKey(bean); MyBean foundBean =

Property to disable store cache?

2006-12-11 Thread Dain Sundstrom
Is there an openjpa property I can set in my persistence.xml to disable the store cache? I would like to set this on my test persistence units so it does no caching between transactions. -dain

Re: Collection (or Map) relationships and null

2006-12-11 Thread Dain Sundstrom
On Dec 11, 2006, at 2:09 PM, Patrick Linskey wrote: If you have a null indicator for the collection / map field, then OpenJPA will preserve the null-ness. What's that? I see you can specify a column as being not nullable but I don't see anything in the spec about null and collections. Ot

Re: Flush all caches?

2006-12-11 Thread Dain Sundstrom
On Dec 11, 2006, at 2:41 PM, Patrick Linskey wrote: Interesting indeed. It's behavior that can be implemented just by an appserver, but Kodo also has properties to handle the work internally. You might be triggering that behavior by using a PUInfo to initialize; how are you doing that exactly?

Re: Get primary key from persistent bean

2006-12-11 Thread Dain Sundstrom
On Dec 11, 2006, at 5:34 PM, Craig L Russell wrote: Hi Dain, How about Object pk = bean.getId(); That implies that every persistent bean implements getId(). That would work find for the beans I write but not for beans other write. This is a major hole in the JPA spec if you ask me. -

Re: Get primary key from persistent bean

2006-12-11 Thread Dain Sundstrom
On Dec 11, 2006, at 6:03 PM, Craig L Russell wrote: Hi Dain, I've never seen an @Entity without an @Id annotation. I don't believe it is a valid JPA mapping without an @Id. That said, it's not required to be named Id. I'm not using annotations at all. Everything is done in the mappings

Map based one-to-many

2006-12-11 Thread Dain Sundstrom
You new it was coming... so do Map based collections work? :) As many of you know, I'm trying to implement CMP2 on top of OpenJPA. To implement CMR collection sets, it would be very convenient to have a Map instead of just a Set, so I was very pleased to see support for this in the JPA sp

Re: Map based one-to-many

2006-12-12 Thread Dain Sundstrom
Excellent. That totally worked :) Thanks, -dain On Dec 12, 2006, at 10:05 AM, Abe White wrote: OneToMany mappings default to using a join table unless you name the inverse field with mapped-by. __ _ Notice: This email mess

Re: Collection (or Map) relationships and null

2006-12-12 Thread Dain Sundstrom
On Dec 12, 2006, at 1:45 PM, Craig L Russell wrote: There's nothing that I can find in the JPA specification about preserving null vs. empty Collections and Maps. There's no good (practical) way to implement null values for these types in relational databases, which is the target of the spe

Re: Flush all caches?

2006-12-12 Thread Dain Sundstrom
On Dec 12, 2006, at 1:51 PM, Craig L Russell wrote: Hi Dain, On Dec 11, 2006, at 9:58 AM, Dain Sundstrom wrote: I'm really working on a replacement for the OpenEJB Castor CMP container that uses OpenJPA instead. I'm just hacking in the CMRs right now, hence all the relationship

[no subject]

2006-12-12 Thread Dain Sundstrom
Does JPA guarantee that only one bean will be activated for a specific pk per transaction? Specifically, will OpenJPA ever create more that one bean for a specific Class:PK in a single transaction? The reason I'm asking is I may want to use an identity map and don't want to end up with mul

Re: RE: Instances and transactions...

2006-12-12 Thread Dain Sundstrom
Sorry about he subject free email :) On Dec 12, 2006, at 6:42 PM, Patrick Linskey wrote: On Dec 12, 2006, at 6:24 PM, Dain Sundstrom wrote: Does JPA guarantee that only one bean will be activated for a specific pk per transaction? Yes. Specifically, will OpenJPA ever create more that one

Are relation sets identity, pk or bean.equals() based?

2006-12-12 Thread Dain Sundstrom
If I have a one-to-many set, what is used to determine object equality in the set: object identity, pk or bean.equals(other)? -dain

Re: Are relation sets identity, pk or bean.equals() based?

2006-12-13 Thread Dain Sundstrom
Hi Dain, On Dec 12, 2006, at 7:55 PM, Dain Sundstrom wrote: If I have a one-to-many set, what is used to determine object equality in the set: object identity, pk or bean.equals(other)? You are probably better off using database identity for equality. If all the elements are of the

Re: Are relation sets identity, pk or bean.equals() based?

2006-12-13 Thread Dain Sundstrom
On Dec 13, 2006, at 4:56 PM, Marc Prud'hommeaux wrote: If you declare the field to be an interface type and you don't initialize the field to anything, I don't remember how we decide what impl to use. Looking at the code in ProxyManagerImpl.java, it appears that we default to ArrayList for f

Re: Setting a datasource and a transaction manager

2006-12-13 Thread Dain Sundstrom
You could write your own implementation of PerisitenceUnitImpl, and that has real DataSources specified. -dain On Dec 13, 2006, at 4:42 PM, Matthieu Riou wrote: Sorry to be a pain but the thing is, we don't want to use any JNDI to register our datasource. We just create our own so that would

Re: svn commit: r488714 - /incubator/openjpa/STATUS

2006-12-20 Thread Dain Sundstrom
On Dec 19, 2006, at 6:24 PM, David Blevins wrote: On Dec 19, 2006, at 11:40 AM, Patrick Linskey wrote: Hi, It's probably worth noting that 0.9.6 is now bundled with Spring. Should I update the STATUS file accordingly? It's also in Geronimo 1.2 beta and 2.0-m1 -David Don't forget the

JPQLExpressionBuilder uses wrong classloader

2006-12-27 Thread Dain Sundstrom
I've been working on a getting JPA runtime enhancement and have run into a problem where OpenJPA is loading my classes from the wrong class loader. When I create a persistence unit info it supplies a specific class loader for OpenJPA to use when resolving application classes. When I execu

Re: JPQLExpressionBuilder uses wrong classloader

2006-12-27 Thread Dain Sundstrom
Also it appears that the Broker be loading classes from the thread context class loader when persist is called. -dain On Dec 27, 2006, at 5:34 PM, Dain Sundstrom wrote: I've been working on a getting JPA runtime enhancement and have run into a problem where OpenJPA is loading my cl

Debugger Not Working?

2006-12-30 Thread Dain Sundstrom
Anyone having trouble using a debugger with openjpa? When I run OpenJPA embedded into OpenEJB it seems to corrupt the debugger. I set a break point and the VM pauses at the break point but doesn't break. If I press the "pauses" button in intellij the vm is hung at my break point but the

Re: Debugger Not Working?

2006-12-30 Thread Dain Sundstrom
I think is might be intellij because when I use maven to run the tests and attach remotely it works... kinda sucks :( -dain On Dec 30, 2006, at 8:03 PM, Dain Sundstrom wrote: Anyone having trouble using a debugger with openjpa? When I run OpenJPA embedded into OpenEJB it seems to corrupt

Re: Debugger Not Working?

2006-12-31 Thread Dain Sundstrom
On Dec 31, 2006, at 12:04 AM, Marc Prud'hommeaux wrote: I've never experienced this problem, but as a guess, are you running with dynamic enhancement (using the "-javaagent" flag)? If so, what happens if you enhance manually, and then run without the agent flag? Currently, I am, but I ca

Generation of entity classes

2006-12-31 Thread Dain Sundstrom
I working on an implementation of the EJB cmp specification which uses JPA under the covers to implement the persistence. I have the basics working with hand written subclasses of the abstract cmp2 beans. I just wrote a code generator to replace my hand coded subclasses using ASM (which r

Re: Generation of entity classes

2006-12-31 Thread Dain Sundstrom
Actually, never mind. Due to the interconnectedness of persistent classes (i.e., relationships), I need to generate all the classes at once and add them all to the class loader at the same time. This means my "elegant" solution is just broken :) -dain On Dec 31, 2006, at 3:1

Re: Generation of entity classes

2007-01-01 Thread Dain Sundstrom
entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it. -Original Message- From: Dain Sundstrom [mailto:[EMAIL PROTECTED] Sent: Sunday, December 31, 2006 9:19 PM To: open-jpa

Re: Perform automatic drop and create db schema

2007-01-02 Thread Dain Sundstrom
If you use hsqldb or H2 you can create an in-memory which will always be empty. This makes testing very easy and fast. -dain On Jan 2, 2007, at 12:34 PM, Shay Banon wrote: I am trying to figure out how to configure OpenJPA to perform drop and then create the db schema. I got as far as:

Re: @IdClass annotation for id field of type byte[]

2007-01-02 Thread Dain Sundstrom
Can you have java field of type byte[] that maps to a NUMERIC (or heck a varchar) in he db? I'm guessing that Kevin's guid is a fixed 128 bit number. If it is and he can map it to a non-blob type, it should be possible to join with any database system. -dain On Jan 2, 2007, at 3:09 PM, M

BrokerImpl using thread class loader?

2007-01-02 Thread Dain Sundstrom
The BrokerImpl class initializes the _loader to Thread.currentThread ().getContextClassLoader() when constructed (when an EM is constructed). This cl is used while loading the mappings file. This causes the entity classes to be loaded from the thread context class loader instead of the cla

What causes an optimistic exception?

2007-01-04 Thread Dain Sundstrom
I'm getting this exception printed to my log, but my tests work. Is my test doing something wrong? <2|false|0.9.6-incubating> org.apache.openjpa.util.OptimisticException: Optimistic locking errors were detected when flushing to the data store. The following objects may have been concurr

Re: What causes an optimistic exception?

2007-01-04 Thread Dain Sundstrom
On Jan 4, 2007, at 1:12 PM, Michael Dick wrote: By default OpenJPA uses optimistic transactions (ie the transaction does not lock database records). Since the database records aren't locked there is a chance that a second transaction can modify the record before the first one completes. Th

Re: What causes an optimistic exception?

2007-01-05 Thread Dain Sundstrom
intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it. -Original Message- From: Dain Sundstrom [mailto:[EMAIL PROTECTED

Re: What causes an optimistic exception?

2007-01-10 Thread Dain Sundstrom
AM, Dain Sundstrom wrote: I'm getting this exception printed to my log, but my tests work. Is my test doing something wrong? <2|false|0.9.6-incubating> org.apache.openjpa.util.OptimisticException: Optimistic locking errors were detected when flushing to the data store. The

Re: detachment, getReference(), and openjpa.DetachState

2007-01-17 Thread Dain Sundstrom
On Jan 17, 2007, at 12:07 PM, Patrick Linskey wrote: The tests can be made to pass by setting the openjpa.DetachState property to 'fgs', 'loaded' is the proper default. If the CTS is relying on any state being loaded after a call to getReference(), then those CTS tests are wrong and should be

Re: Using query hints for mapping extensions in orm.xml

2007-01-18 Thread Dain Sundstrom
IIRC this sort of extension would only be allowed if the original schema "http://java.sun.com/xml/ns/persistence/orm"; has explicitly allowed extension. Historically, Sun has made it impossible to extend their xml documents. -dain On Jan 18, 2007, at 6:16 AM, Kevin Sutter wrote: Do we ha

Re: SchemaCase setting in org.apache.openjpa.jdbc.sql.SQLServerDictionary

2007-01-30 Thread Dain Sundstrom
You should add that to the database specific notes section in the documentation before we all forget about this :) -dain On Jan 29, 2007, at 11:50 PM, Marc Prud'hommeaux wrote: William- I didn't know it was an option to have a SQL Server instance be case-sensitive. Anyway, you can just

Mappings for non-existant classes

2007-01-30 Thread Dain Sundstrom
I have a mapping file that contains mappings for some classes that don't exist (at least in my current testcase). I expect that openjpa would ignore these mappings (maybe print a warning) but instead I get an exception: Caused by: org.xml.sax.SAXException: file:/Users/dain/work/openejb/ t

log create table statements?

2007-01-30 Thread Dain Sundstrom
I have openjpa setup to auto create my tables, and I see openjpa the tables using in my log, but I don't see the create table statements. I have this in my persistenc.xml file value="buildSchema(ForeignKeys=true)"/> I there some other property I need to set? -da

Re: Perform automatic drop and create db schema

2007-01-31 Thread Dain Sundstrom
What version of OpenJPA will this be in and did dropTable get implemented? -dain On Jan 2, 2007, at 6:50 PM, Patrick Linskey wrote: -Original Message- From: Shay Banon [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 02, 2007 2:33 PM To: open-jpa-dev@incubator.apache.org Subject: RE:

Re: log create table statements?

2007-01-31 Thread Dain Sundstrom
re else). On Jan 30, 2007, at 3:30 PM, Dain Sundstrom wrote: > I have openjpa setup to auto create my tables, and I see openjpa > the tables using in my log, but I don't see the create table > statements. I have this in my persistenc.xml file > > > >

Unknown primary key

2007-02-01 Thread Dain Sundstrom
Does JPA or OpenJPA have support for what is called unknown primary key in the EJB CMP 2.0 spec. An unknown primary key is the pk of an entity bean that does not have a field (or abstract getter/setter) for a primary key. Instead the framework adds a virtual field to the bean that contain

Re: [DISCUSS] Move to TestNG?

2007-02-01 Thread Dain Sundstrom
My only concern is IDE support and specifically the IDE I use intellij. Does this work as a test case type in IntelliJ and Eclipse? If so, I don't really care which framework we use. -dain On Feb 1, 2007, at 11:08 AM, Patrick Linskey wrote: Hi, According to the discussion at https://issue

Re: [DISCUSS] Move to TestNG?

2007-02-01 Thread Dain Sundstrom
On Feb 1, 2007, at 11:39 AM, Kevin Sutter wrote: I see that they have a plugin for Eclipse, but I haven't tried it yet. It doesn't look like it supports IntelliJ. On the surface, the conversion and usage looks doable and would satisfy the "failed testcase" problem. We can exclude tests f

Re: Unknown primary key

2007-02-01 Thread Dain Sundstrom
te it. -Original Message- From: Dain Sundstrom [mailto:[EMAIL PROTECTED] Sent: Thursday, February 01, 2007 10:55 AM To: open-jpa-dev@incubator.apache.org Subject: Unknown primary key Does JPA or OpenJPA have support for what is called unknown primary key in the EJB CMP 2.0 spec. An un

Re: Eol-style

2007-02-01 Thread Dain Sundstrom
About once a quarter in the Geronimo project, someone writes a script to fix all of the properties in the tree. This is because people normally forget to set these properties, or their IDE doesn't apply them. It would be nice if there were a cron job to update the properties once a week.

Re: svn commit: r502374 - in /incubator/openjpa/trunk: openjpa-jdbc/src/main/resources/org/apache/openjpa/jdbc/ant/antlib.xml openjpa-kernel/src/main/resources/org/apache/openjpa/ant/antlib.xml

2007-02-01 Thread Dain Sundstrom
openjpac looks like "open j pac" to my eyes -dain On Feb 1, 2007, at 3:20 PM, Patrick Linskey wrote: They're only prefixed if you provide a URN for them when you include the taskdef. But I'm open to either name. -Patrick -- Patrick Linskey BEA Systems, Inc. ___

Re: Exceptions thrown from callbacks

2007-02-01 Thread Dain Sundstrom
On Feb 1, 2007, at 3:27 PM, Patrick Linskey wrote: 3.5.6: "Lifecycle callback methods may throw runtime exceptions. A runtime exception thrown by a callback method that executes within a transaction causes that transaction to be rolled back. No further lifecycle callback methods will be in

Re: OpenJPA release 0.9.6 on Maven repo?

2007-02-02 Thread Dain Sundstrom
Due to Apache Incubator policy the archives are only available via the separate incubator repo at apache. http://people.apache.org/repo/m2-incubating-repository For example, the openjpa-all 0.9.6 jar is located here: http://people.apache.org/repo/m2-incubating-repository/org/apache/ openjpa/

Re: [VOTE] Upgrade Derby dependency from 10.2.1.6 to 10.2.2.0

2007-02-03 Thread Dain Sundstrom
+1 -dain On Feb 3, 2007, at 12:39 AM, Marc Prud'hommeaux wrote: In the interest of keeping up with the latest-and-greatest, I propose we upgrade our project dependency on the stand-alone Derby database & JDBC driver for our testing and distribution zip from Derby 10.2.1.6 to the latest

Re: JIRA issue types

2007-02-05 Thread Dain Sundstrom
I like to reserve New Feature to high level new stuff that should be marketed. Normally, I like to break these down into bite-sized sub tasks. Most other changes are bug fixes or iterative improvements to the code base. -dain On Feb 5, 2007, at 6:52 PM, Patrick Linskey wrote: Hi, Does

Re: [VOTE] Move JPA API dependency from dev.java.net to geronimo version

2007-02-09 Thread Dain Sundstrom
+1 The Geronimo API is verified using the official Jee5 signatures file. -dain On Feb 8, 2007, at 9:41 PM, Marc Prud'hommeaux wrote: It turns out that the JPA API we've been building against (the one from https://maven-repository.dev.java.net/repository/ javax.persistence/jars/persistence

Entity name ignored in queries (0.9.6)?

2007-02-12 Thread Dain Sundstrom
I'm using 0.9.6 and it appears the OpenJPA is ignoring the entity name when processing queries. In stead it seems to always choose the class name for the schema name of the bean. For example, I have the following bean declared in my entity mappings: class="org.apache.openejb.test.enti

Kodo passes JPA tck

2007-02-12 Thread Dain Sundstrom
I read on the serverside.com that Kodo has passed the JPA tck, and am curious if there are any uncommitted patches from BEA that are required to make OpenJPA compliant. Also, has anyone run OpenJPA through the JPA tck and if so did we pass? -dain

NoSuchFieldException

2007-02-12 Thread Dain Sundstrom
I have this scenario in my CMP2JPA tool where I have to generate subclasses of CMP1 beans. When the user has an "unknown" primary key or more commonly, when they use the same ejb class for multiple deployments, I have to generate a sub class to either add an extra field, or to differentiat

Re: NoSuchFieldException

2007-02-12 Thread Dain Sundstrom
to code it that way (and yes I am quite lazy). -dain On Feb 12, 2007, at 4:00 PM, Dain Sundstrom wrote: I have this scenario in my CMP2JPA tool where I have to generate subclasses of CMP1 beans. When the user has an "unknown" primary key or more commonly, when they use the same

Do mapped superclasses work at all in OpenJPA?

2007-02-12 Thread Dain Sundstrom
When I try to use a simple mapped super class with a trivial sub class (no fields or methods), I get the following exception: ERROR - The bean instances business method encountered a system exception:org.apache.openejb.test.entity.cmp.BasicCmpBean.pcGetManagedFi eldCount()I java.lang.NoSuchM

  1   2   >