Re: 0.9.7 release

2007-03-27 Thread Craig L Russell
I hate to bring this up, but it takes more than a day or two to cut a release and have it approved. Take a look at the 0.9.6 release. Granted, we're smarter than that now, but it still takes some time. Let's say we built a candidate release right now. You want to give the community a

Re: OPEN-JPA and Toplink 2.0.XX

2007-03-26 Thread Craig L Russell
Well, you still need the implementation of the persistence api jar in your classpath. You can download the api jar by itself (without the toplink stuff) from https://maven-repository.dev.java.net/nonav/repository/ javax.persistence/jars/persistence-api-1.0.jar Craig On Mar 26, 2007, at

Re: ID class: no public string or class + string constructor?

2007-03-26 Thread Craig L Russell
Hi Jeff, It would be useful if you could include a code fragment and the @Id annotation for your class to diagnose this. Thanks, Craig On Mar 26, 2007, at 4:35 PM, jeff wrote: getting this error: The id type class com.sun.portal.pom.FooId specfied by persistent type class

OpenJPA status report for the Apache Board

2007-03-23 Thread Craig L Russell
This is the OpenJPA status report for the board for the three month period ending Mar 2007. === OpenJPA === OpenJPA made good progress this quarter in all areas. The project has many active committers all driving toward improving functionality, stability, performance, and usability.

Re: AW: Forgot subject: Strange Could not locate metadata for the classError?

2007-03-23 Thread Craig L Russell
Marc Prud'hommeaux wrote: Hans- I don't see how the error could be data-related. One thing: if you are using the same EMF from multiple threads, do you have the openjpa.Multithreaded property explicitly set to true in your persistence.xml (or however you are configuring the EMF)?

Roadmap for OpenJPA

2007-03-21 Thread Craig L Russell
Hi, Now that OpenJPA is maturing into a well-rounded community with lots of users as well as developers, I think it's time we start thinking about formalizing a roadmap for the project. Patrick did a great job in looking at all the JIRA issues and proposing release numbers that the

Re: find()'ing an abstract class

2007-03-16 Thread Craig L Russell
Hi Jeff, If you've defined the id field or property in Entity class A, then this should work. If not, file a JIRA issue, upload a failing test case, and upload a fix, if you don't mind. ;-) Craig On Mar 16, 2007, at 3:01 PM, jeff wrote: class B extends A A is abstract B is concrete i

Connection pooling trouble

2007-03-15 Thread Craig L Russell
Hi, Running 0.9.7 from March 7 (I think; someone else configured this). Running very short transactions (createEM, begin, find one instance, commit, close EM) I observe that connections are constantly being acquired and then closed (hundreds of times per second). Did I misconfigure the

Re: @Dependent annotation vs cascade=ALL

2007-03-08 Thread Craig L Russell
Hi Kevin, On Mar 8, 2007, at 8:45 AM, Kevin Sutter wrote: Abe, Your explanation in your reply was much clearer (IMHO) than the current documentation. I will take a stab at improving the wording so that the meaning and differences are more pronounced. I will also link the two sections of

Re: @Dependent annotation vs cascade=ALL

2007-03-07 Thread Craig L Russell
For the Hibernate-erati in the audience, this feature (JDO calls it dependent and JPA doesn't have it) is called cascade=all-delete- orphan. Craig On Mar 7, 2007, at 6:28 PM, Kevin Sutter wrote: Thanks, Abe. This explanation helps a great deal. Should we update the documentation with

Re: org.apache.openjpa.persistence.test.PersistenceTestCase

2007-03-06 Thread Craig L Russell
There's a bunch of stuff that we use in the JDO base test class. I'll take a look and see what might be useful for us here. Which class should we use as the real base class? Which project does it belong in? Craig On Mar 6, 2007, at 7:50 PM, Marc Prud'hommeaux wrote: Patrick- FYI, I had

Re: Entity manager injection

2007-03-05 Thread Craig L Russell
Hi Matthew, Basically, with JPA we have formalized separation of concerns between the user's Domain Object Model, represented by Entity, and the user's Business Object, represented by Session Beans. There is no need for managing an EntityManager from the Entity itself. So you should

Fwd: White space in xml queries

2007-03-02 Thread Craig L Russell
? On Mar 2, 2007, at 6:00 PM, Craig L Russell wrote: Hey, The Roller project found that OpenJPA didn't like line endings (white space) in JPAQL queries in metadata. This is a surprise. Don't we ignore white space in queries unless quoted? Craig Begin forwarded message

Re: possible to write a JPA Query to that filters both an Entity and its relationship entities?

2007-03-01 Thread Craig L Russell
Hi Pinaki, On Feb 26, 2007, at 10:01 AM, Pinaki Poddar wrote: Respected Sir, Sorry to disagree. If you fetch Department instances, I think you always want the _employees collection to contain all the related Employees. You never want a filtered collection unless you provide a filter via

Re: svn commit: r513183 - in /incubator/openjpa/trunk: openjpa-kernel/src/main/java/org/apache/openjpa/conf/ openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ openjpa-persistence/src/main/java/or

2007-03-01 Thread Craig L Russell
Hi Patrick, I'm trying to understand how the code knows it's running in an appserver environment... Thanks, Craig On Mar 1, 2007, at 7:52 AM, Patrick Linskey wrote: The difference is that in an appserver environment, this will return a non-finalizing EM by default, but in a Java SE

Re: [jira] Updated: (OPENJPA-81) Bad error message when trying to query a Collection relation using dot notation

2007-03-01 Thread Craig L Russell
On Mar 1, 2007, at 7:55 AM, Patrick Linskey wrote: My understanding is that Fix Version(s) captures both the version that something is scheduled to be fixed in (for unresolved issues) and the version that something actually was fixed in (for resolved issues). Affected Version(s) identifies

Re: svn commit: r513183 - in /incubator/openjpa/trunk: openjpa-kernel/src/main/java/org/apache/openjpa/conf/ openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ openjpa-persistence/src/main/java/or

2007-03-01 Thread Craig L Russell
On Mar 1, 2007, at 11:01 AM, Patrick Linskey wrote: The diff email didn't include enough context for you. This is in the createContainerEntityManagerFactory() method. It's my contention that createContainerEntityManagerFactory() will only be invoked by things that intend to close resources

Re: svn commit: r513183 - in /incubator/openjpa/trunk: openjpa-kernel/src/main/java/org/apache/openjpa/conf/ openjpa-lib/src/main/java/org/apache/openjpa/lib/conf/ openjpa-persistence/src/main/java/or

2007-02-28 Thread Craig L Russell
Hi Patrick, I don't quite understand the code that follows. What is the difference between this code and simply defaulting the value to non- finalizing impl? Craig On Feb 28, 2007, at 10:31 PM, [EMAIL PROTECTED] wrote: PersistenceUnitInfo pui, Map m) {

Re: OpenJPA build failing on continuum server at vmbuild.apache.org

2007-02-27 Thread Craig L Russell
If no one replies, I'd post it to [EMAIL PROTECTED] and see if anyone over there knows the magic. Craig On Feb 27, 2007, at 11:16 AM, Marc Prud'hommeaux wrote: All- I noticed recently that the continuum build at http:// vmbuild.apache.org/continuum is back up and running again

Re: [jira] Commented: (OPENJPA-160) Reuse BrokerImpl objects

2007-02-27 Thread Craig L Russell
I've got it coded up and am running sanity tests. I'll post the new patch as soon as I verify I didn't break anything obvious. Craig On Feb 27, 2007, at 1:11 PM, John Stecher (JIRA) wrote: [ https://issues.apache.org/jira/browse/OPENJPA-160?

Re: EMF JNDI lookup is starting openJPA every time - was: Howto integrate JPA within EJB2.1 session beans?

2007-02-27 Thread Craig L Russell
Hi Pinaki, On Feb 27, 2007, at 5:06 PM, Pinaki Poddar wrote: The JNDI spec says: the container knows that the application can't change the state of the object. How does one tell the container that the JNDI-bound instance is one such 'application immutable' object? What we ended up with

Re: Test failure @ svn revision 511041

2007-02-23 Thread Craig L Russell
I still get failures on the checked-out HEAD. Updated to revision 511104. %mvn install [INFO] Scanning for projects... [INFO] Reactor build order: [INFO] OpenJPA [INFO] OpenJPA Utilities [INFO] OpenJPA Kernel [INFO] OpenJPA JDBC [INFO] OpenJPA XML Store [INFO] OpenJPA JDBC 1.5 [INFO]

Re: possible to write a JPA Query to that filters both an Entity and its relationship entities?

2007-02-23 Thread Craig L Russell
So, I can tell you that having a result column that is filtered in the query is not what a user would expect. In JDO, the oldtimers column would be filtered. In fact, you have to do a bit of work to get SQL to return you non- filtered instances. So I don't get it. Does OpenJPA not

Re: possible to write a JPA Query to that filters both an Entity and its relationship entities?

2007-02-23 Thread Craig L Russell
Hi Patrick, From the JPQL select dept, oldtimers from Department dept LEFT JOIN dept.employeeCollection oldtimers WHERE dept.deptno = 100 AND oldtimers.yearsOfService = 15 I expect to get SQL that looks something like select dept.id, dept.name, oldtimers.id, oldtimers.firstname,

Re: possible to write a JPA Query to that filters both an Entity and its relationship entities?

2007-02-23 Thread Craig L Russell
L Russell wrote: Hi Patrick, From the JPQL select dept, oldtimers from Department dept LEFT JOIN dept.employeeCollection oldtimers WHERE dept.deptno = 100 AND oldtimers.yearsOfService = 15 I expect to get SQL that looks something like select dept.id, dept.name, oldtimers.id

Re: possible to write a JPA Query to that filters both an Entity and its relationship entities?

2007-02-23 Thread Craig L Russell
On Feb 23, 2007, at 7:49 PM, Pinaki Poddar wrote: One way to realize a owner object with a partially filled multi-cardinality relationship is to expand fetchplan concept. For example, if we consider a Department of 100 Employees of which only 20 are oldtimers, then a query can select the

Re: possible to write a JPA Query to that filters both an Entity and its relationship entities?

2007-02-22 Thread Craig L Russell
How about select dept, oldtimers from Department dept LEFT JOIN dept.employeeCollection oldtimers WHERE dept.deptno = 100 AND oldtimers.yearsOfService = 15 That should give you only departments that satisfy the deptno constraint and since you are not using outer join, only departments

Re: Can enhancer operate on jar files?

2007-02-21 Thread Craig L Russell
Hi Dain, In answer to your original question, yes I agree that it would be nice to have an option for batch enhancement to take a jar file as the source, enhance the classes and interfaces found therein, and repackage the jar file. A few items for discussion: the jar file can't be

Re: [VOTE] change primary key value?

2007-02-21 Thread Craig L Russell
Hi Roger, On Feb 20, 2007, at 11:51 PM, roger.keays wrote: Hi Craig, Thanks for the reply. Craig L Russell wrote: Is there a way to change the primary key of an entity in OpenJPA? The expection below doesn't fill me with hope... The JPA specification 2.1.4 says that the application

Re: svn commit: r509688 - /incubator/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/DetachedStateManager.java

2007-02-20 Thread Craig L Russell
Hi Pinaki, Would it be possible to include the field number with the error message? Seems like if you get this exception you'd like to know which field it is complaining about. Craig On Feb 20, 2007, at 9:57 AM, [EMAIL PROTECTED] wrote: Author: ppoddar Date: Tue Feb 20 09:57:24 2007 New

Re: WebSphere and transaction managers

2007-02-19 Thread Craig L Russell
It is possible to suspend a transaction by the standard Java EE technique. Unfortunately, this might be considered a hack, but AFAIK it's perfectly legal. The idea is to create an EJB component solely for the purpose of suspending a transaction. This could be a Stateless Session Bean that

Re: WebSphere and transaction managers

2007-02-19 Thread Craig L Russell
to be deployed in each ear where it was needed, or deployed as a shared component (which is still not portable Java EE behavior IIRC). Craig On Feb 19, 2007, at 12:37 PM, Kevin Sutter wrote: Excellent use of the Java EE features! :-) Kevin On 2/19/07, Craig L Russell [EMAIL PROTECTED

Re: change primary key value?

2007-02-17 Thread Craig L Russell
Hi Roger, On Feb 17, 2007, at 3:37 AM, roger.keays wrote: Is there a way to change the primary key of an entity in OpenJPA? The expection below doesn't fill me with hope... The JPA specification 2.1.4 says that the application must not change the value of a primary key, but the specific

Re: Strange, intermittent problem running the new models.company tests

2007-02-15 Thread Craig L Russell
, but I don't think that's the cause of the problem. I've committed a fix to the final class issue, though. Thanks for pointing it out. On Feb 10, 2007, at 10:07 PM, Craig L Russell wrote: Hi Kevin, I don't know if it's relevant, but persistent classes must

Re: JPA spec wierdism?

2007-02-15 Thread Craig L Russell
Hi Dain, On Feb 15, 2007, at 4:57 PM, Dain Sundstrom wrote: This is the only group of JPA developers, I know of so I'm going to ask here... This was discussed at length in the expert group and the result is in the specification. One thing I find strange is the namespace of NamedQueries.

Re: Do mapped superclasses work at all in OpenJPA?

2007-02-13 Thread Craig L Russell
Hi Dain, Sounds like a jackpot full of issues here. On Feb 13, 2007, at 9:17 AM, Dain Sundstrom wrote: I found the problem. In my entity mappings file, I had a mapping for a bean that no longer exists. When I comment out that mapping, the problem goes away. I only fond the problem by

Re: pessimistic locking

2007-02-13 Thread Craig L Russell
This benchmark runs best with a combination of optimistic locking (most cases) and pessimistic locking (some specific uses identified explicitly in the code). Where concurrency is low, an optimistic approach works well. In specific cases, optimistic results in bad performance due to the

Re: [jira] Commented: (OPENJPA-141) More performance improvements (in response to changes for OPENJPA-138)

2007-02-13 Thread Craig L Russell
Hi Kevin, On Feb 13, 2007, at 11:25 AM, Kevin Sutter (JIRA) wrote: Kevin Sutter commented on OPENJPA-141: -- Personally, I think I provide sufficient due diligence on the Issues that I own to stick with the normal commit then review approach. There are

Fwd: pessimistic locking

2007-02-12 Thread Craig L Russell
Comments from the experts here? Craig Begin forwarded message: From: Scott Oaks [EMAIL PROTECTED] Date: February 12, 2007 11:45:52 AM PST To: [EMAIL PROTECTED] Subject: pessimistic locking Reply-To: [EMAIL PROTECTED] The SPEC organization is in the process of developing a JPA-based benchmark

Re: Do mapped superclasses work at all in OpenJPA?

2007-02-12 Thread Craig L Russell
Hi Dain, This might be related to a bug in xml overrides http:// issues.apache.org/jira/browse/OPENJPA-97. Just fer grins, do you have a way to annotate the mapped superclass? Craig On Feb 12, 2007, at 7:01 PM, Dain Sundstrom wrote: When I try to use a simple mapped super class with a

Re: Strange, intermittent problem running the new models.company tests

2007-02-10 Thread Craig L Russell
Hi Kevin, I don't know if it's relevant, but persistent classes must not be final. It seems that the entities in the model.company packages are (all) final, which is wrong. From spec 2.1, The entity class must not be final. No methods or persistent instance variables of the entity class

Fwd: Please review: changes to push new versions to maven repository

2007-02-09 Thread Craig L Russell
FYI. The official JPA jars that pass the TCK will be put into the maven repo shortly. Craig Begin forwarded message: From: Lance J. Andersen [EMAIL PROTECTED] Date: February 9, 2007 10:26:21 AM PST To: [EMAIL PROTECTED] Subject: Re: Please review: changes to push new versions to maven

Wrong package for org/apache/openjpa/persistence/models classes

2007-02-09 Thread Craig L Russell
Hi Mike, This is clearly wrong. Can you file a JIRA? Craig On Feb 9, 2007, at 8:17 AM, Michael Dick wrote: Hi Marc, The classes in incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/ apache/openjpa/persistence/models declare package

Re: Why do we capture the call stack when close() is called?

2007-02-08 Thread Craig L Russell
On Feb 8, 2007, at 3:32 PM, Patrick Linskey wrote: It's there for debugging purposes. We could probably check for TRACE-level logging; if not enabled, the exception would not be created and the assertion would include a localized string instructing the user to turn on TRACE logging to get

Re: Exception when using java.sql.Date as an id

2007-02-07 Thread Craig L Russell
On Feb 7, 2007, at 1:55 PM, Patrick Linskey wrote: It's coming from the generated bytecode which expects there to be a getId method that returns the same type of the Id, however java.sql.Date is using the same ID class as java.util.Date. Do we need a separate class for java.sql.Date? It

Re: EntityManager.clear() semantics

2007-02-06 Thread Craig L Russell
, Craig L Russell [EMAIL PROTECTED] wrote: I've forwarded the new test case to our CTS team here. They will take a look to see if it can be adapted to the CTS test framework. Craig On Jan 31, 2007, at 6:25 AM, Kevin Sutter wrote: Craig, If anybody would have a channel to the CTS team, I would

Re: JIRA issue types

2007-02-06 Thread Craig L Russell
On Feb 6, 2007, at 6:07 AM, Kevin Sutter wrote: I'd agree with this assessment. New Features are bigger pieces of work -- more design, documentation, marketing, etc. Improvements are smaller bits of work. Still may need some documentation tweaks, but these type of changes would not make

Re: Exceptions thrown from callbacks

2007-02-06 Thread Craig L Russell
On Feb 6, 2007, at 11:27 AM, Patrick Linskey wrote: Out-of-band, Abe pointed out to me that the text about when RollbackExceptions are thrown is pretty clear. 3.7 says: The RollbackException is thrown by the persistence provider when EntityTransaction.commit fails. So, it would seem that in

Re: Exceptions thrown from callbacks

2007-02-06 Thread Craig L Russell
Ah, the perils of spec-writing... On Feb 1, 2007, at 3:55 PM, Dain Sundstrom wrote: 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

Re: TestNG vs. JUnit

2007-02-06 Thread Craig L Russell
working, I'll post my impressions and recommendations on this list. On Feb 6, 2007, at 5:49 PM, Craig L Russell wrote: Just when I thought I knew enough about JUnit to be dangerous (productive) along comes another test framework. Can someone point us to the FAQ? Aside from tests that fail

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

2007-02-04 Thread Craig L Russell
+1 Craig 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: svn commit: r502751 - in /incubator/openjpa/trunk: openjpa-kernel/src/main/java/org/apache/openjpa/kernel/ openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/simple/ openjpa-per

2007-02-02 Thread Craig L Russell
Well, I don't use the block comment feature, and sometimes I even have to use vi to comment out blocks. So I guess I'd be happier with single-line comments a la +// Check for null here because _brokers is a weak reference collection if ((broker != null)

Eol-style

2007-02-01 Thread Craig L Russell
This just in: If I have to do it individually to files, is there some way to ensure that any text file checked it gets this property set? Otherwise, we're bound to forget to set it frequently. Yes, it's a new feature in your ~/.subversion/config file, not yet documented in the Book.

INFO messages from JUnit tests in openjpa-persistence-jdbc

2007-02-01 Thread Craig L Russell
I get tons of output from the tests. Is there a way to change the log level to WARNING? RTFM reference? Thanks, Craig Craig Russell Architect, Sun Java Enterprise System http://java.sun.com/products/jdo 408 276-5638 mailto:[EMAIL PROTECTED] P.S. A good JDO? O, Gasp! smime.p7s

Re: INFO messages from JUnit tests in openjpa-persistence-jdbc

2007-02-01 Thread Craig L Russell
Hi, mvn test -Dopenjpa.loglevel=WARN Thanks for that, Patrick. When I use this, two things happen, as below. Using -Dopenjpa.Log=openjpa ( DefaultLevel=WARN ) turns off the INFO logging messages from the [resources:resources] part of the maven task. Apparently this isn't affected by the

Re: svn commit: r501955 - /incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/simple/TestPersistence.java

2007-01-31 Thread Craig L Russell
This commit is way too big for its changes. I recommend that everyone do an svn diff prior to commit to make sure that you don't have a line-end problem, such as this appears to have. Craig On Jan 31, 2007, at 11:27 AM, [EMAIL PROTECTED] wrote: Author: kwsutter Date: Wed Jan 31 11:27:11

Re: svn commit: r501955 - /incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/simple/TestPersistence.java

2007-01-31 Thread Craig L Russell
I'd prefer to see a separate test that tests all of the em methods that are supposed to throw an exception (all of them except isOpen and getTransaction). Putting this new test here is awkward. Craig On Jan 31, 2007, at 11:27 AM, [EMAIL PROTECTED] wrote: Author: kwsutter Date: Wed Jan 31

Re: svn commit: r501955 - /incubator/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/simple/TestPersistence.java

2007-01-31 Thread Craig L Russell
Hi Kevin, Sorry for commenting before reading this... On Jan 31, 2007, at 11:39 AM, Kevin Sutter wrote: Sorry about the whole changed file thing again. I thought I had found the problem with a doubly defined [miscellany] section in my svn config file. But, I changed that and I still have

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

2007-01-21 Thread Craig L Russell
. They are much cleaner and we're not polluting the original intent of the orm.xml schema. Kevin On 1/15/07, Craig L Russell [EMAIL PROTECTED] wrote: Hi, On Jan 15, 2007, at 5:12 PM, Patrick Linskey wrote: Hi, It kinda feels like we're corrupting the intended use of query hints

Re: How to unit test the Enhancer?

2007-01-21 Thread Craig L Russell
Hi Rahul, You might look at the work-in-progress going on at Apache JDO http:// db.apache.org/jdo/ and http://wiki.apache.org/jdo/ProjectStructure. The JDO 1.1 project includes an enhancer verification program that is not yet updated for JDO 2.0, but it should give you some ideas on what

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

2007-01-17 Thread Craig L Russell
Here's what the spec says about getReference. /** * Get an instance, whose state may be lazily fetched. * If the requested instance does not exist in the database, * the EntityNotFoundException is thrown when the instance *state is first accessed.(The persistence provider runtime is *

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

2007-01-16 Thread Craig L Russell
for this processing. If we can clear this up, then I agree with Patrick that namespaces are the way to go. They are much cleaner and we're not polluting the original intent of the orm.xml schema. Kevin On 1/15/07, Craig L Russell [EMAIL PROTECTED] wrote: Hi, On Jan 15, 2007, at 5:12 PM

Re: sql statement batching

2007-01-15 Thread Craig L Russell
Hi Kevin, I agree that sql batching is such a huge performance win that most real users would want this feature. Craig On Jan 15, 2007, at 6:39 AM, Kevin Sutter wrote: Marc, Concerning the infrastructure for sql batching support... Do you mean that this support is pluggable into the

Re: Deadlock when insert in t1 and find in t2

2007-01-09 Thread Craig L Russell
Hi Vlad, It might be easier for you to file a JIRA and upload your test case to it. Craig On Jan 9, 2007, at 8:56 AM, Vlad Tatavu wrote: Kevin, I use the MappingTool to create the db before I run the test program, so I don't have to specify any classes (i.e. class) in my

Troubleshooting help

2007-01-08 Thread Craig L Russell
Hi, I got this stack trace. Any ideas how to troubleshoot? Thanks, Craig [java] 0|false|0.9.6-incubating org.apache.openjpa.persistence.PersistenceException: null [java] at org.apache.openjpa.kernel.BrokerImpl.find (BrokerImpl.java:851) [java] at

Re: Perform automatic drop and create db schema

2007-01-02 Thread Craig L Russell
For What It's Worth: +1 on the drop-tables feature for OpenJPA. But I would caution against using it on each test. Sadly, my experience is that drop-create-tables is 99.9% of the time taken in a typical test. The JDO TCK runs hundreds of tests and we drop-create tables only on demand.

Re: JTA 1.1 has been published

2006-12-21 Thread Craig L Russell
work, can you tell me what the artifact name is? Hopefully something that doesn't include the 1.0 designation... Thanks, Craig On Dec 21, 2006, at 12:19 AM, David Blevins wrote: On Oct 27, 2006, at 8:38 PM, Craig L Russell wrote: When can Geronimo ship an upgrade to JTA 1.1 that we can use

Re: Flush all caches?

2006-12-12 Thread Craig L Russell
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 questions. I hope to have the basics done in a few days. If

Re: Collection (or Map) relationships and null

2006-12-12 Thread Craig L Russell
Hi Dain, On Dec 12, 2006, at 2:33 PM, Dain Sundstrom wrote: 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

Re:

2006-12-12 Thread Craig L Russell
Hi Dain, 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 bean for a specific Class:PK in a single transaction? No. The reason I'm

Re: Instances and transactions...

2006-12-12 Thread Craig L Russell
On Dec 12, 2006, at 6:48 PM, Dain Sundstrom wrote: 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.

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

2006-12-12 Thread Craig L Russell
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 same

Re: Get primary key from persistent bean

2006-12-11 Thread Craig L Russell
cares? Craig On Dec 11, 2006, at 5:45 PM, Dain Sundstrom wrote: 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

Re: extending the life of a LRS query

2006-12-11 Thread Craig L Russell
Hi, Note that not all databases support efficient FirstResult and MaxResults implementations. But even those that don't have built-in support for skipping n rows, the usual use case is to skip where n is small. The most frequent case is FirstResult == 0 followed in rapidly descending

Re: OneToOne Broken

2006-12-09 Thread Craig L Russell
Hi Dain, You don't have a relationship from Article to Magazine, so it's a unidirectional mapping. Add a Magazine mag; field in Article and see if it starts working. You will also need to identify the owner of the relationship in order to make it work at all. Just a note, JPA does not

Re: svn commit: r482189 [1/2] - in /incubator/openjpa/trunk: openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/ openjpa-lib/src/main/java/

2006-12-04 Thread Craig L Russell
If it is due to line endings, in future the files should be marked with eol-style=native. It looks like there are no properties associated with the files in svn. Craig On Dec 4, 2006, at 10:14 AM, Patrick Linskey wrote: I think that it's to do with line endings. No idea how to resolve the

Re: svn commit: r482189 [1/2] - in /incubator/openjpa/trunk: openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/ openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/ openjpa-lib/src/main/java/

2006-12-04 Thread Craig L Russell
As a test, I changed the property svn:eol-style in the two jdbc projects. I used the command cd src/main/java; svn propset -R svn:eol-style native org It went through the files, cleaned them up to a normalized state and the commit messages indicate the files that had different eol

Re: how to disable toplink?

2006-11-27 Thread Craig L Russell
Hi Roger, Sorry for the late reply; I'm traveling. On Nov 22, 2006, at 9:41 PM, roger.keays wrote: Craig L Russell wrote: The issue with this is in Persistence. The results of finding the services the very first time is cached in a static variable. The only way I can see to make this work

Re: how to disable toplink?

2006-11-22 Thread Craig L Russell
I looked at the code in javax.persistence.Persistence.createEntityManagerFactory and it iterates the META-INF/services/ javax.persistence.spi.PersistenceProvider using the context class loader. So, first assumption: you are using the Persistence.createEntityManagerFactory method in your

Re: Two more release artifacts for next time

2006-11-22 Thread Craig L Russell
Yes. In maven1, you need the everything jar or you have to declare all of openjpa's dependencies. In maven2, you need just the openjpa jar and its pom declares its own dependencies. Craig On Nov 22, 2006, at 5:45 PM, Patrick Linskey wrote: Shouldn't Maven have some way to just do that

Re: [VOTE] [SECOND ATTEMPT] publish openjpa 0.9.6-incubating release

2006-11-14 Thread Craig L Russell
+1 Craig On Nov 12, 2006, at 2:45 PM, Marc Prud'hommeaux wrote: OpenJPA People- In accordance with the Incubating Releases guidelines at http:// incubator.apache.org/incubation/Incubation_Policy.html#Releases , I'd like to take a third shot at making an OpenJPA release and start a vote

Re: openjpa.Id property

2006-11-14 Thread Craig L Russell
So does it make sense to consider how Java has handled a similar concept: http://java.sun.com/j2se/1.4.2/docs/api/java/io/ File.html#getAbsolutePath() Could we use some of the same terms, perhaps AbsoluteUnitName for the purpose you are proposing here, and not implement UnitName until

Re: [VOTE] [SECOND ATTEMPT] publish openjpa 0.9.6-incubating release

2006-11-13 Thread Craig L Russell
On Nov 13, 2006, at 5:33 AM, Geir Magnusson Jr. wrote: Marc Prud'hommeaux wrote: Geir- On Nov 12, 2006, at 11:38 PM, Geir Magnusson Jr. wrote: I see two issues. The first, which I'm not so sure of, is that I thought that the m2 was for jars and stuff packaged ready for maven. Maybe

Re: [DISCUSS] Making a release

2006-11-12 Thread Craig L Russell
into the trunk, right? On Nov 12, 2006, at 10:40 AM, Craig L Russell wrote: I'd like to propose something like this (edited the wiki page) The main difference is that upon starting the release process, we create a branch in which to resolve the release issues while maintaining the trunk

Re: [VOTE RESULT] publish openjpa 0.9.6-incubating podling release

2006-11-12 Thread Craig L Russell
Hi Marc, On Nov 12, 2006, at 2:17 PM, Marc Prud'hommeaux wrote: Craig- On Nov 12, 2006, at 2:06 PM, Craig L Russell wrote: Hi Marc, Please read this regarding votes. http://www.apache.org/foundation/ voting.html#ReleaseVotes policy Votes on whether a package is ready to be released

Re: How to build an OpenJPA release

2006-11-10 Thread Craig L Russell
I'd like to see someone else build the next OpenJPA release following Marc's excellent documented process. That might actually prevent a Marc-bus interaction by the umbrella- rain postulate. ;-) Craig On Nov 10, 2006, at 4:06 PM, Marc Prud'hommeaux wrote: OpenJPA People- In keeping with

Re: openjpa.Id property

2006-11-09 Thread Craig L Russell
Hi Patrick, I don't think there would be an issue with calling it unitName or persistenceUnitName, as in getUnitName() or getPersistenceUnitName(). It will be common for people to try to figure out what the Id property from a Configuration really means so the more help we give them the

Re: Localizer.forPackage() and startup time

2006-11-08 Thread Craig L Russell
+1 Seems like the right tradeoff. Craig On Nov 8, 2006, at 4:22 PM, Patrick Linskey wrote: Hi, I'm investigating ways to optimize startup time a bit, and one thing that I ran across is resource bundle overhead in calls to Localizer.forPackage() calls. I'm working on a patch that defers

Re: Welcome, Bryan

2006-11-07 Thread Craig L Russell
Hi Bryan, Congratulations, and welcome to the committers on OpenJPA. I'm looking forward to your continued contributions. Craig On Nov 7, 2006, at 10:59 AM, Patrick Linskey wrote: Hi, Bryan Noll is now a committer on OpenJPA. Welcome, Bryan! -Patrick -- Patrick Linskey BEA Systems,

Re: Replacing Entities while Managed

2006-11-07 Thread Craig L Russell
Hi Don, Could you please be just a bit more specific about what you are trying to do and what error you encounter? Thanks, Craig On Nov 7, 2006, at 2:50 PM, DonBrady wrote: We are converting a TopLink Essentials application to OpenJPA Under Toplink Essentials, we could replace a

Re: Query test no longer working?

2006-11-07 Thread Craig L Russell
Hi, IIUC, JPA does not disallow dynamic persistent class registration. But if you want the tests to be portable (why?) then you have to statically register them in persistence.xml. Or did I misunderstand this issue? Thanks, Craig On Nov 7, 2006, at 4:09 PM, Abe White wrote: With

Re: massively large Assign To field in jira issue edit pages

2006-10-31 Thread Craig L Russell
Thanks, I sent my reply before I saw your message that you had fixed it. Craig On Oct 31, 2006, at 1:02 AM, Geir Magnusson Jr. wrote: LOL. Yes, it's fixed... Craig L Russell wrote: I don't know why the assign to field has to list all 1 jira users. Couldn't it just list the people who

Re: Questions about cutting another snapshot release

2006-10-31 Thread Craig L Russell
Hi Kevin, I'd suggest writing down the process for releasing so others can follow what is going on. The questions below will repeat for each release, so we might as well get started. In the JDO project, we put a file HowToRelease.txt into the top level (parallel to site, trunk, branches)

Re: Questions about cutting another snapshot release

2006-10-31 Thread Craig L Russell
On Oct 31, 2006, at 4:56 PM, Patrick Linskey wrote: I think we should tag whenever we make a release. I don't know anything about tagging in svn, but I assume it is just like CVS (where you just ascribe an arbitrary text label to a revision number). Presumably, we would just tag a

Re: JTA 1.1 has been published

2006-10-30 Thread Craig L Russell
if you don't, you will end up with the RI. Craig On Oct 29, 2006, at 6:57 AM, Geir Magnusson Jr. wrote: Craig L Russell wrote: dependency groupIdjavax.transaction/groupId artifactIdtransaction-api/artifactId version1.1/version

Re: massively large Assign To field in jira issue edit pages

2006-10-30 Thread Craig L Russell
I don't know why the assign to field has to list all 1 jira users. Couldn't it just list the people who are allowed to be assigned issues? IIRC, only developers in the openjpa project are allowed to be assigned... Craig On Oct 30, 2006, at 3:40 PM, Geir Magnusson Jr. wrote: Probably.

Re: JTA 1.1 has been published

2006-10-29 Thread Craig L Russell
I've condensed this email thread into an FAQ. Please review. Q. What is the difference between JTA 1.0.1 and JTA 1.1? A. There is a new interface, TransactionSynchronizationRegistry, that allows an application or a component to get some help from the container with synchronizing its state

Re: JTA 1.1 has been published

2006-10-29 Thread Craig L Russell
I stand corrected. The Glassfish Reference Implementation is open source. I could change this to is there an Apache implementation. Would that be ok, or just not add value? Craig On Oct 29, 2006, at 6:55 AM, Geir Magnusson Jr. wrote: Craig L Russell wrote: Q. Is there an open source

Re: JTA 1.1 has been published

2006-10-28 Thread Craig L Russell
Hi Geir, On Oct 28, 2006, at 5:52 AM, Geir Magnusson Jr. wrote: Craig L Russell wrote: When can Geronimo ship an upgrade to JTA 1.1 that we can use and compile with 1.3? You need 1.3? Cool. I'm speaking for the community, of which OpenJPA is one and Apache JDO is another. geir

Re: JTA 1.1 has been published

2006-10-27 Thread Craig L Russell
When can Geronimo ship an upgrade to JTA 1.1 that we can use and compile with 1.3? These are goodness that I think OpenJPA can use. Craig On Oct 27, 2006, at 8:24 PM, David Blevins wrote: On Oct 27, 2006, at 6:50 PM, Marc Prud'hommeaux wrote: Anyway, I'm not married to the idea of using

<    1   2   3   >