<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>users@openjpa.apache.org Archives</title>
<link rel="self" href="http://mail-archives.apache.org/mod_mbox/openjpa-users/?format=atom"/>
<link href="http://mail-archives.apache.org/mod_mbox/openjpa-users/"/>
<id>http://mail-archives.apache.org/mod_mbox/openjpa-users/</id>
<updated>2009-12-05T19:27:36Z</updated>
<entry>
<title>Fetch plan question</title>
<author><name>Jean-Baptiste BRIAUD -- Novlog &lt;j-b.briaud@novlog.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200912.mbox/%3c0759E557-8DE9-40FD-B0AE-32604F130AF2@novlog.com%3e"/>
<id>urn:uuid:%3c0759E557-8DE9-40FD-B0AE-32604F130AF2@novlog-com%3e</id>
<updated>2009-12-05T11:27:29Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi,

I'm a big fan of fetch plan but there is something I don't understand.
I have a root class with many link or relation.
I'm using annotation and only annotation. Mose of the link are set with EAGER fetching and
cascade ALL.
This is done so by default, fetch will be eager and action will cascade the attributes.
This is the wanted default behavior when no fetch plan is used.

I'm using fetch plan to override that behavior when I need it.
Unfortunately, because most of the time my relation are eagerly fetched by default it may
have hidden bad behavior or bug to me.
When I use fetch plan to add some field to retrieve tham, it works but maybe due to the default
behavior I have specified in the annotation.
However I had tested to add to fetch plan an attribute that was not eagerly retreived and
it had worked when I was discovering the OpenJPA API.

The question come now : how to dynamically, using fetch plan, exclude (rather than adding)
to the fetch plan some attribute not to retrieve ?
It is something to override my default definition of fetching in the annotation.

I found the method fetplan.removeField(...) is it the right one to use to exclude an attribute
from being processed (whatever it will be updated, read, ...) ?

Can that be mixed in the fetch plan : removeField and addField ?

To speed up the code is there a way to exclude all attributes before adding the few I want
to add ?
It would be quicker and simpler than having to remove one by one the field I didn't added.
fetplan.removeAllFields(Class) and the other way around :
fetplan.addAllFields(Class)

Thanks !

</pre>
</div>
</content>
</entry>
<entry>
<title>Re: detach question</title>
<author><name>Jean-Baptiste BRIAUD -- Novlog &lt;j-b.briaud@novlog.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200912.mbox/%3cEC8650E0-68FF-42E0-A458-4032C4922918@novlog.com%3e"/>
<id>urn:uuid:%3cEC8650E0-68FF-42E0-A458-4032C4922918@novlog-com%3e</id>
<updated>2009-12-05T10:35:39Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
it work as you said, a second request is needed.

Thanks !
On Dec 3, 2009, at 15:55 , Rick Curtis wrote:

&gt; When you call cc.merge(ooo); any changes made to that instance while it was
&gt; detached will be persisted to the DB.
&gt; 
&gt; I assume your comment "Here I modify the ooo but I want this modif to be
&gt; persist, not the other one before" means that you only want the changes from
&gt; after the tran begins to be persistent... If that assumption is correct,
&gt; you'll need to get a new instance of ooo to make the changes on.
&gt; -- 
&gt; Thanks,
&gt; Rick
&gt; 
&gt; On Thu, Dec 3, 2009 at 8:49 AM, Jean-Baptiste BRIAUD -- Novlog &lt;
&gt; j-b.briaud@novlog.com&gt; wrote:
&gt; 
&gt;&gt; Hi the list,
&gt;&gt; 
&gt;&gt; Am i right on the following pseudo code ?
&gt;&gt; 
&gt;&gt;           // Note the detach.
&gt;&gt;           // getFullById come back with an instance of MyObject from the
&gt;&gt; primary key
&gt;&gt;           final MyObject ooo = detach(getFullById(cc....
&gt;&gt; 
&gt;&gt;           &lt; Here I modify (a lot) ooo but don't wan't the modif to be
&gt;&gt; persist&gt;
&gt;&gt; 
&gt;&gt;               try {
&gt;&gt;                   cc.beginTransaction();
&gt;&gt; 
&gt;&gt;                   &lt;Here I modify the ooo but I want this modif to be
&gt;&gt; persist, not the other one before&gt;
&gt;&gt; 
&gt;&gt;                   cc.merge(ooo);
&gt;&gt;                   cc.commitTransaction();
&gt;&gt; 
&gt;&gt;               } catch (...) {
&gt;&gt;                   cc.rollbackTransaction();
&gt;&gt;               }
&gt;&gt; 
&gt;&gt; Thanks !



</pre>
</div>
</content>
</entry>
<entry>
<title>Issues mapping numerous tables to a single entity?</title>
<author><name>&quot;KARR, DAVID (ATTCINW)&quot; &lt;dk068x@att.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200912.mbox/%3cE0529A8FFC2C9143A5F1BB9A89101D060789C4D7@BD01MSXMB018.US.Cingular.Net%3e"/>
<id>urn:uuid:%3cE0529A8FFC2C9143A5F1BB9A89101D060789C4D7@BD01MSXMB018-US-Cingular-Net%3e</id>
<updated>2009-12-05T00:45:31Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
In Hibernate and JPA, I'm used to looking at scenarios where I map a
single table to a single entity, along with relationships to other
entities with various multiplicities.

I'm now looking at a situation where I'm going to need to develop a JPA
mapping for a pretty large collection of entities, where the largest
entities actually are defined by an aggregation of numerous tables (like
20).  What provisions are there in JPA and OpenJPA for mapping multiple
tables to a single entity?  I'm not talking about an inheritance
hierarchy, but where the numerous tables are linked by a common PK
value.


</pre>
</div>
</content>
</entry>
<entry>
<title>RE: Why does the enhancer create a PROTECTE no-args constructor by default?</title>
<author><name>&quot;KARR, DAVID (ATTCINW)&quot; &lt;dk068x@att.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200912.mbox/%3cE0529A8FFC2C9143A5F1BB9A89101D060789C3C5@BD01MSXMB018.US.Cingular.Net%3e"/>
<id>urn:uuid:%3cE0529A8FFC2C9143A5F1BB9A89101D060789C3C5@BD01MSXMB018-US-Cingular-Net%3e</id>
<updated>2009-12-04T22:36:28Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
&gt; -----Original Message-----
&gt; From: Michael Dick [mailto:michael.d.dick@gmail.com]
&gt; Sent: Friday, December 04, 2009 1:54 PM
&gt; To: users@openjpa.apache.org
&gt; Subject: Re: Why does the enhancer create a PROTECTE no-args
&gt; constructor by default?
&gt; 
&gt; Hi David,
&gt; 
&gt; The JVM will create a no-arg constructor if you have no other
&gt; constructors.
&gt; The spec requires a no-arg constructor so that the persistence
provider
&gt; can
&gt; create an empty instance. OpenJPA uses it via some tricky generated
&gt; code
&gt; (bytecode insertion).
&gt; 
&gt; As for why it's protected instead of public I presume the original
devs
&gt; thought it was safer to restrict access to the generated constructor.
&gt; It
&gt; isn't documented in the manual, but you could go diving in
&gt; PCEnhancer.java
&gt; (which generates the constructor) and see if there are any comments
&gt; that
&gt; shed some light on the rationale.

Nope, not a word.  The "enhanceClass()" generates the constructor as
public if it's externalizable, private if it's final (which is odd, as I
thought you couldn't have final persistent classes), and protected
otherwise.  No indication why.  There was a comment about making it
public if the class was externalizable, but nothing else.

&gt; On Fri, Dec 4, 2009 at 2:55 PM, KARR, DAVID (ATTCINW)
&gt; &lt;dk068x@att.com&gt;wrote:
&gt; 
&gt; &gt; &gt; -----Original Message-----
&gt; &gt; &gt; From: Rick Curtis [mailto:curtisr7@gmail.com]
&gt; &gt; &gt; Sent: Friday, December 04, 2009 12:31 PM
&gt; &gt; &gt; To: users@openjpa.apache.org
&gt; &gt; &gt; Subject: Re: Why does the enhancer create a PROTECTE no-args
&gt; &gt; &gt; constructor by default?
&gt; &gt; &gt;
&gt; &gt; &gt; David-
&gt; &gt; &gt;
&gt; &gt; &gt; Per the JPA spec --
&gt; &gt; &gt;
&gt; &gt; &gt; The entity class must have a no-arg constructor. The entity class
&gt; may
&gt; &gt; &gt; have
&gt; &gt; &gt; other constructors as well.
&gt; &gt; &gt; The no-arg constructor must be public or protected.
&gt; &gt; &gt;
&gt; &gt; &gt; ...so if your Entity doesn't have one, OpenJPA will do it for you.
&gt; &gt;
&gt; &gt; Ok, I'll phrase the question again, and perhaps I can make it more
&gt; &gt; obvious this time.
&gt; &gt;
&gt; &gt; Why does the enhancer create a PROTECTED no-args constructor, and
not
&gt; a
&gt; &gt; PUBLIC one?
&gt; &gt;
&gt; &gt; If it was going to create a PUBLIC constructor, there'd be
absolutely
&gt; no
&gt; &gt; point to this, because that's exactly what the JVM does.  If the
&gt; &gt; enhancer had a good reason to create a PROTECTED constructor instead
&gt; of
&gt; &gt; a PUBLIC one, then I can see why the enhancer would do this, but I
&gt; still
&gt; &gt; see no obvious reason to create a PROTECTED constructor.
&gt; &gt;
&gt; &gt; Is that clearer now?
&gt; &gt;
&gt; 
&gt; &gt; &gt; --
&gt; &gt; &gt; Thanks,
&gt; &gt; &gt; Rick
&gt; &gt; &gt;
&gt; &gt; &gt; On Fri, Dec 4, 2009 at 1:29 PM, KARR, DAVID (ATTCINW)
&gt; &gt; &gt; &lt;dk068x@att.com&gt;wrote:
&gt; &gt; &gt;
&gt; &gt; &gt; &gt; I'm reading the OpenJPA doc, and I see that the enhancer creates
&gt; a
&gt; &gt; &gt; &gt; protected no-args constructor if there is no public one.  Why
&gt; &gt; exactly
&gt; &gt; &gt; &gt; does it do that?  What is the point of creating a protected
&gt; &gt; &gt; constructor
&gt; &gt; &gt; &gt; instead of letting the JVM create the public one?  The doc only
&gt; says
&gt; &gt; &gt; &gt; that it does this, not why.
&gt; &gt; &gt; &gt;
&gt; &gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Why does the enhancer create a PROTECTE no-args constructor by	default?</title>
<author><name>Michael Dick &lt;michael.d.dick@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200912.mbox/%3c72c1350f0912041354x759bb74co563f32439d1a0cf1@mail.gmail.com%3e"/>
<id>urn:uuid:%3c72c1350f0912041354x759bb74co563f32439d1a0cf1@mail-gmail-com%3e</id>
<updated>2009-12-04T21:54:19Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi David,

The JVM will create a no-arg constructor if you have no other constructors.
The spec requires a no-arg constructor so that the persistence provider can
create an empty instance. OpenJPA uses it via some tricky generated code
(bytecode insertion).

As for why it's protected instead of public I presume the original devs
thought it was safer to restrict access to the generated constructor. It
isn't documented in the manual, but you could go diving in PCEnhancer.java
(which generates the constructor) and see if there are any comments that
shed some light on the rationale.

-mike

On Fri, Dec 4, 2009 at 2:55 PM, KARR, DAVID (ATTCINW) &lt;dk068x@att.com&gt;wrote:

&gt; &gt; -----Original Message-----
&gt; &gt; From: Rick Curtis [mailto:curtisr7@gmail.com]
&gt; &gt; Sent: Friday, December 04, 2009 12:31 PM
&gt; &gt; To: users@openjpa.apache.org
&gt; &gt; Subject: Re: Why does the enhancer create a PROTECTE no-args
&gt; &gt; constructor by default?
&gt; &gt;
&gt; &gt; David-
&gt; &gt;
&gt; &gt; Per the JPA spec --
&gt; &gt;
&gt; &gt; The entity class must have a no-arg constructor. The entity class may
&gt; &gt; have
&gt; &gt; other constructors as well.
&gt; &gt; The no-arg constructor must be public or protected.
&gt; &gt;
&gt; &gt; ...so if your Entity doesn't have one, OpenJPA will do it for you.
&gt;
&gt; Ok, I'll phrase the question again, and perhaps I can make it more
&gt; obvious this time.
&gt;
&gt; Why does the enhancer create a PROTECTED no-args constructor, and not a
&gt; PUBLIC one?
&gt;
&gt; If it was going to create a PUBLIC constructor, there'd be absolutely no
&gt; point to this, because that's exactly what the JVM does.  If the
&gt; enhancer had a good reason to create a PROTECTED constructor instead of
&gt; a PUBLIC one, then I can see why the enhancer would do this, but I still
&gt; see no obvious reason to create a PROTECTED constructor.
&gt;
&gt; Is that clearer now?
&gt;

&gt; &gt; --
&gt; &gt; Thanks,
&gt; &gt; Rick
&gt; &gt;
&gt; &gt; On Fri, Dec 4, 2009 at 1:29 PM, KARR, DAVID (ATTCINW)
&gt; &gt; &lt;dk068x@att.com&gt;wrote:
&gt; &gt;
&gt; &gt; &gt; I'm reading the OpenJPA doc, and I see that the enhancer creates a
&gt; &gt; &gt; protected no-args constructor if there is no public one.  Why
&gt; exactly
&gt; &gt; &gt; does it do that?  What is the point of creating a protected
&gt; &gt; constructor
&gt; &gt; &gt; instead of letting the JVM create the public one?  The doc only says
&gt; &gt; &gt; that it does this, not why.
&gt; &gt; &gt;
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Can a &quot;native&quot; query get/set the timezone from a Calendar?</title>
<author><name>&quot;KARR, DAVID (ATTCINW)&quot; &lt;dk068x@att.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200912.mbox/%3cE0529A8FFC2C9143A5F1BB9A89101D060789C2FA@BD01MSXMB018.US.Cingular.Net%3e"/>
<id>urn:uuid:%3cE0529A8FFC2C9143A5F1BB9A89101D060789C2FA@BD01MSXMB018-US-Cingular-Net%3e</id>
<updated>2009-12-04T21:37:25Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I noticed in the doc that OpenJPA doesn't support storing or retrieving
the timezone value, just the Date portion, even for a TIMESTAMPTZ column
(although it doesn't mention that last part).

The doc for EclipseLink says something similar, but it simply says that
you have to use "native SQL" in order to get/set the timezone with
Calendar.

I can't imagine any reason why native queries in EclipseLink would be
able to do this, but native queries in OpenJPA couldn't.  Is there a
good reason why a statement to this effect didn't make it into the
OpenJPA doc (besides "we didn't think of it")?


</pre>
</div>
</content>
</entry>
<entry>
<title>RE: Why does the enhancer create a PROTECTE no-args constructor by default?</title>
<author><name>&quot;KARR, DAVID (ATTCINW)&quot; &lt;dk068x@att.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200912.mbox/%3cE0529A8FFC2C9143A5F1BB9A89101D060789C26B@BD01MSXMB018.US.Cingular.Net%3e"/>
<id>urn:uuid:%3cE0529A8FFC2C9143A5F1BB9A89101D060789C26B@BD01MSXMB018-US-Cingular-Net%3e</id>
<updated>2009-12-04T20:55:30Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
&gt; -----Original Message-----
&gt; From: Rick Curtis [mailto:curtisr7@gmail.com]
&gt; Sent: Friday, December 04, 2009 12:31 PM
&gt; To: users@openjpa.apache.org
&gt; Subject: Re: Why does the enhancer create a PROTECTE no-args
&gt; constructor by default?
&gt; 
&gt; David-
&gt; 
&gt; Per the JPA spec --
&gt; 
&gt; The entity class must have a no-arg constructor. The entity class may
&gt; have
&gt; other constructors as well.
&gt; The no-arg constructor must be public or protected.
&gt; 
&gt; ...so if your Entity doesn't have one, OpenJPA will do it for you.

Ok, I'll phrase the question again, and perhaps I can make it more
obvious this time.

Why does the enhancer create a PROTECTED no-args constructor, and not a
PUBLIC one?

If it was going to create a PUBLIC constructor, there'd be absolutely no
point to this, because that's exactly what the JVM does.  If the
enhancer had a good reason to create a PROTECTED constructor instead of
a PUBLIC one, then I can see why the enhancer would do this, but I still
see no obvious reason to create a PROTECTED constructor.

Is that clearer now?

&gt; --
&gt; Thanks,
&gt; Rick
&gt; 
&gt; On Fri, Dec 4, 2009 at 1:29 PM, KARR, DAVID (ATTCINW)
&gt; &lt;dk068x@att.com&gt;wrote:
&gt; 
&gt; &gt; I'm reading the OpenJPA doc, and I see that the enhancer creates a
&gt; &gt; protected no-args constructor if there is no public one.  Why
exactly
&gt; &gt; does it do that?  What is the point of creating a protected
&gt; constructor
&gt; &gt; instead of letting the JVM create the public one?  The doc only says
&gt; &gt; that it does this, not why.
&gt; &gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Why does the enhancer create a PROTECTE no-args constructor by	default?</title>
<author><name>Rick Curtis &lt;curtisr7@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200912.mbox/%3cf8b633140912041231h43b32a4aoc7b16bc5d76fab7d@mail.gmail.com%3e"/>
<id>urn:uuid:%3cf8b633140912041231h43b32a4aoc7b16bc5d76fab7d@mail-gmail-com%3e</id>
<updated>2009-12-04T20:31:24Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
David-

Per the JPA spec --

The entity class must have a no-arg constructor. The entity class may have
other constructors as well.
The no-arg constructor must be public or protected.

...so if your Entity doesn't have one, OpenJPA will do it for you.
-- 
Thanks,
Rick

On Fri, Dec 4, 2009 at 1:29 PM, KARR, DAVID (ATTCINW) &lt;dk068x@att.com&gt;wrote:

&gt; I'm reading the OpenJPA doc, and I see that the enhancer creates a
&gt; protected no-args constructor if there is no public one.  Why exactly
&gt; does it do that?  What is the point of creating a protected constructor
&gt; instead of letting the JVM create the public one?  The doc only says
&gt; that it does this, not why.
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Why does the enhancer create a PROTECTE no-args constructor by default?</title>
<author><name>&quot;KARR, DAVID (ATTCINW)&quot; &lt;dk068x@att.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200912.mbox/%3cE0529A8FFC2C9143A5F1BB9A89101D060789C17D@BD01MSXMB018.US.Cingular.Net%3e"/>
<id>urn:uuid:%3cE0529A8FFC2C9143A5F1BB9A89101D060789C17D@BD01MSXMB018-US-Cingular-Net%3e</id>
<updated>2009-12-04T19:29:13Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I'm reading the OpenJPA doc, and I see that the enhancer creates a
protected no-args constructor if there is no public one.  Why exactly
does it do that?  What is the point of creating a protected constructor
instead of letting the JVM create the public one?  The doc only says
that it does this, not why.


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: openJPA with EJB3 MySQL on WAS7</title>
<author><name>Kevin Sutter &lt;kwsutter@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200912.mbox/%3c89c0c52c0912041038i4238054bsa56bd52977ecd89a@mail.gmail.com%3e"/>
<id>urn:uuid:%3c89c0c52c0912041038i4238054bsa56bd52977ecd89a@mail-gmail-com%3e</id>
<updated>2009-12-04T18:38:08Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi,
Kind of strange.  OpenJPA has many, many examples of persistent operations
against various databases, including MySQL.  All without the behavior that
you are seeing.  A couple of things jump out at me...

o  How is your dao constructor setting the values on the fields?  Since you
are using property-based access, all access to these fields need to be
through the getter/setter methods.

o  I noticed that your getter/setter methods are "synchronized final".
OpenJPA states support for "final" methods, so that should work okay.  But,
why are you using synchronized?  I don't see why this should make a
difference, but it's overhead that should not be necessary.

o  And, when is the transaction completing?  The em.persist() method does
not push items to the database.  The enclosing transaction needs to
complete, or a flush needs to happen, to push the data to the database.

o  How are you verifying that the records are getting created?  You see
actual records (rows) getting created with new generated IDs, but none of
the other fields are filled in?  You could turn on SQL trace from OpenJPA
and see what SQL is actually being generated.  This would help confirm
whether the problem is in the application space or the database space.

Let's start with these questions before going further.
Thanks,
Kevin

On Fri, Dec 4, 2009 at 9:32 AM, kpsuk &lt;keithsecker@yahoo.co.uk&gt; wrote:

&gt;
&gt; Having a little trouble with openJPA persiting with MySQL, whilst new rows
&gt; are being created for each em.persist(dao) the rows are bring populated
&gt; with
&gt; 'NULL' values for each column!
&gt;
&gt; I get no error in my logs and debugging shows that the property values are
&gt; there right upto the em.persist(dao) line of code.
&gt;
&gt; DAO
&gt; @Entity
&gt; @Table(name = "tbl_user_details")
&gt; public class UserRegistrationDao implements java.io.Serializable {
&gt;        private int id;
&gt;        private String firstname;
&gt;        private String surname;
&gt;        private String email;
&gt;        @Id
&gt;        @GeneratedValue(strategy = GenerationType.IDENTITY)
&gt;        @Column(name="id")
&gt;        public int getId() {
&gt;                return this.id;
&gt;        }
&gt;        public void setId(int id) {
&gt;                this.id = id;
&gt;        }
&gt;
&gt;        @Basic
&gt;        @Column(name="firstname")
&gt;        public synchronized final String getFirstname() {
&gt;                return this.firstname;
&gt;        }
&gt;        public synchronized final void setFirstname(String firstname) {
&gt;                this.firstname = firstname;
&gt;        }
&gt;
&gt;        @Basic
&gt;        @Column(name="surname")
&gt;        public synchronized final String getSurname() {
&gt;                return this.surname;
&gt;        }
&gt;        public synchronized final void setSurname(String surname) {
&gt;                this.surname = surname;
&gt;        }
&gt;
&gt;        @Basic
&gt;        @Column(name="email")
&gt;        public synchronized final String getEmail() {
&gt;                return this.email;
&gt;        }
&gt;        public synchronized final void setEmail(String email) {
&gt;                this.email = email;
&gt;        }
&gt; }
&gt;
&gt; Bean
&gt;        @PersistenceContext(unitName = "users", type =
&gt; PersistenceContextType.EXTENDED)
&gt;        private EntityManager _em;
&gt;        @Override
&gt;        public boolean create(Map&lt;String, Object&gt; args) {
&gt;        UserRegistrationDao dao = new UserRegistrationDao(args);
&gt;        _em.persist(dao);  // *** upto here values are present ***
&gt;
&gt;
&gt; persistence.xml
&gt;
&gt;        &lt;persistence-unit name="users" transaction-type="JTA"&gt;
&gt;
&gt; &lt;provider&gt;org.apache.openjpa.persistence.PersistenceProviderImpl&lt;/provider&gt;
&gt;                &lt;jta-data-source&gt;jdbc/users&lt;/jta-data-source&gt;
&gt;                &lt;!-- Enumerate your persistent classes here. --&gt;
&gt;                &lt;class&gt;com.project1.business.dao.UserRegistrationDao&lt;/class&gt;
&gt;
&gt;                &lt;properties&gt;
&gt;                        &lt;property name="openjpa.ConnectionURL"
&gt; value="jdbc:mysql://localhost:3306/users"/&gt;
&gt;                        &lt;property name="openjpa.ConnectionDriverName"
&gt; value="com.mysql.jdbc.Driver"/&gt;
&gt;                        &lt;property name="openjpa.ConnectionUserName"
&gt; value="root"/&gt;
&gt;                        &lt;property name="openjpa.ConnectionPassword"
&gt; value="rootpass123"/&gt;
&gt;                &lt;/properties&gt;
&gt;
&gt;        &lt;/persistence-unit&gt;
&gt;
&gt; --
&gt; View this message in context:
&gt; http://n2.nabble.com/openJPA-with-EJB3-MySQL-on-WAS7-tp4113103p4113103.html
&gt; Sent from the OpenJPA Users mailing list archive at Nabble.com.
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>RE: openJPA with EJB3 MySQL on WAS7</title>
<author><name>Russell Collins &lt;Russell.Collins@mclaneat.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200912.mbox/%3c69BEFCE5AAEBCA44B1301AD2360E83C7A7E13DC67D@MATSVEC14.mclane.local%3e"/>
<id>urn:uuid:%3c69BEFCE5AAEBCA44B1301AD2360E83C7A7E13DC67D@MATSVEC14-mclane-local%3e</id>
<updated>2009-12-04T17:29:23Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Just a quick question.  Is the table already created or are you trying to use OpenJPA to create
the table?

-----Original Message-----
From: kpsuk [mailto:keithsecker@yahoo.co.uk] 
Sent: Friday, December 04, 2009 9:32 AM
To: users@openjpa.apache.org
Subject: openJPA with EJB3 MySQL on WAS7


Having a little trouble with openJPA persiting with MySQL, whilst new rows
are being created for each em.persist(dao) the rows are bring populated with
'NULL' values for each column!

I get no error in my logs and debugging shows that the property values are
there right upto the em.persist(dao) line of code.

DAO
@Entity
@Table(name = "tbl_user_details")
public class UserRegistrationDao implements java.io.Serializable {
	private int id;
	private String firstname;
	private String surname;
	private String email;
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name="id")
	public int getId() {
		return this.id;
	}
	public void setId(int id) {
		this.id = id;
	}
	
	@Basic
	@Column(name="firstname")
	public synchronized final String getFirstname() {
		return this.firstname;
	}
	public synchronized final void setFirstname(String firstname) {
		this.firstname = firstname;
	}
	
	@Basic	
	@Column(name="surname")
	public synchronized final String getSurname() {
		return this.surname;
	}
	public synchronized final void setSurname(String surname) {
		this.surname = surname;
	}
	
	@Basic	
	@Column(name="email")
	public synchronized final String getEmail() {
		return this.email;
	}
	public synchronized final void setEmail(String email) {
		this.email = email;
	}
}

Bean
	@PersistenceContext(unitName = "users", type =
PersistenceContextType.EXTENDED)
	private EntityManager _em;
	@Override
	public boolean create(Map&lt;String, Object&gt; args) {
	UserRegistrationDao dao = new UserRegistrationDao(args);
	_em.persist(dao);  // *** upto here values are present ***


persistence.xml

	&lt;persistence-unit name="users" transaction-type="JTA"&gt;
	
&lt;provider&gt;org.apache.openjpa.persistence.PersistenceProviderImpl&lt;/provider&gt;	
		&lt;jta-data-source&gt;jdbc/users&lt;/jta-data-source&gt;
		&lt;!-- Enumerate your persistent classes here. --&gt;
		&lt;class&gt;com.project1.business.dao.UserRegistrationDao&lt;/class&gt;
		
		&lt;properties&gt;
			&lt;property name="openjpa.ConnectionURL"
value="jdbc:mysql://localhost:3306/users"/&gt;
			&lt;property name="openjpa.ConnectionDriverName"
value="com.mysql.jdbc.Driver"/&gt;
			&lt;property name="openjpa.ConnectionUserName" value="root"/&gt;
			&lt;property name="openjpa.ConnectionPassword" value="rootpass123"/&gt;
		&lt;/properties&gt;
		
	&lt;/persistence-unit&gt;

-- 
View this message in context: http://n2.nabble.com/openJPA-with-EJB3-MySQL-on-WAS7-tp4113103p4113103.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Setter not working for detached object</title>
<author><name>Rick Curtis &lt;curtisr7@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200912.mbox/%3cf8b633140912040742qa352addob946574f9842c079@mail.gmail.com%3e"/>
<id>urn:uuid:%3cf8b633140912040742qa352addob946574f9842c079@mail-gmail-com%3e</id>
<updated>2009-12-04T15:42:40Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Tao -

Can you post a simple testcase demonstrating the problem?

-- 
Thanks,
Rick

On Thu, Dec 3, 2009 at 3:38 PM, Javatao &lt;taolu2000@gmail.com&gt; wrote:

&gt;
&gt; Hi, Experts,
&gt;
&gt; I am having an issue with detached object in OpenJPA.
&gt;
&gt; Setter method of relationship field does not work.
&gt; Setter method of primitive field works fine.
&gt;
&gt; Here is an example
&gt; =======================================
&gt; ...
&gt; Foo foo = entityManager.find(Foo.class, 1);
&gt; Bar foo = entityManager.find(Bar.class, 2);
&gt; ...
&gt; entityManager.close();
&gt; ...
&gt;
&gt;
&gt; foo.setName("newNameFoo");
&gt; bar.setName("newNameBar");
&gt; foo.setBar(bar);
&gt; System.out.println(foo.getName());
&gt; System.out.println(bar.getName());
&gt; System.out.println(foo.getBar());
&gt; =====================
&gt;
&gt; Here is the output:
&gt;
&gt; newNameFoo
&gt; newNameBar
&gt; null
&gt;
&gt;
&gt; This is so wierd!
&gt;
&gt; Any idea?
&gt;
&gt; Many thanks in advance!
&gt;
&gt; Tao
&gt;
&gt;
&gt; --
&gt; View this message in context:
&gt; http://n2.nabble.com/Setter-not-working-for-detached-object-tp4109048p4109048.html
&gt; Sent from the OpenJPA Users mailing list archive at Nabble.com.
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>openJPA with EJB3 MySQL on WAS7</title>
<author><name>kpsuk &lt;keithsecker@yahoo.co.uk&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200912.mbox/%3c1259940748141-4113103.post@n2.nabble.com%3e"/>
<id>urn:uuid:%3c1259940748141-4113103-post@n2-nabble-com%3e</id>
<updated>2009-12-04T15:32:28Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

Having a little trouble with openJPA persiting with MySQL, whilst new rows
are being created for each em.persist(dao) the rows are bring populated with
'NULL' values for each column!

I get no error in my logs and debugging shows that the property values are
there right upto the em.persist(dao) line of code.

DAO
@Entity
@Table(name = "tbl_user_details")
public class UserRegistrationDao implements java.io.Serializable {
	private int id;
	private String firstname;
	private String surname;
	private String email;
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name="id")
	public int getId() {
		return this.id;
	}
	public void setId(int id) {
		this.id = id;
	}
	
	@Basic
	@Column(name="firstname")
	public synchronized final String getFirstname() {
		return this.firstname;
	}
	public synchronized final void setFirstname(String firstname) {
		this.firstname = firstname;
	}
	
	@Basic	
	@Column(name="surname")
	public synchronized final String getSurname() {
		return this.surname;
	}
	public synchronized final void setSurname(String surname) {
		this.surname = surname;
	}
	
	@Basic	
	@Column(name="email")
	public synchronized final String getEmail() {
		return this.email;
	}
	public synchronized final void setEmail(String email) {
		this.email = email;
	}
}

Bean
	@PersistenceContext(unitName = "users", type =
PersistenceContextType.EXTENDED)
	private EntityManager _em;
	@Override
	public boolean create(Map&lt;String, Object&gt; args) {
	UserRegistrationDao dao = new UserRegistrationDao(args);
	_em.persist(dao);  // *** upto here values are present ***


persistence.xml

	&lt;persistence-unit name="users" transaction-type="JTA"&gt;
	
&lt;provider&gt;org.apache.openjpa.persistence.PersistenceProviderImpl&lt;/provider&gt;	
		&lt;jta-data-source&gt;jdbc/users&lt;/jta-data-source&gt;
		&lt;!-- Enumerate your persistent classes here. --&gt;
		&lt;class&gt;com.project1.business.dao.UserRegistrationDao&lt;/class&gt;
		
		&lt;properties&gt;
			&lt;property name="openjpa.ConnectionURL"
value="jdbc:mysql://localhost:3306/users"/&gt;
			&lt;property name="openjpa.ConnectionDriverName"
value="com.mysql.jdbc.Driver"/&gt;
			&lt;property name="openjpa.ConnectionUserName" value="root"/&gt;
			&lt;property name="openjpa.ConnectionPassword" value="rootpass123"/&gt;
		&lt;/properties&gt;
		
	&lt;/persistence-unit&gt;

-- 
View this message in context: http://n2.nabble.com/openJPA-with-EJB3-MySQL-on-WAS7-tp4113103p4113103.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Out of bounds exception with fetch plan</title>
<author><name>Daryl Stultz &lt;daryl@6degrees.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200912.mbox/%3cd486f41c0912040512g53a19ad4l417a21bc697324eb@mail.gmail.com%3e"/>
<id>urn:uuid:%3cd486f41c0912040512g53a19ad4l417a21bc697324eb@mail-gmail-com%3e</id>
<updated>2009-12-04T13:12:36Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On Fri, Dec 4, 2009 at 3:40 AM, Srinivasan Krishnamoorthy &lt;
srinivasan.krish@live.com&gt; wrote:

&gt;
&gt; Hi Daryl,
&gt;  Did you get a solution to this problem... We are also facing exactly the
&gt; same issue..
&gt;
&gt; No, my work around was to not use fetch plans and use "left join fetch" in
my query. I posted my unit test here but it seems no one took an interest.
When I get a chance I'll post it to the dev list. My unit test is not as
simple as I'd like it to be. Perhaps you can produce a unit test that is
simpler.

-- 
Daryl Stultz
_____________________________________
6 Degrees Software and Consulting, Inc.
http://www.6degrees.com
mailto:daryl@6degrees.com


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Out of bounds exception with fetch plan</title>
<author><name>Srinivasan Krishnamoorthy &lt;srinivasan.krish@live.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200912.mbox/%3c1259916067606-4111206.post@n2.nabble.com%3e"/>
<id>urn:uuid:%3c1259916067606-4111206-post@n2-nabble-com%3e</id>
<updated>2009-12-04T08:41:07Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

Hi Daryl,
 Did you get a solution to this problem... We are also facing exactly the
same issue.. 

My query is something like.. 

"select DISTINCT o from Organisation o where o.typeFlag=0 and o.name like
:name".

The entity Organisation shares many OneToMany relations with other entities.
(some are self-referencing).
Am not able to figure out whats the problem..

I get the below exception trace.. 

Caused by: java.lang.ArrayIndexOutOfBoundsException: Array index out of
range: 3
at
org.apache.openjpa.meta.ClassMetaData.getExtraFieldDataIndex(ClassMetaData.java:860)
at
org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initializeState(JDBCStoreManager.java:358)
at
org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initialize(JDBCStoreManager.java:278)
at
com.ibm.ws.persistence.jdbc.kernel.WsJpaJDBCStoreManager.initialize(WsJpaJDBCStoreManager.java:144)
at
org.apache.openjpa.kernel.DelegatingStoreManager.initialize(DelegatingStoreManager.java:111)
at
org.apache.openjpa.kernel.ROPStoreManager.initialize(ROPStoreManager.java:57)
at org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:894)
at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:852)

I am using DB2 v 9.1.

Best Regards,
Srinivasan Krishnamoorthy.



Daryl Stultz wrote:
&gt; 
&gt; Hello, I'm getting the following:
&gt; 
&gt; java.lang.ArrayIndexOutOfBoundsException: 2
&gt; at
&gt; org.apache.openjpa.meta.ClassMetaData.getExtraFieldDataIndex(ClassMetaData.java:859)
&gt; at
&gt; org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initializeState(JDBCStoreManager.java:358)
&gt; at
&gt; org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initialize(JDBCStoreManager.java:278)
&gt; at
&gt; org.apache.openjpa.kernel.DelegatingStoreManager.initialize(DelegatingStoreManager.java:111)
&gt; at
&gt; org.apache.openjpa.kernel.ROPStoreManager.initialize(ROPStoreManager.java:57)
&gt; at org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:894)
&gt; at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:852)
&gt; at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:774)
&gt; at
&gt; org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:982)
&gt; at
&gt; org.apache.openjpa.jdbc.sql.AbstractResult.load(AbstractResult.java:278)
&gt; at
&gt; org.apache.openjpa.jdbc.sql.SelectImpl$SelectResult.load(SelectImpl.java:2400)
&gt; at
&gt; org.apache.openjpa.jdbc.meta.strats.RelationFieldStrategy.loadEagerJoin(RelationFieldStrategy.java:541)
&gt; at
&gt; org.apache.openjpa.jdbc.meta.FieldMapping.loadEagerJoin(FieldMapping.java:807)--
&gt; 
&gt; 
&gt; I've attached a unit test that exposes it. I've done my best to pare
&gt; things
&gt; down but it seems anything else I remove makes it go away (there are
&gt; several
&gt; things that could be removed to make it go away). The unit test passes
&gt; when
&gt; the exception is thrown.
&gt; 
&gt; In short, this works:
&gt; 
&gt; Query query = em.createQuery("select o from Case as o" +
&gt;     " left join fetch o.scheduledAssignments" +
&gt;     " where o.scheduleDay = :sd");
&gt; query.setParameter("sd", sd);
&gt; List&lt;Case&gt; allCases = query.getResultList();
&gt; 
&gt; But this doesn't:
&gt; 
&gt; Query query = em.createQuery("select o from Case as o" +
&gt;     " where o.scheduleDay = :sd");
&gt; query.setParameter("sd", sd);
&gt; FetchPlan fetchPlan = ((QueryImpl) query).getFetchPlan();
&gt; fetchPlan.addField(Case.class, "scheduledAssignments");
&gt; List&lt;Case&gt; allCases = query.getResultList();
&gt; 
&gt; The test case runs against PostgreSQL. I would really appreciate it if
&gt; someone could verify the test passes under some other database or if it
&gt; fails, under PostgreSQL. Of course it would be even better if an OpenJPA
&gt; expert could find the problem.
&gt; 
&gt; I will also accept suggestions for building a better unit test package.
&gt; 
&gt; Thanks for your help.
&gt; 
&gt; Daryl Stultz
&gt; _____________________________________
&gt; 6 Degrees Software and Consulting, Inc.
&gt; http://www.6degrees.com
&gt; mailto:daryl@6degrees.com
&gt; 
&gt;  
&gt; 

-- 
View this message in context: http://n2.nabble.com/Out-of-bounds-exception-with-fetch-plan-tp4028405p4111206.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Out of bounds exception with fetch plan</title>
<author><name>Srinivasan Krishnamoorthy &lt;srinivasan.krish@live.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200912.mbox/%3c1259916054426-4111204.post@n2.nabble.com%3e"/>
<id>urn:uuid:%3c1259916054426-4111204-post@n2-nabble-com%3e</id>
<updated>2009-12-04T08:40:54Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

Hi Daryl,
 Did you get a solution to this problem... We are also facing exactly the
same issue.. 

My query is something like.. 

"select DISTINCT o from Organisation o where o.typeFlag=0 and o.name like
:name".

The entity Organisation shares many OneToMany relations with other entities.
(some are self-referencing).
Am not able to figure out whats the problem..

I get the below exception trace.. 

Caused by: java.lang.ArrayIndexOutOfBoundsException: Array index out of
range: 3
at
org.apache.openjpa.meta.ClassMetaData.getExtraFieldDataIndex(ClassMetaData.java:860)
at
org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initializeState(JDBCStoreManager.java:358)
at
org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initialize(JDBCStoreManager.java:278)
at
com.ibm.ws.persistence.jdbc.kernel.WsJpaJDBCStoreManager.initialize(WsJpaJDBCStoreManager.java:144)
at
org.apache.openjpa.kernel.DelegatingStoreManager.initialize(DelegatingStoreManager.java:111)
at
org.apache.openjpa.kernel.ROPStoreManager.initialize(ROPStoreManager.java:57)
at org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:894)
at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:852)

I am using DB2 v 9.1.

Best Regards,
Srinivasan Krishnamoorthy.



Daryl Stultz wrote:
&gt; 
&gt; Hello, I'm getting the following:
&gt; 
&gt; java.lang.ArrayIndexOutOfBoundsException: 2
&gt; at
&gt; org.apache.openjpa.meta.ClassMetaData.getExtraFieldDataIndex(ClassMetaData.java:859)
&gt; at
&gt; org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initializeState(JDBCStoreManager.java:358)
&gt; at
&gt; org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initialize(JDBCStoreManager.java:278)
&gt; at
&gt; org.apache.openjpa.kernel.DelegatingStoreManager.initialize(DelegatingStoreManager.java:111)
&gt; at
&gt; org.apache.openjpa.kernel.ROPStoreManager.initialize(ROPStoreManager.java:57)
&gt; at org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:894)
&gt; at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:852)
&gt; at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:774)
&gt; at
&gt; org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:982)
&gt; at
&gt; org.apache.openjpa.jdbc.sql.AbstractResult.load(AbstractResult.java:278)
&gt; at
&gt; org.apache.openjpa.jdbc.sql.SelectImpl$SelectResult.load(SelectImpl.java:2400)
&gt; at
&gt; org.apache.openjpa.jdbc.meta.strats.RelationFieldStrategy.loadEagerJoin(RelationFieldStrategy.java:541)
&gt; at
&gt; org.apache.openjpa.jdbc.meta.FieldMapping.loadEagerJoin(FieldMapping.java:807)--
&gt; 
&gt; 
&gt; I've attached a unit test that exposes it. I've done my best to pare
&gt; things
&gt; down but it seems anything else I remove makes it go away (there are
&gt; several
&gt; things that could be removed to make it go away). The unit test passes
&gt; when
&gt; the exception is thrown.
&gt; 
&gt; In short, this works:
&gt; 
&gt; Query query = em.createQuery("select o from Case as o" +
&gt;     " left join fetch o.scheduledAssignments" +
&gt;     " where o.scheduleDay = :sd");
&gt; query.setParameter("sd", sd);
&gt; List&lt;Case&gt; allCases = query.getResultList();
&gt; 
&gt; But this doesn't:
&gt; 
&gt; Query query = em.createQuery("select o from Case as o" +
&gt;     " where o.scheduleDay = :sd");
&gt; query.setParameter("sd", sd);
&gt; FetchPlan fetchPlan = ((QueryImpl) query).getFetchPlan();
&gt; fetchPlan.addField(Case.class, "scheduledAssignments");
&gt; List&lt;Case&gt; allCases = query.getResultList();
&gt; 
&gt; The test case runs against PostgreSQL. I would really appreciate it if
&gt; someone could verify the test passes under some other database or if it
&gt; fails, under PostgreSQL. Of course it would be even better if an OpenJPA
&gt; expert could find the problem.
&gt; 
&gt; I will also accept suggestions for building a better unit test package.
&gt; 
&gt; Thanks for your help.
&gt; 
&gt; Daryl Stultz
&gt; _____________________________________
&gt; 6 Degrees Software and Consulting, Inc.
&gt; http://www.6degrees.com
&gt; mailto:daryl@6degrees.com
&gt; 
&gt;  
&gt; 

-- 
View this message in context: http://n2.nabble.com/Out-of-bounds-exception-with-fetch-plan-tp4028405p4111204.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.


</pre>
</div>
</content>
</entry>
<entry>
<title>marked for Rollback only problem</title>
<author><name>Marc Logemann &lt;ml@logentis.de&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200912.mbox/%3cD4F6388C-2902-4765-A86D-98328A47FF13@logentis.de%3e"/>
<id>urn:uuid:%3cD4F6388C-2902-4765-A86D-98328A47FF13@logentis-de%3e</id>
<updated>2009-12-04T03:28:56Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi,

JPA makes me mad these days ;-) I have a simple DAO which might produce invalid JPAQL.

@Repository
@Transactional
public class MetaDataDaoImpl implements MetaDataDao {

public Object getClientMetaDataByObjName(String objname, long client) {
        Query query = em.createQuery("select x from " + objname + " x where x.client =  "
+ client);
        Object o;
        try {
            o = query.getSingleResult();
        } catch (Exception e) {
           return null;
        }
        return o;
    }
}

There are cases where "objname" is an invalid identifier and i cant prevent this. So i thought
i just return null in this case. Of course i am getting the expected org.apache.openjpa.persistence.ArgumentException
in the try block.

So i get into the catch block and the CALLER should proceed, but in fact, when leaving this
method, the CALLER never gets the chance to proceed because of the exception below.

First of all i dont know why he want to commit() something in a method where i dont modify
any object. In fact i dont even get an object back which i could change. I also tried "read
only" with a seperate Transaction attribute on the method and i also tried a REQUIRES_NEW,
just to be sure that i am not wihin a larger transaction block, which i am not.

When i move the try catch block to the caller and throwing the exeption from the DAO, i can
proceed and ignore the stuff in the caller. But why doesnt it work the way i ve done it?


---

javax.servlet.ServletException: org.springframework.orm.jpa.JpaSystemException: The transaction
cannot be committed, because it was already marked for rollback only. The transaction will
be rolled back instead. The cause of the rollback-only status is reported in the embedded
stack.; nested exception is org.apache.openjpa.persistence.PersistenceException: The transaction
cannot be committed, because it was already marked for rollback only. The transaction will
be rolled back instead. The cause of the rollback-only status is reported in the embedded
stack. at org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:520)
at com.cc.framework.adapter.struts.FWRequestProcessor.processActionPerform(Unknown Source)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at de.netversys.util.filter.CheckSessionFilter.doFilter(CheckSessionFilter.java:50) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:118) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619)
Caused by: org.springframework.orm.jpa.JpaSystemException: The transaction cannot be committed,
because it was already marked for rollback only. The transaction will be rolled back instead.
The cause of the rollback-only status is reported in the embedded stack.; nested exception
is org.apache.openjpa.persistence.PersistenceException: The transaction cannot be committed,
because it was already marked for rollback only. The transaction will be rolled back instead.
The cause of the rollback-only status is reported in the embedded stack. at org.springframework.orm.jpa.EntityManagerFactoryUtils.convertJpaAccessExceptionIfPossible(EntityManagerFactoryUtils.java:296)
at org.springframework.orm.jpa.DefaultJpaDialect.translateExceptionIfPossible(DefaultJpaDialect.java:120)
at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:460)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:709)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:678)
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:321)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:116)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy12.getClientMetaDataByObjName(Unknown Source) at de.netversys.process.AbstractProductEvaluator.getBasicClientMetaData(AbstractProductEvaluator.java:108)
at de.netversys.process.PossibleProductsEvaluator.getPossibleProducts(PossibleProductsEvaluator.java:119)
at de.netversys.action.frontend.DoWeightingAction.doExecute(DoWeightingAction.java:183) at
de.netversys.action.frontend.FrontendAction.execute(FrontendAction.java:63) at de.logentis.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:105)
at com.cc.framework.adapter.struts.RequestProcessorUtil.processAction(Unknown Source) ...
25 more Caused by: org.apache.openjpa.persistence.PersistenceException: The transaction cannot
be committed, because it was already marked for rollback only. The transaction will be rolled
back instead. The cause of the rollback-only status is reported in the embedded stack. at
org.apache.openjpa.kernel.LocalManagedRuntime.commit(LocalManagedRuntime.java:89) at org.apache.openjpa.kernel.BrokerImpl.commit(BrokerImpl.java:1350)
at org.apache.openjpa.kernel.DelegatingBroker.commit(DelegatingBroker.java:877) at org.apache.openjpa.persistence.EntityManagerImpl.commit(EntityManagerImpl.java:512)
at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:456)
... 38 more Caused by: org.apache.openjpa.persistence.ArgumentException: An error occurred
while parsing the query filter "select x from MdExekutiveTransport x where x.client = 50".
Error message: The name "MdExekutiveTransport" is not a recognized entity or identifier. Perhaps
you meant MdSeurDefault, which is a close match. Known entity names: [User, CarrierMapping,]
at org.apache.openjpa.kernel.exps.AbstractExpressionBuilder.parseException(AbstractExpressionBuilder.java:118)
at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getClassMetaData(JPQLExpressionBuilder.java:177)
at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.resolveClassMetaData(JPQLExpressionBuilder.java:150)
at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaData(JPQLExpressionBuilder.java:225)
at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaData(JPQLExpressionBuilder.java:195)
at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateType(JPQLExpressionBuilder.java:188)
at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.access$600(JPQLExpressionBuilder.java:69)
at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder$ParsedJPQL.populate(JPQLExpressionBuilder.java:1756)
at org.apache.openjpa.kernel.jpql.JPQLParser.populate(JPQLParser.java:56) at org.apache.openjpa.kernel.ExpressionStoreQuery.populateFromCompilation(ExpressionStoreQuery.java:153)
at org.apache.openjpa.kernel.QueryImpl.newCompilation(QueryImpl.java:658) at org.apache.openjpa.kernel.QueryImpl.compilationFromCache(QueryImpl.java:639)
at org.apache.openjpa.kernel.QueryImpl.compileForCompilation(QueryImpl.java:605) at org.apache.openjpa.kernel.QueryImpl.compileForExecutor(QueryImpl.java:667)
at org.apache.openjpa.kernel.QueryImpl.getOperation(QueryImpl.java:1492) at org.apache.openjpa.kernel.DelegatingQuery.getOperation(DelegatingQuery.java:123)
at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:243) at org.apache.openjpa.persistence.QueryImpl.getSingleResult(QueryImpl.java:316)
at de.netversys.dao.impl.MetaDataDaoImpl.getClientMetaDataByObjName(MetaDataDaoImpl.java:74)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at
java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
... 34 more

-- 
Marc Logemann - LOGENTIS GmbH
geschäftsführender Gesellschafter
Westerbreite 7 - 49084 Osnabrück
Tel. +49 (0)541 - 80049791
Fax  +49 (0)541 - 9778172
Mob. +49 (0)177 - 8220182
http://www.logentis.de
ml@logentis.de

*** Enterprise Versandlogistik: http://www.netversys.de

Sitz der Gesellschaft: Osnabrück | Geschäftsführer: Marc Logemann | Handelsregisternummer:
Amtsgericht Osnabrück, HRB 201057 | UstIdNr: DE 814858920



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: slow Query (but not the SQL itself) (OpenJPA 1.2.x)</title>
<author><name>Marc Logemann &lt;li@logemann.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200912.mbox/%3cB567ACE9-2CE1-40F3-B8F4-CE271E4B5C23@logemann.org%3e"/>
<id>urn:uuid:%3cB567ACE9-2CE1-40F3-B8F4-CE271E4B5C23@logemann-org%3e</id>
<updated>2009-12-04T03:12:48Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi,

i found out that some one-to-one relations in the Superclass added some heavy performance
penalties. I ve not seen it in the SQL logs though. Perhaps i missed it.
Cant comment on the detachment. It seems that its not the problem at all in my case.

---
regards
Marc Logemann
http://www.logemann.org
http://www.logentis.de




Am 03.12.2009 um 14:53 schrieb Rick Curtis:

&gt; Marc -
&gt; 
&gt; In the case where you call em.find(...) and it takes 500ms how long does
&gt; that operation take if the result doesn't need to be detached? The reason I
&gt; ask is that I've been doing some performance work and we found that in some
&gt; instances we are spending way too much time detaching Entities.
&gt; 
&gt; -- 
&gt; Thanks,
&gt; Rick
&gt; 
&gt; On Thu, Dec 3, 2009 at 6:06 AM, Marc Logemann &lt;li@logemann.org&gt; wrote:
&gt; 
&gt;&gt; Hi,
&gt;&gt; 
&gt;&gt; i am facing some weird performance issues. Given this  JPA Query:
&gt;&gt; 
&gt;&gt; public class SomeDao {
&gt;&gt;   @SuppressWarnings("unchecked")
&gt;&gt;   public Object getMetaData(Foo.class, long oid) {
&gt;&gt;       Object o = em.find(clazz, client);
&gt;&gt;       return o;
&gt;&gt;   }
&gt;&gt; ..
&gt;&gt; }
&gt;&gt; 
&gt;&gt; 
&gt;&gt; @Entity
&gt;&gt; @VersionColumn(name = "jpaversion")
&gt;&gt; @Table(name = "foo")
&gt;&gt; public class Foo extends BasicClientMetaData {
&gt;&gt; 
&gt;&gt;   @Id
&gt;&gt;   @Column(name = "client_oid")
&gt;&gt;   private long client;
&gt;&gt; ...
&gt;&gt; }
&gt;&gt; 
&gt;&gt; @MappedSuperclass
&gt;&gt; public class BasicClientMetaData implements MinMaxWeightAware {
&gt;&gt; 
&gt;&gt; 
&gt;&gt;   @Column(name = "custnr")
&gt;&gt;   private String customerNumber;
&gt;&gt; 
&gt;&gt;   @Column(name = "maxweight")
&gt;&gt;   private float maxWeightStandard;
&gt;&gt; ..
&gt;&gt; }
&gt;&gt; 
&gt;&gt; When i call the getMetaData() of SomeDao.class (which is transactional and
&gt;&gt; gets detached when its returned to the caller), i measured 500ms for this
&gt;&gt; operation. The underlying SQL only consumes 20ms which i checked by setting
&gt;&gt; the SQL log level to TRACE.
&gt;&gt; 
&gt;&gt; Why is there such a difference? I mean, detaching cant be such an issue
&gt;&gt; from performance perspective. I only have this issue with exactly these kind
&gt;&gt; of classes (children of BasicClientMetaData).
&gt;&gt; 
&gt;&gt; But i also have other classes which have the @MappedSuperclass which work
&gt;&gt; without performance problems. Does anyone have a hint where i can look out
&gt;&gt; for?
&gt;&gt; 
&gt;&gt; 
&gt;&gt; thanks.
&gt;&gt; 
&gt;&gt; ---
&gt;&gt; regards
&gt;&gt; Marc Logemann
&gt;&gt; http://www.logemann.org
&gt;&gt; http://www.logentis.de
&gt;&gt; 
&gt;&gt; 
&gt;&gt; 
&gt;&gt; 
&gt;&gt; 



</pre>
</div>
</content>
</entry>
<entry>
<title>Setter not working for detached object</title>
<author><name>Javatao &lt;taolu2000@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200912.mbox/%3c1259876283487-4109048.post@n2.nabble.com%3e"/>
<id>urn:uuid:%3c1259876283487-4109048-post@n2-nabble-com%3e</id>
<updated>2009-12-03T21:38:03Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

Hi, Experts, 

I am having an issue with detached object in OpenJPA. 

Setter method of relationship field does not work. 
Setter method of primitive field works fine.

Here is an example
=======================================
...
Foo foo = entityManager.find(Foo.class, 1);
Bar foo = entityManager.find(Bar.class, 2);
...
entityManager.close();
...


foo.setName("newNameFoo");
bar.setName("newNameBar");
foo.setBar(bar);
System.out.println(foo.getName());
System.out.println(bar.getName());
System.out.println(foo.getBar());
=====================

Here is the output:

newNameFoo
newNameBar
null


This is so wierd!

Any idea? 

Many thanks in advance!

Tao


-- 
View this message in context: http://n2.nabble.com/Setter-not-working-for-detached-object-tp4109048p4109048.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.


</pre>
</div>
</content>
</entry>
<entry>
<title>RE: What happens with invalid query hints?</title>
<author><name>&quot;KARR, DAVID (ATTCINW)&quot; &lt;dk068x@att.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200912.mbox/%3cE0529A8FFC2C9143A5F1BB9A89101D0607839501@BD01MSXMB018.US.Cingular.Net%3e"/>
<id>urn:uuid:%3cE0529A8FFC2C9143A5F1BB9A89101D0607839501@BD01MSXMB018-US-Cingular-Net%3e</id>
<updated>2009-12-03T20:07:24Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
&gt; -----Original Message-----
&gt; From: Kevin Sutter [mailto:kwsutter@gmail.com]
&gt; Sent: Thursday, December 03, 2009 11:27 AM
&gt; To: users@openjpa.apache.org
&gt; Subject: Re: What happens with invalid query hints?
&gt; 
&gt; Yep, I think we're all in agreement on how we should process these
&gt; hints.
&gt; But, the point of the original posting was that the documentation
&gt; doesn't
&gt; explain this very well.  So, we still need a JIRA to get this cleaned
&gt; up.
&gt; Agree?

Although I had volunteered to create the JIRA, now that there's a great
deal more information about this, I'd say someone else would be more
appropriate for that.

&gt; Kevin
&gt; 
&gt; On Thu, Dec 3, 2009 at 12:25 PM, Pinaki Poddar &lt;ppoddar@apache.org&gt;
&gt; wrote:
&gt; 
&gt; &gt;
&gt; &gt; Craig is right.
&gt; &gt;
&gt; &gt; OpenJPA categories a hint key in the following categories (from
&gt; JavaDoc on
&gt; &gt; HintHandler)
&gt; &gt;  *  1. Supported: A key is known to this receiver as collected from
&gt; &gt; different
&gt; &gt;  *     parts of the system. The value of a supported key is recorded
&gt; and
&gt; &gt;  *     available via {@link #getHints()} method.
&gt; &gt;  *  2. Recognized: A key is not known to this receiver but has a
&gt; prefix
&gt; &gt; which
&gt; &gt;  *     is known to this receiver. The value of a recognized key is
&gt; not
&gt; &gt; recorded
&gt; &gt;  *     but its value is available via {@link
&gt; &gt; FetchConfiguration#getHint(String)}
&gt; &gt;  *  3. Unrecognized: A key is neither supported nor recognized. The
&gt; value
&gt; &gt; of
&gt; &gt; a
&gt; &gt;  *     unrecognized key is neither recorded nor set anywhere.
&gt; &gt;
&gt; &gt; Semantically, this categorization aligns with Craig's classification
&gt; as
&gt; &gt; Craig's category 1 = Supported
&gt; &gt; Craig's category 2 = Unrecognized
&gt; &gt; Craig's category 3 = Recognized
&gt; &gt;
&gt; &gt; The runtime exception handling behavior is somewhat more lenient
than
&gt; what
&gt; &gt; Craig describes. None of the three categories of hint key raises an
&gt; &gt; exception. Recognized key is not recorded i.e. they do not appear in
&gt; &gt; getHints() list. They only generate a warning message. The only
&gt; exception
&gt; &gt; scenario is a Supported key supplied with an incompatiable value.
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt; Craig L Russell wrote:
&gt; &gt; &gt;
&gt; &gt; &gt; The specification offers this explanation (3.8.9 in the draft
&gt; &gt; &gt; specification dated 2009-10-06):
&gt; &gt; &gt;
&gt; &gt; &gt; Vendors are permitted to support the use of additional, vendor-
&gt; &gt; &gt; specific locking hints.  Vendor-specific
&gt; &gt; &gt; hints must not use the javax.persistence namespace.
Vendor-specific
&gt; &gt; &gt; hints must be ignored if
&gt; &gt; &gt; they are not understood.
&gt; &gt; &gt;
&gt; &gt; &gt; So the model is that there are three categories of hints:
&gt; &gt; &gt;
&gt; &gt; &gt; 1. hints that are known to OpenJPA, which are hints defined by the
&gt; &gt; &gt; standard plus the hints that are defined by OpenJPA to extend the
&gt; &gt; &gt; standard hints. These hints are defined in the OpenJPA name space
&gt; &gt; &gt; "openjpa.hint.*" or in the standard hint name space
&gt; &gt; &gt; "javax.persistence.*"
&gt; &gt; &gt;
&gt; &gt; &gt; 2. hints that are defined by other vendors in their own name
space.
&gt; &gt; &gt;
&gt; &gt; &gt; 3. hints that are in the OpenJPA name space but are not known to
&gt; &gt; &gt; OpenJPA. These are usually typos by the user. For example,
&gt; &gt; &gt; "openjpa.hint.OOptimizeResultCount".
&gt; &gt; &gt;
&gt; &gt; &gt; Category 1 hints are honored if possible (e.g. the database in use
&gt; &gt; &gt; supports the hint).
&gt; &gt; &gt;
&gt; &gt; &gt; Category 2 hints are ignored by OpenJPA. This allows you to use
the
&gt; &gt; &gt; same set of hints in a program with different persistence vendors.
&gt; &gt; &gt;
&gt; &gt; &gt; Category 3 hints result in an exception. Typos should be caught
and
&gt; &gt; &gt; reported.
&gt; &gt; &gt;
&gt; &gt; &gt; Sometimes we developers assume that users read and understand the
&gt; &gt; &gt; specification along with the OpenJPA user documentation. Bad
&gt; assumption.
&gt; &gt; &gt;
&gt; &gt; &gt; By the way, this model for hints follows the general model for
&gt; &gt; &gt; properties in several JCP specifications.
&gt; &gt; &gt;
&gt; &gt; &gt; Craig
&gt; &gt; &gt;
&gt; &gt; &gt; On Dec 2, 2009, at 3:55 PM, Kevin Sutter wrote:
&gt; &gt; &gt;
&gt; &gt; &gt;&gt; :-)  Yeah, that's kind of confusing, isn't it?  I'm assuming that
&gt; it
&gt; &gt; &gt;&gt; should
&gt; &gt; &gt;&gt; read as follows:
&gt; &gt; &gt;&gt;
&gt; &gt; &gt;&gt; "Hints which can not be processed by a particular database are
&gt; &gt; &gt;&gt; ignored.
&gt; &gt; &gt;&gt; Otherwise, invalid hints will result in an ArgumentException
being
&gt; &gt; &gt;&gt; thrown."
&gt; &gt; &gt;&gt;
&gt; &gt; &gt;&gt; OpenJPA has defined certain hints (and JPA 2.0 has defined some
&gt; some
&gt; &gt; &gt;&gt; hints)
&gt; &gt; &gt;&gt; that could be used with Queries.  Some of these hints do not
apply
&gt; &gt; &gt;&gt; to all
&gt; &gt; &gt;&gt; databases.  So, if you try using one of the hints, for example
&gt; &gt; &gt;&gt; openjpa.hint.OptimizeResultCount and your designated database
&gt; &gt; &gt;&gt; doesn't have
&gt; &gt; &gt;&gt; the capability to provide the necessary processing for this
&gt; request,
&gt; &gt; &gt;&gt; then it
&gt; &gt; &gt;&gt; would be ignored.
&gt; &gt; &gt;&gt;
&gt; &gt; &gt;&gt; Otherwise, if you pass in a hint that OpenJPA knows nothing about
&gt; &gt; &gt;&gt; (let's
&gt; &gt; &gt;&gt; just say openjpa.hint.FailFast), then you would receive an
&gt; &gt; &gt;&gt; ArgumentException.  The curious thing here is that this seems to
&gt; &gt; &gt;&gt; contradict
&gt; &gt; &gt;&gt; the hint processing as defined by JPA 2.0.  I believe invalid
&gt; hints
&gt; &gt; &gt;&gt; are
&gt; &gt; &gt;&gt; supposed to be ignored to allow for programming model
&gt; compatibilities
&gt; &gt; &gt;&gt; between JPA providers.  So, maybe there's some clean up necessary
&gt; in
&gt; &gt; &gt;&gt; our
&gt; &gt; &gt;&gt; documentation.
&gt; &gt; &gt;&gt;
&gt; &gt; &gt;&gt; Does this help?  We should probably open a JIRA to address this
&gt; &gt; &gt;&gt; documentation hiccup.  If you don't have access to open a JIRA,
&gt; then
&gt; &gt; &gt;&gt; let me
&gt; &gt; &gt;&gt; know and I can open one.
&gt; &gt; &gt;&gt;
&gt; &gt; &gt;&gt; Thanks,
&gt; &gt; &gt;&gt; Kevin
&gt; &gt; &gt;&gt;
&gt; &gt; &gt;&gt; On Wed, Dec 2, 2009 at 2:36 PM, KARR, DAVID (ATTCINW)
&gt; &gt; &gt;&gt; &lt;dk068x@att.com&gt;wrote:
&gt; &gt; &gt;&gt;
&gt; &gt; &gt;&gt;&gt; I'm just reading through the docs (1.2.1) right now, and I
&gt; noticed
&gt; &gt; &gt;&gt;&gt; the
&gt; &gt; &gt;&gt;&gt; following statement in section 10.1.7,  "Query Hints":
&gt; &gt; &gt;&gt;&gt;
&gt; &gt; &gt;&gt;&gt; "Invalid hints or hints which can not be processed by a
&gt; particular
&gt; &gt; &gt;&gt;&gt; database are ignored. Otherwise, invalid hints will result in an
&gt; &gt; &gt;&gt;&gt; ArgumentException being thrown."
&gt; &gt; &gt;&gt;&gt;
&gt; &gt; &gt;&gt;&gt; I'm a little confused by this.  Under what circumstances will a
&gt; &gt; &gt;&gt;&gt; hint be
&gt; &gt; &gt;&gt;&gt; ignored, and when will it get an ArgumentException?
&gt; &gt; &gt;&gt;&gt;
&gt; &gt; &gt;
&gt; &gt; &gt; Craig L Russell
&gt; &gt; &gt; Architect, Sun Java Enterprise System http://db.apache.org/jdo
&gt; &gt; &gt; 408 276-5638 mailto:Craig.Russell@sun.com
&gt; &gt; &gt; P.S. A good JDO? O, Gasp!
&gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt; -----
&gt; &gt; Pinaki
&gt; &gt; --
&gt; &gt; View this message in context:
&gt; &gt; http://n2.nabble.com/What-happens-with-invalid-query-hints-
&gt; tp4102163p4107811.html
&gt; &gt; Sent from the OpenJPA Users mailing list archive at Nabble.com.
&gt; &gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: What happens with invalid query hints?</title>
<author><name>Kevin Sutter &lt;kwsutter@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200912.mbox/%3c89c0c52c0912031127i47f418c5re90e7655c9501e72@mail.gmail.com%3e"/>
<id>urn:uuid:%3c89c0c52c0912031127i47f418c5re90e7655c9501e72@mail-gmail-com%3e</id>
<updated>2009-12-03T19:27:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Yep, I think we're all in agreement on how we should process these hints.
But, the point of the original posting was that the documentation doesn't
explain this very well.  So, we still need a JIRA to get this cleaned up.
Agree?

Kevin

On Thu, Dec 3, 2009 at 12:25 PM, Pinaki Poddar &lt;ppoddar@apache.org&gt; wrote:

&gt;
&gt; Craig is right.
&gt;
&gt; OpenJPA categories a hint key in the following categories (from JavaDoc on
&gt; HintHandler)
&gt;  *  1. Supported: A key is known to this receiver as collected from
&gt; different
&gt;  *     parts of the system. The value of a supported key is recorded and
&gt;  *     available via {@link #getHints()} method.
&gt;  *  2. Recognized: A key is not known to this receiver but has a prefix
&gt; which
&gt;  *     is known to this receiver. The value of a recognized key is not
&gt; recorded
&gt;  *     but its value is available via {@link
&gt; FetchConfiguration#getHint(String)}
&gt;  *  3. Unrecognized: A key is neither supported nor recognized. The value
&gt; of
&gt; a
&gt;  *     unrecognized key is neither recorded nor set anywhere.
&gt;
&gt; Semantically, this categorization aligns with Craig's classification as
&gt; Craig's category 1 = Supported
&gt; Craig's category 2 = Unrecognized
&gt; Craig's category 3 = Recognized
&gt;
&gt; The runtime exception handling behavior is somewhat more lenient than what
&gt; Craig describes. None of the three categories of hint key raises an
&gt; exception. Recognized key is not recorded i.e. they do not appear in
&gt; getHints() list. They only generate a warning message. The only exception
&gt; scenario is a Supported key supplied with an incompatiable value.
&gt;
&gt;
&gt;
&gt; Craig L Russell wrote:
&gt; &gt;
&gt; &gt; The specification offers this explanation (3.8.9 in the draft
&gt; &gt; specification dated 2009-10-06):
&gt; &gt;
&gt; &gt; Vendors are permitted to support the use of additional, vendor-
&gt; &gt; specific locking hints.  Vendor-specific
&gt; &gt; hints must not use the javax.persistence namespace. Vendor-specific
&gt; &gt; hints must be ignored if
&gt; &gt; they are not understood.
&gt; &gt;
&gt; &gt; So the model is that there are three categories of hints:
&gt; &gt;
&gt; &gt; 1. hints that are known to OpenJPA, which are hints defined by the
&gt; &gt; standard plus the hints that are defined by OpenJPA to extend the
&gt; &gt; standard hints. These hints are defined in the OpenJPA name space
&gt; &gt; "openjpa.hint.*" or in the standard hint name space
&gt; &gt; "javax.persistence.*"
&gt; &gt;
&gt; &gt; 2. hints that are defined by other vendors in their own name space.
&gt; &gt;
&gt; &gt; 3. hints that are in the OpenJPA name space but are not known to
&gt; &gt; OpenJPA. These are usually typos by the user. For example,
&gt; &gt; "openjpa.hint.OOptimizeResultCount".
&gt; &gt;
&gt; &gt; Category 1 hints are honored if possible (e.g. the database in use
&gt; &gt; supports the hint).
&gt; &gt;
&gt; &gt; Category 2 hints are ignored by OpenJPA. This allows you to use the
&gt; &gt; same set of hints in a program with different persistence vendors.
&gt; &gt;
&gt; &gt; Category 3 hints result in an exception. Typos should be caught and
&gt; &gt; reported.
&gt; &gt;
&gt; &gt; Sometimes we developers assume that users read and understand the
&gt; &gt; specification along with the OpenJPA user documentation. Bad assumption.
&gt; &gt;
&gt; &gt; By the way, this model for hints follows the general model for
&gt; &gt; properties in several JCP specifications.
&gt; &gt;
&gt; &gt; Craig
&gt; &gt;
&gt; &gt; On Dec 2, 2009, at 3:55 PM, Kevin Sutter wrote:
&gt; &gt;
&gt; &gt;&gt; :-)  Yeah, that's kind of confusing, isn't it?  I'm assuming that it
&gt; &gt;&gt; should
&gt; &gt;&gt; read as follows:
&gt; &gt;&gt;
&gt; &gt;&gt; "Hints which can not be processed by a particular database are
&gt; &gt;&gt; ignored.
&gt; &gt;&gt; Otherwise, invalid hints will result in an ArgumentException being
&gt; &gt;&gt; thrown."
&gt; &gt;&gt;
&gt; &gt;&gt; OpenJPA has defined certain hints (and JPA 2.0 has defined some some
&gt; &gt;&gt; hints)
&gt; &gt;&gt; that could be used with Queries.  Some of these hints do not apply
&gt; &gt;&gt; to all
&gt; &gt;&gt; databases.  So, if you try using one of the hints, for example
&gt; &gt;&gt; openjpa.hint.OptimizeResultCount and your designated database
&gt; &gt;&gt; doesn't have
&gt; &gt;&gt; the capability to provide the necessary processing for this request,
&gt; &gt;&gt; then it
&gt; &gt;&gt; would be ignored.
&gt; &gt;&gt;
&gt; &gt;&gt; Otherwise, if you pass in a hint that OpenJPA knows nothing about
&gt; &gt;&gt; (let's
&gt; &gt;&gt; just say openjpa.hint.FailFast), then you would receive an
&gt; &gt;&gt; ArgumentException.  The curious thing here is that this seems to
&gt; &gt;&gt; contradict
&gt; &gt;&gt; the hint processing as defined by JPA 2.0.  I believe invalid hints
&gt; &gt;&gt; are
&gt; &gt;&gt; supposed to be ignored to allow for programming model compatibilities
&gt; &gt;&gt; between JPA providers.  So, maybe there's some clean up necessary in
&gt; &gt;&gt; our
&gt; &gt;&gt; documentation.
&gt; &gt;&gt;
&gt; &gt;&gt; Does this help?  We should probably open a JIRA to address this
&gt; &gt;&gt; documentation hiccup.  If you don't have access to open a JIRA, then
&gt; &gt;&gt; let me
&gt; &gt;&gt; know and I can open one.
&gt; &gt;&gt;
&gt; &gt;&gt; Thanks,
&gt; &gt;&gt; Kevin
&gt; &gt;&gt;
&gt; &gt;&gt; On Wed, Dec 2, 2009 at 2:36 PM, KARR, DAVID (ATTCINW)
&gt; &gt;&gt; &lt;dk068x@att.com&gt;wrote:
&gt; &gt;&gt;
&gt; &gt;&gt;&gt; I'm just reading through the docs (1.2.1) right now, and I noticed
&gt; &gt;&gt;&gt; the
&gt; &gt;&gt;&gt; following statement in section 10.1.7,  "Query Hints":
&gt; &gt;&gt;&gt;
&gt; &gt;&gt;&gt; "Invalid hints or hints which can not be processed by a particular
&gt; &gt;&gt;&gt; database are ignored. Otherwise, invalid hints will result in an
&gt; &gt;&gt;&gt; ArgumentException being thrown."
&gt; &gt;&gt;&gt;
&gt; &gt;&gt;&gt; I'm a little confused by this.  Under what circumstances will a
&gt; &gt;&gt;&gt; hint be
&gt; &gt;&gt;&gt; ignored, and when will it get an ArgumentException?
&gt; &gt;&gt;&gt;
&gt; &gt;
&gt; &gt; Craig L Russell
&gt; &gt; Architect, Sun Java Enterprise System http://db.apache.org/jdo
&gt; &gt; 408 276-5638 mailto:Craig.Russell@sun.com
&gt; &gt; P.S. A good JDO? O, Gasp!
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt; &gt;
&gt;
&gt;
&gt; -----
&gt; Pinaki
&gt; --
&gt; View this message in context:
&gt; http://n2.nabble.com/What-happens-with-invalid-query-hints-tp4102163p4107811.html
&gt; Sent from the OpenJPA Users mailing list archive at Nabble.com.
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: What happens with invalid query hints?</title>
<author><name>Pinaki Poddar &lt;ppoddar@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200912.mbox/%3c1259864727521-4107811.post@n2.nabble.com%3e"/>
<id>urn:uuid:%3c1259864727521-4107811-post@n2-nabble-com%3e</id>
<updated>2009-12-03T18:25:27Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

Craig is right.

OpenJPA categories a hint key in the following categories (from JavaDoc on
HintHandler)
 *  1. Supported: A key is known to this receiver as collected from
different 
 *     parts of the system. The value of a supported key is recorded and 
 *     available via {@link #getHints()} method. 
 *  2. Recognized: A key is not known to this receiver but has a prefix
which
 *     is known to this receiver. The value of a recognized key is not
recorded 
 *     but its value is available via {@link
FetchConfiguration#getHint(String)}
 *  3. Unrecognized: A key is neither supported nor recognized. The value of
a 
 *     unrecognized key is neither recorded nor set anywhere.

Semantically, this categorization aligns with Craig's classification as 
Craig's category 1 = Supported
Craig's category 2 = Unrecognized
Craig's category 3 = Recognized

The runtime exception handling behavior is somewhat more lenient than what
Craig describes. None of the three categories of hint key raises an
exception. Recognized key is not recorded i.e. they do not appear in
getHints() list. They only generate a warning message. The only exception
scenario is a Supported key supplied with an incompatiable value.



Craig L Russell wrote:
&gt; 
&gt; The specification offers this explanation (3.8.9 in the draft  
&gt; specification dated 2009-10-06):
&gt; 
&gt; Vendors are permitted to support the use of additional, vendor- 
&gt; specific locking hints.  Vendor-specific
&gt; hints must not use the javax.persistence namespace. Vendor-specific  
&gt; hints must be ignored if
&gt; they are not understood.
&gt; 
&gt; So the model is that there are three categories of hints:
&gt; 
&gt; 1. hints that are known to OpenJPA, which are hints defined by the  
&gt; standard plus the hints that are defined by OpenJPA to extend the  
&gt; standard hints. These hints are defined in the OpenJPA name space  
&gt; "openjpa.hint.*" or in the standard hint name space  
&gt; "javax.persistence.*"
&gt; 
&gt; 2. hints that are defined by other vendors in their own name space.
&gt; 
&gt; 3. hints that are in the OpenJPA name space but are not known to  
&gt; OpenJPA. These are usually typos by the user. For example,  
&gt; "openjpa.hint.OOptimizeResultCount".
&gt; 
&gt; Category 1 hints are honored if possible (e.g. the database in use  
&gt; supports the hint).
&gt; 
&gt; Category 2 hints are ignored by OpenJPA. This allows you to use the  
&gt; same set of hints in a program with different persistence vendors.
&gt; 
&gt; Category 3 hints result in an exception. Typos should be caught and  
&gt; reported.
&gt; 
&gt; Sometimes we developers assume that users read and understand the  
&gt; specification along with the OpenJPA user documentation. Bad assumption.
&gt; 
&gt; By the way, this model for hints follows the general model for  
&gt; properties in several JCP specifications.
&gt; 
&gt; Craig
&gt; 
&gt; On Dec 2, 2009, at 3:55 PM, Kevin Sutter wrote:
&gt; 
&gt;&gt; :-)  Yeah, that's kind of confusing, isn't it?  I'm assuming that it  
&gt;&gt; should
&gt;&gt; read as follows:
&gt;&gt;
&gt;&gt; "Hints which can not be processed by a particular database are  
&gt;&gt; ignored.
&gt;&gt; Otherwise, invalid hints will result in an ArgumentException being  
&gt;&gt; thrown."
&gt;&gt;
&gt;&gt; OpenJPA has defined certain hints (and JPA 2.0 has defined some some  
&gt;&gt; hints)
&gt;&gt; that could be used with Queries.  Some of these hints do not apply  
&gt;&gt; to all
&gt;&gt; databases.  So, if you try using one of the hints, for example
&gt;&gt; openjpa.hint.OptimizeResultCount and your designated database  
&gt;&gt; doesn't have
&gt;&gt; the capability to provide the necessary processing for this request,  
&gt;&gt; then it
&gt;&gt; would be ignored.
&gt;&gt;
&gt;&gt; Otherwise, if you pass in a hint that OpenJPA knows nothing about  
&gt;&gt; (let's
&gt;&gt; just say openjpa.hint.FailFast), then you would receive an
&gt;&gt; ArgumentException.  The curious thing here is that this seems to  
&gt;&gt; contradict
&gt;&gt; the hint processing as defined by JPA 2.0.  I believe invalid hints  
&gt;&gt; are
&gt;&gt; supposed to be ignored to allow for programming model compatibilities
&gt;&gt; between JPA providers.  So, maybe there's some clean up necessary in  
&gt;&gt; our
&gt;&gt; documentation.
&gt;&gt;
&gt;&gt; Does this help?  We should probably open a JIRA to address this
&gt;&gt; documentation hiccup.  If you don't have access to open a JIRA, then  
&gt;&gt; let me
&gt;&gt; know and I can open one.
&gt;&gt;
&gt;&gt; Thanks,
&gt;&gt; Kevin
&gt;&gt;
&gt;&gt; On Wed, Dec 2, 2009 at 2:36 PM, KARR, DAVID (ATTCINW)  
&gt;&gt; &lt;dk068x@att.com&gt;wrote:
&gt;&gt;
&gt;&gt;&gt; I'm just reading through the docs (1.2.1) right now, and I noticed  
&gt;&gt;&gt; the
&gt;&gt;&gt; following statement in section 10.1.7,  "Query Hints":
&gt;&gt;&gt;
&gt;&gt;&gt; "Invalid hints or hints which can not be processed by a particular
&gt;&gt;&gt; database are ignored. Otherwise, invalid hints will result in an
&gt;&gt;&gt; ArgumentException being thrown."
&gt;&gt;&gt;
&gt;&gt;&gt; I'm a little confused by this.  Under what circumstances will a  
&gt;&gt;&gt; hint be
&gt;&gt;&gt; ignored, and when will it get an ArgumentException?
&gt;&gt;&gt;
&gt; 
&gt; Craig L Russell
&gt; Architect, Sun Java Enterprise System http://db.apache.org/jdo
&gt; 408 276-5638 mailto:Craig.Russell@sun.com
&gt; P.S. A good JDO? O, Gasp!
&gt; 
&gt; 
&gt;  
&gt; 


-----
Pinaki 
-- 
View this message in context: http://n2.nabble.com/What-happens-with-invalid-query-hints-tp4102163p4107811.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: detach question</title>
<author><name>Rick Curtis &lt;curtisr7@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200912.mbox/%3cf8b633140912030655s4f66a113y3022e474fa7172c7@mail.gmail.com%3e"/>
<id>urn:uuid:%3cf8b633140912030655s4f66a113y3022e474fa7172c7@mail-gmail-com%3e</id>
<updated>2009-12-03T14:55:59Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
When you call cc.merge(ooo); any changes made to that instance while it was
detached will be persisted to the DB.

I assume your comment "Here I modify the ooo but I want this modif to be
persist, not the other one before" means that you only want the changes from
after the tran begins to be persistent... If that assumption is correct,
you'll need to get a new instance of ooo to make the changes on.
-- 
Thanks,
Rick

On Thu, Dec 3, 2009 at 8:49 AM, Jean-Baptiste BRIAUD -- Novlog &lt;
j-b.briaud@novlog.com&gt; wrote:

&gt; Hi the list,
&gt;
&gt; Am i right on the following pseudo code ?
&gt;
&gt;            // Note the detach.
&gt;            // getFullById come back with an instance of MyObject from the
&gt; primary key
&gt;            final MyObject ooo = detach(getFullById(cc....
&gt;
&gt;            &lt; Here I modify (a lot) ooo but don't wan't the modif to be
&gt; persist&gt;
&gt;
&gt;                try {
&gt;                    cc.beginTransaction();
&gt;
&gt;                    &lt;Here I modify the ooo but I want this modif to be
&gt; persist, not the other one before&gt;
&gt;
&gt;                    cc.merge(ooo);
&gt;                    cc.commitTransaction();
&gt;
&gt;                } catch (...) {
&gt;                    cc.rollbackTransaction();
&gt;                }
&gt;
&gt; Thanks !


</pre>
</div>
</content>
</entry>
<entry>
<title>detach question</title>
<author><name>Jean-Baptiste BRIAUD -- Novlog &lt;j-b.briaud@novlog.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200912.mbox/%3c29FD8F5F-E7DE-479C-A9E6-2735B8858BFF@novlog.com%3e"/>
<id>urn:uuid:%3c29FD8F5F-E7DE-479C-A9E6-2735B8858BFF@novlog-com%3e</id>
<updated>2009-12-03T14:49:52Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi the list,

Am i right on the following pseudo code ?

            // Note the detach.
            // getFullById come back with an instance of MyObject from the primary key
            final MyObject ooo = detach(getFullById(cc....

            &lt; Here I modify (a lot) ooo but don't wan't the modif to be persist&gt;

                try {
                    cc.beginTransaction();

                    &lt;Here I modify the ooo but I want this modif to be persist, not the
other one before&gt;

                    cc.merge(ooo);
                    cc.commitTransaction();

                } catch (...) {
                    cc.rollbackTransaction();
                }

Thanks !

</pre>
</div>
</content>
</entry>
<entry>
<title>Re: slow Query (but not the SQL itself) (OpenJPA 1.2.x)</title>
<author><name>Rick Curtis &lt;curtisr7@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200912.mbox/%3cf8b633140912030553j610cfba4o3516fd0612bc0f68@mail.gmail.com%3e"/>
<id>urn:uuid:%3cf8b633140912030553j610cfba4o3516fd0612bc0f68@mail-gmail-com%3e</id>
<updated>2009-12-03T13:53:24Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Marc -

In the case where you call em.find(...) and it takes 500ms how long does
that operation take if the result doesn't need to be detached? The reason I
ask is that I've been doing some performance work and we found that in some
instances we are spending way too much time detaching Entities.

-- 
Thanks,
Rick

On Thu, Dec 3, 2009 at 6:06 AM, Marc Logemann &lt;li@logemann.org&gt; wrote:

&gt; Hi,
&gt;
&gt; i am facing some weird performance issues. Given this  JPA Query:
&gt;
&gt; public class SomeDao {
&gt;    @SuppressWarnings("unchecked")
&gt;    public Object getMetaData(Foo.class, long oid) {
&gt;        Object o = em.find(clazz, client);
&gt;        return o;
&gt;    }
&gt; ..
&gt; }
&gt;
&gt;
&gt; @Entity
&gt; @VersionColumn(name = "jpaversion")
&gt; @Table(name = "foo")
&gt; public class Foo extends BasicClientMetaData {
&gt;
&gt;    @Id
&gt;    @Column(name = "client_oid")
&gt;    private long client;
&gt; ...
&gt; }
&gt;
&gt; @MappedSuperclass
&gt; public class BasicClientMetaData implements MinMaxWeightAware {
&gt;
&gt;
&gt;    @Column(name = "custnr")
&gt;    private String customerNumber;
&gt;
&gt;    @Column(name = "maxweight")
&gt;    private float maxWeightStandard;
&gt; ..
&gt; }
&gt;
&gt; When i call the getMetaData() of SomeDao.class (which is transactional and
&gt; gets detached when its returned to the caller), i measured 500ms for this
&gt; operation. The underlying SQL only consumes 20ms which i checked by setting
&gt; the SQL log level to TRACE.
&gt;
&gt; Why is there such a difference? I mean, detaching cant be such an issue
&gt; from performance perspective. I only have this issue with exactly these kind
&gt; of classes (children of BasicClientMetaData).
&gt;
&gt; But i also have other classes which have the @MappedSuperclass which work
&gt; without performance problems. Does anyone have a hint where i can look out
&gt; for?
&gt;
&gt;
&gt; thanks.
&gt;
&gt; ---
&gt; regards
&gt; Marc Logemann
&gt; http://www.logemann.org
&gt; http://www.logentis.de
&gt;
&gt;
&gt;
&gt;
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: openjpa-maven-plugin snapshot</title>
<author><name>Adam Hardy &lt;adam.sql@cyberspaceroad.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200912.mbox/%3c4B17B4CA.50600@cyberspaceroad.com%3e"/>
<id>urn:uuid:%3c4B17B4CA-50600@cyberspaceroad-com%3e</id>
<updated>2009-12-03T12:53:30Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I'm not on the Mojo list, so I'm not sure what they're saying there, but I do 
know from their JIRA that there are only 2 issues in the way of a release and 
one of them is relatively trivial

http://jira.codehaus.org/browse/MOPENJPA-3

You could vote for it I guess.

The other issue is something I know nothing about.

I downloaded the source from svn and it compiles easily with maven and you can 
install the snapshot to your local repo:

svn checkout https://svn.codehaus.org/mojo/trunk/mojo/openjpa-maven-plugin 
openjpa-maven-plugin


Michael Vorburger on 03/12/09 10:45, wrote:
&gt; Hello Mojoers, I support the request for an e.g. non-SNAPSHOT v1.1
&gt; OpenJPA Maven plugin published to a repo somewhere... 
&gt; 
&gt; Would be nice to be able to use the
&gt; http://jira.codehaus.org/browse/MOPENJPA-8 fix!
&gt; 
&gt; 
&gt; -----Original Message-----
&gt; From: Adam Hardy [mailto:adam.sql@cyberspaceroad.com] 
&gt; Sent: Wednesday, December 02, 2009 7:04 PM
&gt; To: users@openjpa.apache.org
&gt; Subject: Re: openjpa-maven-plugin snapshot
&gt; 
&gt; Oh I thought the dev guys for the plugin preferred this user list.
&gt; 
&gt; No problem. It looks like I'll have to download the source and have a go
&gt; at it myself anyway.
&gt; 
&gt; 
&gt; Regards
&gt; Adam
&gt; 
&gt; Michael Dick on 02/12/09 16:14, wrote:
&gt;&gt; Hi all,
&gt;&gt;
&gt;&gt; The maven plugin is something different. The code is in codehaus SVN
&gt; and the
&gt;&gt; resulting binaries are probably published to a codehaus m2-snapshot
&gt;&gt; repository.
&gt;&gt;
&gt;&gt; I don't know how often those get published, so I've cross-posted to
&gt; their
&gt;&gt; users email list.
&gt;&gt;
&gt;&gt; Sorry for the confusion,
&gt;&gt;
&gt;&gt; -mike
&gt;&gt;
&gt;&gt; On Tue, Dec 1, 2009 at 5:13 PM, Adam Hardy
&gt; &lt;adam.sql@cyberspaceroad.com&gt;wrote:
&gt;&gt;&gt; ljnelson on 01/12/09 20:47, wrote:
&gt;&gt;&gt;
&gt;&gt;&gt;&gt; On Tue, Dec 1, 2009 at 1:48 PM, Michael Dick [via OpenJPA] &lt;
&gt;&gt;&gt;&gt;
&gt; ml-node+4095467-513228112@n2.nabble.com&lt;ml-node%2B4095467-513228112@n2.n
&gt; abble.com&gt;
&gt; &lt;ml-node%2B4095467-513228112@n2.nabble.com&lt;ml-node%252B4095467-513228112
&gt; @n2.nabble.com&gt;
&gt;&gt;&gt;&gt;&gt; wrote:
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;  I publish the snapshots to the m2-snapshot repository on
&gt;&gt;&gt;&gt;&gt; people.apache.orgfairly regularly. You can find 1.1.1-SNAPSHOT at
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;&gt;
&gt; http://people.apache.org/repo/m2-snapshot-repository/org/apache/openjpa/
&gt; openjpa/1.1.1-SNAPSHOT/
&gt;&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt; (Not part of this conversation, but is that for the OpenJPA Maven
&gt; plugin,
&gt;&gt;&gt;&gt; or
&gt;&gt;&gt;&gt; just OpenJPA?)
&gt;&gt;&gt;&gt;
&gt;&gt;&gt; Looks like OpenJPA itself. I should have mentioned the
&gt; openjpa-maven-plugin
&gt;&gt;&gt; in the text as well as the title.
&gt;&gt;&gt;
&gt;&gt;&gt; Interesting to know about the repository for Apache snapshots though.
&gt;&gt;&gt;
&gt;&gt;&gt; Regards
&gt;&gt;&gt; Adam
&gt;&gt;&gt;
&gt; 
&gt; 
&gt; ____________________________________________________________
&gt; 
&gt; â€¢ This email and any files transmitted with it are CONFIDENTIAL and intended
&gt;   solely for the use of the individual or entity to which they are addressed.
&gt; â€¢ Any unauthorized copying, disclosure, or distribution of the material within
&gt;   this email is strictly forbidden.
&gt; â€¢ Any views or opinions presented within this e-mail are solely those of the
&gt;   author and do not necessarily represent those of Odyssey Financial
&gt; Technologies SA unless otherwise specifically stated.
&gt; â€¢ An electronic message is not binding on its sender. Any message referring to
&gt;   a binding engagement must be confirmed in writing and duly signed.
&gt; â€¢ If you have received this email in error, please notify the sender immediately
&gt;   and delete the original.
&gt; 



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: slow Query (but not the SQL itself) (OpenJPA 1.2.x)</title>
<author><name>Marc Logemann &lt;li@logemann.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200912.mbox/%3cEA97ED0A-A26D-465B-8900-3F9BFA6719DB@logemann.org%3e"/>
<id>urn:uuid:%3cEA97ED0A-A26D-465B-8900-3F9BFA6719DB@logemann-org%3e</id>
<updated>2009-12-03T12:09:56Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
small correction :


public class SomeDao {
   @SuppressWarnings("unchecked")
   public Object getMetaData(Class clazz, long oid) {
       Object o = em.find(clazz, oid);
       return o;
   }
..
}


CALLER: 

Object o = someDao.getMetaData(Foo.class, 1);

---
regards
Marc Logemann
http://www.logemann.org
http://www.logentis.de




Am 03.12.2009 um 13:06 schrieb Marc Logemann:

&gt; Hi,
&gt; 
&gt; i am facing some weird performance issues. Given this  JPA Query:
&gt; 
&gt; public class SomeDao {
&gt;    @SuppressWarnings("unchecked")
&gt;    public Object getMetaData(Foo.class, long oid) {
&gt;        Object o = em.find(clazz, client);
&gt;        return o;
&gt;    }
&gt; ..
&gt; }
&gt; 
&gt; 
&gt; @Entity
&gt; @VersionColumn(name = "jpaversion")
&gt; @Table(name = "foo")
&gt; public class Foo extends BasicClientMetaData {
&gt; 
&gt;    @Id
&gt;    @Column(name = "client_oid")
&gt;    private long client;
&gt; ...
&gt; }
&gt; 
&gt; @MappedSuperclass
&gt; public class BasicClientMetaData implements MinMaxWeightAware {
&gt; 
&gt; 
&gt;    @Column(name = "custnr")
&gt;    private String customerNumber;
&gt; 
&gt;    @Column(name = "maxweight")
&gt;    private float maxWeightStandard;
&gt; ..
&gt; }
&gt; 
&gt; When i call the getMetaData() of SomeDao.class (which is transactional and gets detached
when its returned to the caller), i measured 500ms for this operation. The underlying SQL
only consumes 20ms which i checked by setting the SQL log level to TRACE.
&gt; 
&gt; Why is there such a difference? I mean, detaching cant be such an issue from performance
perspective. I only have this issue with exactly these kind of classes (children of BasicClientMetaData).
&gt; 
&gt; But i also have other classes which have the @MappedSuperclass which work without performance
problems. Does anyone have a hint where i can look out for?
&gt; 
&gt; 
&gt; thanks.
&gt; 
&gt; ---
&gt; regards
&gt; Marc Logemann
&gt; http://www.logemann.org
&gt; http://www.logentis.de
&gt; 
&gt; 
&gt; 
&gt; 



</pre>
</div>
</content>
</entry>
<entry>
<title>slow Query (but not the SQL itself) (OpenJPA 1.2.x)</title>
<author><name>Marc Logemann &lt;li@logemann.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200912.mbox/%3cB09F60DE-707E-49C4-A542-4FDDE50E46DC@logemann.org%3e"/>
<id>urn:uuid:%3cB09F60DE-707E-49C4-A542-4FDDE50E46DC@logemann-org%3e</id>
<updated>2009-12-03T12:06:54Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi,

i am facing some weird performance issues. Given this  JPA Query:

public class SomeDao {
    @SuppressWarnings("unchecked")
    public Object getMetaData(Foo.class, long oid) {
        Object o = em.find(clazz, client);
        return o;
    }
..
}


@Entity
@VersionColumn(name = "jpaversion")
@Table(name = "foo")
public class Foo extends BasicClientMetaData {

    @Id
    @Column(name = "client_oid")
    private long client;
...
}

@MappedSuperclass
public class BasicClientMetaData implements MinMaxWeightAware {


    @Column(name = "custnr")
    private String customerNumber;

    @Column(name = "maxweight")
    private float maxWeightStandard;
..
}

When i call the getMetaData() of SomeDao.class (which is transactional and gets detached when
its returned to the caller), i measured 500ms for this operation. The underlying SQL only
consumes 20ms which i checked by setting the SQL log level to TRACE.

Why is there such a difference? I mean, detaching cant be such an issue from performance perspective.
I only have this issue with exactly these kind of classes (children of BasicClientMetaData).

But i also have other classes which have the @MappedSuperclass which work without performance
problems. Does anyone have a hint where i can look out for?


thanks.

---
regards
Marc Logemann
http://www.logemann.org
http://www.logentis.de






</pre>
</div>
</content>
</entry>
<entry>
<title>RE: openjpa-maven-plugin snapshot</title>
<author><name>&quot;Michael Vorburger&quot; &lt;mvorburger@odyssey-group.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200912.mbox/%3c12D996978341E849B21C51CC97F4771D01FA9EA2@mail3.oams.com%3e"/>
<id>urn:uuid:%3c12D996978341E849B21C51CC97F4771D01FA9EA2@mail3-oams-com%3e</id>
<updated>2009-12-03T10:45:24Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hello Mojoers, I support the request for an e.g. non-SNAPSHOT v1.1
OpenJPA Maven plugin published to a repo somewhere... 

Would be nice to be able to use the
http://jira.codehaus.org/browse/MOPENJPA-8 fix!


-----Original Message-----
From: Adam Hardy [mailto:adam.sql@cyberspaceroad.com] 
Sent: Wednesday, December 02, 2009 7:04 PM
To: users@openjpa.apache.org
Subject: Re: openjpa-maven-plugin snapshot

Oh I thought the dev guys for the plugin preferred this user list.

No problem. It looks like I'll have to download the source and have a go
at it myself anyway.


Regards
Adam

Michael Dick on 02/12/09 16:14, wrote:
&gt; Hi all,
&gt; 
&gt; The maven plugin is something different. The code is in codehaus SVN
and the
&gt; resulting binaries are probably published to a codehaus m2-snapshot
&gt; repository.
&gt; 
&gt; I don't know how often those get published, so I've cross-posted to
their
&gt; users email list.
&gt; 
&gt; Sorry for the confusion,
&gt; 
&gt; -mike
&gt; 
&gt; On Tue, Dec 1, 2009 at 5:13 PM, Adam Hardy
&lt;adam.sql@cyberspaceroad.com&gt;wrote:
&gt; 
&gt;&gt; ljnelson on 01/12/09 20:47, wrote:
&gt;&gt;
&gt;&gt;&gt; On Tue, Dec 1, 2009 at 1:48 PM, Michael Dick [via OpenJPA] &lt;
&gt;&gt;&gt;
ml-node+4095467-513228112@n2.nabble.com&lt;ml-node%2B4095467-513228112@n2.n
abble.com&gt;
&gt;&gt;&gt;
&lt;ml-node%2B4095467-513228112@n2.nabble.com&lt;ml-node%252B4095467-513228112
@n2.nabble.com&gt;
&gt;&gt;&gt;&gt; wrote:
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;  I publish the snapshots to the m2-snapshot repository on
&gt;&gt;&gt;&gt; people.apache.orgfairly regularly. You can find 1.1.1-SNAPSHOT at
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;
http://people.apache.org/repo/m2-snapshot-repository/org/apache/openjpa/
openjpa/1.1.1-SNAPSHOT/
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;
&gt;&gt;&gt; (Not part of this conversation, but is that for the OpenJPA Maven
plugin,
&gt;&gt;&gt; or
&gt;&gt;&gt; just OpenJPA?)
&gt;&gt;&gt;
&gt;&gt; Looks like OpenJPA itself. I should have mentioned the
openjpa-maven-plugin
&gt;&gt; in the text as well as the title.
&gt;&gt;
&gt;&gt; Interesting to know about the repository for Apache snapshots though.
&gt;&gt;
&gt;&gt; Regards
&gt;&gt; Adam
&gt;&gt;
&gt; 


____________________________________________________________

• This email and any files transmitted with it are CONFIDENTIAL and intended
  solely for the use of the individual or entity to which they are addressed.
• Any unauthorized copying, disclosure, or distribution of the material within
  this email is strictly forbidden.
• Any views or opinions presented within this e-mail are solely those of the
  author and do not necessarily represent those of Odyssey Financial
Technologies SA unless otherwise specifically stated.
• An electronic message is not binding on its sender. Any message referring to
  a binding engagement must be confirmed in writing and duly signed.
• If you have received this email in error, please notify the sender immediately
  and delete the original.


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: What happens with invalid query hints?</title>
<author><name>Craig L Russell &lt;Craig.Russell@Sun.COM&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200912.mbox/%3c628AF0CE-164C-4E1E-91EF-0DCBA37B6F00@SUN.com%3e"/>
<id>urn:uuid:%3c628AF0CE-164C-4E1E-91EF-0DCBA37B6F00@SUN-com%3e</id>
<updated>2009-12-03T01:15:33Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
The specification offers this explanation (3.8.9 in the draft  
specification dated 2009-10-06):

Vendors are permitted to support the use of additional, vendor- 
specific locking hints.  Vendor-specific
hints must not use the javax.persistence namespace. Vendor-specific  
hints must be ignored if
they are not understood.

So the model is that there are three categories of hints:

1. hints that are known to OpenJPA, which are hints defined by the  
standard plus the hints that are defined by OpenJPA to extend the  
standard hints. These hints are defined in the OpenJPA name space  
"openjpa.hint.*" or in the standard hint name space  
"javax.persistence.*"

2. hints that are defined by other vendors in their own name space.

3. hints that are in the OpenJPA name space but are not known to  
OpenJPA. These are usually typos by the user. For example,  
"openjpa.hint.OOptimizeResultCount".

Category 1 hints are honored if possible (e.g. the database in use  
supports the hint).

Category 2 hints are ignored by OpenJPA. This allows you to use the  
same set of hints in a program with different persistence vendors.

Category 3 hints result in an exception. Typos should be caught and  
reported.

Sometimes we developers assume that users read and understand the  
specification along with the OpenJPA user documentation. Bad assumption.

By the way, this model for hints follows the general model for  
properties in several JCP specifications.

Craig

On Dec 2, 2009, at 3:55 PM, Kevin Sutter wrote:

&gt; :-)  Yeah, that's kind of confusing, isn't it?  I'm assuming that it  
&gt; should
&gt; read as follows:
&gt;
&gt; "Hints which can not be processed by a particular database are  
&gt; ignored.
&gt; Otherwise, invalid hints will result in an ArgumentException being  
&gt; thrown."
&gt;
&gt; OpenJPA has defined certain hints (and JPA 2.0 has defined some some  
&gt; hints)
&gt; that could be used with Queries.  Some of these hints do not apply  
&gt; to all
&gt; databases.  So, if you try using one of the hints, for example
&gt; openjpa.hint.OptimizeResultCount and your designated database  
&gt; doesn't have
&gt; the capability to provide the necessary processing for this request,  
&gt; then it
&gt; would be ignored.
&gt;
&gt; Otherwise, if you pass in a hint that OpenJPA knows nothing about  
&gt; (let's
&gt; just say openjpa.hint.FailFast), then you would receive an
&gt; ArgumentException.  The curious thing here is that this seems to  
&gt; contradict
&gt; the hint processing as defined by JPA 2.0.  I believe invalid hints  
&gt; are
&gt; supposed to be ignored to allow for programming model compatibilities
&gt; between JPA providers.  So, maybe there's some clean up necessary in  
&gt; our
&gt; documentation.
&gt;
&gt; Does this help?  We should probably open a JIRA to address this
&gt; documentation hiccup.  If you don't have access to open a JIRA, then  
&gt; let me
&gt; know and I can open one.
&gt;
&gt; Thanks,
&gt; Kevin
&gt;
&gt; On Wed, Dec 2, 2009 at 2:36 PM, KARR, DAVID (ATTCINW)  
&gt; &lt;dk068x@att.com&gt;wrote:
&gt;
&gt;&gt; I'm just reading through the docs (1.2.1) right now, and I noticed  
&gt;&gt; the
&gt;&gt; following statement in section 10.1.7,  "Query Hints":
&gt;&gt;
&gt;&gt; "Invalid hints or hints which can not be processed by a particular
&gt;&gt; database are ignored. Otherwise, invalid hints will result in an
&gt;&gt; ArgumentException being thrown."
&gt;&gt;
&gt;&gt; I'm a little confused by this.  Under what circumstances will a  
&gt;&gt; hint be
&gt;&gt; ignored, and when will it get an ArgumentException?
&gt;&gt;

Craig L Russell
Architect, Sun Java Enterprise System http://db.apache.org/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!



</pre>
</div>
</content>
</entry>
<entry>
<title>RE: What happens with invalid query hints?</title>
<author><name>&quot;KARR, DAVID (ATTCINW)&quot; &lt;dk068x@att.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200912.mbox/%3cE0529A8FFC2C9143A5F1BB9A89101D06078390FE@BD01MSXMB018.US.Cingular.Net%3e"/>
<id>urn:uuid:%3cE0529A8FFC2C9143A5F1BB9A89101D06078390FE@BD01MSXMB018-US-Cingular-Net%3e</id>
<updated>2009-12-03T01:08:19Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
&gt; -----Original Message-----
&gt; From: Kevin Sutter [mailto:kwsutter@gmail.com]
&gt; Sent: Wednesday, December 02, 2009 3:56 PM
&gt; To: users@openjpa.apache.org
&gt; Subject: Re: What happens with invalid query hints?
&gt; [deleted]
&gt; 
&gt; Otherwise, if you pass in a hint that OpenJPA knows nothing about
&gt; (let's
&gt; just say openjpa.hint.FailFast), then you would receive an
&gt; ArgumentException.  The curious thing here is that this seems to
&gt; contradict
&gt; the hint processing as defined by JPA 2.0.  I believe invalid hints
are
&gt; supposed to be ignored to allow for programming model compatibilities
&gt; between JPA providers.  So, maybe there's some clean up necessary in
&gt; our
&gt; documentation.
&gt; 
&gt; Does this help?  We should probably open a JIRA to address this
&gt; documentation hiccup.  If you don't have access to open a JIRA, then
&gt; let me
&gt; know and I can open one.

I may or may not have an account as of yet, but as I'm going to be
spending a lot of time with this in the next few months (at least), I
think it's worthwhile for me to create it.  I'll have it reference your
statements here.

&gt; On Wed, Dec 2, 2009 at 2:36 PM, KARR, DAVID (ATTCINW)
&gt; &lt;dk068x@att.com&gt;wrote:
&gt; 
&gt; &gt; I'm just reading through the docs (1.2.1) right now, and I noticed
&gt; the
&gt; &gt; following statement in section 10.1.7,  "Query Hints":
&gt; &gt;
&gt; &gt; "Invalid hints or hints which can not be processed by a particular
&gt; &gt; database are ignored. Otherwise, invalid hints will result in an
&gt; &gt; ArgumentException being thrown."
&gt; &gt;
&gt; &gt; I'm a little confused by this.  Under what circumstances will a hint
&gt; be
&gt; &gt; ignored, and when will it get an ArgumentException?
&gt; &gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: How to use &quot;openjpa.Optimistic&quot;</title>
<author><name>Kevin Sutter &lt;kwsutter@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200912.mbox/%3c89c0c52c0912021616j212032ay8969b3fc34f4de37@mail.gmail.com%3e"/>
<id>urn:uuid:%3c89c0c52c0912021616j212032ay8969b3fc34f4de37@mail-gmail-com%3e</id>
<updated>2009-12-03T00:16:59Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi shihoir,
Yeah, the openjpa.Optimistic property is not well documented.  The only
reference is to the property and the valid values of true and false [1].
With the updates being done to formalize the Pessimistic lock manager in JPA
2.0, we should probably clean up the documentation here as well.

Another source of information for OpenJPA's locking capabilities is the
WebSphere InfoCenter [2].  This is specific to the OpenJPA 1.2.x branch, but
it does give more background on the various locking mechanisms available.

I'm going to copy Albert on this reply since he was instrumental in the JPA
2.0 implementation for the pessimistic lock manager.  He might have more
insights on the documentation for these locking mechanisms.

Thanks,
Kevin


[1]
http://openjpa.apache.org/builds/latest/docs/manual/manual.html#openjpa.Optimistic
[2]
http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/topic/com.ibm.websphere.nd.doc/info/ae/ae/tejb_jpadeadlock.html

On Mon, Nov 30, 2009 at 8:06 AM, shihoir &lt;shihoir@gmail.com&gt; wrote:

&gt; Hi, all.
&gt; What is an option "openjpa.Optimistic" for?
&gt; In Lock Object Locking Guide, there is no guide for that option.
&gt;
&gt; http://openjpa.apache.org/builds/2.0.0-M3/apache-openjpa-2.0.0-M3/docs/manual/ref_guide_locking.html
&gt; I want to know feature of "openjpa.Optimistic" with "openjpa.LockManager"
&gt; option.
&gt;
&gt; thanks.
&gt; //julia chang
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Open JPA generates incorrect Union All for Date and Boolean	Datatype</title>
<author><name>Kevin Sutter &lt;kwsutter@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200912.mbox/%3c89c0c52c0912021608j45c1e99bra50dd4e0e0ae85de@mail.gmail.com%3e"/>
<id>urn:uuid:%3c89c0c52c0912021608j45c1e99bra50dd4e0e0ae85de@mail-gmail-com%3e</id>
<updated>2009-12-03T00:08:31Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
This sounds very strange.  From your description, I have no idea why Date
and Boolean attributes are having problems with Oracle.  And, why a Union
All is being generated for a simple find operation baffles me as well.
Unless there is some inheritance or eagerly fetched relationships involved.
Still, I thought OpenJPA used Joins over Unions.

Can you simplify the problem to a simple testcase that could be provided?

Thanks,
Kevin

On Tue, Dec 1, 2009 at 7:15 AM, himadri &lt;hima_das@yahoo.co.in&gt; wrote:

&gt;
&gt; Hi,
&gt;
&gt; I have an EJB3.0 application deployed on Weblogic 10.3 and Oracle 10g DB. I
&gt; have an entity Typed which has Date and Boolean datatypes. em.persist is
&gt; sucessful.
&gt;
&gt; But whereever there is em.find() on any entity in this application , I have
&gt; observed that open JPA  tries to get Union  of all entities. This may be
&gt; because its first time , But it fails with exception
&gt;
&gt; "[BEA][Oracle JDBC Driver][Oracle]ORA-01790:expression must have same
&gt; datatype as corresponding expression"
&gt;
&gt; The SQL generated is union all of all entities in the application . For
&gt; boolean FLAG_F , MOMENT_F wrong sql is generated. It should have to_date
&gt; function for date. I have used DATE and boolean in Entity class.
&gt;
&gt; SELECT 0, t0.ID, t0.version, t0.NAME_F, '', 0, NULL, '', 0, 0,
&gt; '1970-01-01',
&gt; '', 0.0 FROM AddOn_T t0 WHERE t0.ID = ?
&gt; UNION ALL
&gt; SELECT 1, t0.ID, t0.version, '', '', t0.COUNTER_F, t0.DATA_F, t0.ENUMED1_F,
&gt; t0.ENUMED2_F, t0.FLAG_F, t0.MOMENT_F, t0.NAME_F, t0.VALUE_F FROM TYPED_T t0
&gt; WHERE t0.ID = ? [params=(String) 30, (String) 30]} [code=1790, state=HY000]
&gt;
&gt; I guess openJPA fails to add to_date function for DATE and surrounding
&gt; chars
&gt; for boolean. Is this a bug or some settings available.  Why is it trying to
&gt; get union all even for em.find(... ) ?
&gt;
&gt; Thanks in advance..
&gt; - H
&gt;
&gt;
&gt;
&gt;
&gt;
&gt;
&gt; --
&gt; View this message in context:
&gt; http://n2.nabble.com/Open-JPA-generates-incorrect-Union-All-for-Date-and-Boolean-Datatype-tp4093559p4093559.html
&gt; Sent from the OpenJPA Users mailing list archive at Nabble.com.
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: What happens with invalid query hints?</title>
<author><name>Kevin Sutter &lt;kwsutter@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200912.mbox/%3c89c0c52c0912021555g225af468s88d1ad34ac8ddbd2@mail.gmail.com%3e"/>
<id>urn:uuid:%3c89c0c52c0912021555g225af468s88d1ad34ac8ddbd2@mail-gmail-com%3e</id>
<updated>2009-12-02T23:55:32Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
:-)  Yeah, that's kind of confusing, isn't it?  I'm assuming that it should
read as follows:

"Hints which can not be processed by a particular database are ignored.
Otherwise, invalid hints will result in an ArgumentException being thrown."

OpenJPA has defined certain hints (and JPA 2.0 has defined some some hints)
that could be used with Queries.  Some of these hints do not apply to all
databases.  So, if you try using one of the hints, for example
openjpa.hint.OptimizeResultCount and your designated database doesn't have
the capability to provide the necessary processing for this request, then it
would be ignored.

Otherwise, if you pass in a hint that OpenJPA knows nothing about (let's
just say openjpa.hint.FailFast), then you would receive an
ArgumentException.  The curious thing here is that this seems to contradict
the hint processing as defined by JPA 2.0.  I believe invalid hints are
supposed to be ignored to allow for programming model compatibilities
between JPA providers.  So, maybe there's some clean up necessary in our
documentation.

Does this help?  We should probably open a JIRA to address this
documentation hiccup.  If you don't have access to open a JIRA, then let me
know and I can open one.

Thanks,
Kevin

On Wed, Dec 2, 2009 at 2:36 PM, KARR, DAVID (ATTCINW) &lt;dk068x@att.com&gt;wrote:

&gt; I'm just reading through the docs (1.2.1) right now, and I noticed the
&gt; following statement in section 10.1.7,  "Query Hints":
&gt;
&gt; "Invalid hints or hints which can not be processed by a particular
&gt; database are ignored. Otherwise, invalid hints will result in an
&gt; ArgumentException being thrown."
&gt;
&gt; I'm a little confused by this.  Under what circumstances will a hint be
&gt; ignored, and when will it get an ArgumentException?
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>What happens with invalid query hints?</title>
<author><name>&quot;KARR, DAVID (ATTCINW)&quot; &lt;dk068x@att.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200912.mbox/%3cE0529A8FFC2C9143A5F1BB9A89101D0607838D45@BD01MSXMB018.US.Cingular.Net%3e"/>
<id>urn:uuid:%3cE0529A8FFC2C9143A5F1BB9A89101D0607838D45@BD01MSXMB018-US-Cingular-Net%3e</id>
<updated>2009-12-02T20:36:39Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I'm just reading through the docs (1.2.1) right now, and I noticed the
following statement in section 10.1.7,  "Query Hints":

"Invalid hints or hints which can not be processed by a particular
database are ignored. Otherwise, invalid hints will result in an
ArgumentException being thrown."

I'm a little confused by this.  Under what circumstances will a hint be
ignored, and when will it get an ArgumentException?


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Source/javadoc for geronimo-jpa_3.0_spec-1.0.jar ?</title>
<author><name>Donald Woods &lt;dwoods@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200912.mbox/%3c4B16B98E.9080601@apache.org%3e"/>
<id>urn:uuid:%3c4B16B98E-9080601@apache-org%3e</id>
<updated>2009-12-02T19:01:34Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Both a source and javadoc jar are in the maven repos at -
http://repo1.maven.org/maven2/org/apache/geronimo/specs/geronimo-jpa_3.0_spec/1.0/

And the source can be checked out from the Apache svn repo at -
https://svn.apache.org/repos/asf/geronimo/specs/tags/geronimo-jpa_3.0_spec-1.0/


-Donald


Andrew Thompson wrote:
&gt; http://repo1.maven.org/maven2/org/apache/geronimo/specs/geronimo-jpa_3.0_spec/ is generally
a good location for jars with sources for opensource projects.   
&gt; 
&gt; 
&gt; 
&gt; On Sun, 2009-11-29 at 13:27 -0500, Jaguar Finch wrote:
&gt;&gt; Hello all,
&gt;&gt;
&gt;&gt; I'm new to OpenJPA. Where can I find source or javadocs for the
&gt;&gt; geronimo-jpa
&gt;&gt; jar included with OpenJPA 1.2.1 ?
&gt;&gt;
&gt;&gt; Thank you!
&gt;&gt;
&gt;&gt;
&gt; 
&gt; 


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Struts 2x + OpenJPA 2.0 M3 + ( Tomcat or Glassfish )</title>
<author><name>&quot;seth.jackson&quot; &lt;seth.jackson.ctr@dfas.mil&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200912.mbox/%3c1259778694276-4101439.post@n2.nabble.com%3e"/>
<id>urn:uuid:%3c1259778694276-4101439-post@n2-nabble-com%3e</id>
<updated>2009-12-02T18:31:34Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

Jeremy,

Good to know I'm not going bat crap crazy. I've spent a decent amount of
time trying to figure out the class loading problem. I'm currently using
Tomcat 6x.

Seth



Jeremy Bauer wrote:
&gt; 
&gt; Seth,
&gt; 
&gt; Thanks for reporting this problem.  I've opened JIRA OPENJPA-1410[1].  The
&gt; code in PersistenceProviderImpl that sets up validation looks like it
&gt; might
&gt; be suspect to classloading issues.  Which version of Tomcat are you using?
&gt; 
&gt; -Jeremy
&gt; 
&gt; [1] https://issues.apache.org/jira/browse/OPENJPA-1410
&gt; 
&gt; On Tue, Dec 1, 2009 at 5:56 AM, seth.jackson
&gt; &lt;seth.jackson.ctr@dfas.mil&gt;wrote:
&gt; 
&gt;&gt;
&gt;&gt; After further review, using Glassfish 2.1.1 I received this error message
&gt;&gt; in
&gt;&gt; the server log:
&gt;&gt;
&gt;&gt; Caused by: java.lang.LinkageError: loader constraint violation: when
&gt;&gt; resolving method
&gt;&gt;
&gt;&gt; "org.apache.openjpa.persistence.validation.ValidationUtils.setupValidation(Lorg/apache/openjpa/conf/OpenJPAConfiguration;)Z"
&gt;&gt; the class loader (instance of
&gt;&gt; org/apache/catalina/loader/WebappClassLoader)
&gt;&gt; of the current class,
&gt;&gt; org/apache/openjpa/persistence/PersistenceProviderImpl, and the class
&gt;&gt; loader
&gt;&gt; (instance of sun/misc/Launcher$AppClassLoader) for resolved class,
&gt;&gt; org/apache/openjpa/persistence/validation/ValidationUtils, have different
&gt;&gt; Class objects for the type org/apache/openjpa/conf/OpenJPAConfiguration
&gt;&gt; used
&gt;&gt; in the signature
&gt;&gt;
&gt;&gt; So it appears to be the WebappClassLoader and the AppClassLoader are both
&gt;&gt; loading the OpenJPAConfiguration from the same JAR file, causing the
&gt;&gt; error
&gt;&gt; when the class is trying to be resolved in this particular method..
&gt;&gt;
&gt;&gt;
&gt;&gt;
&gt;&gt; seth.jackson wrote:
&gt;&gt; &gt;
&gt;&gt; &gt; It appears something was modified in OpenJPA 2.0 M3 from M2 that causes
&gt;&gt; a
&gt;&gt; &gt; LinkageError.
&gt;&gt; &gt;
&gt;&gt; &gt; In my current environment, I've tested both Glassfish and Tomcat using
&gt;&gt; M2
&gt;&gt; &gt; and M3. M2 runs without problems, but M3 throws a linkage error as
&gt;&gt; &gt; follows:
&gt;&gt; &gt;
&gt;&gt; &gt; Caused by: java.lang.LinkageError: loader constraint violation: loader
&gt;&gt; &gt; (instance of sun/misc/Launcher$AppClassLoader) previously initiated
&gt;&gt; &gt; loading for a different type with name
&gt;&gt; &gt; "org/apache/openjpa/conf/OpenJPAConfiguration"
&gt;&gt; &gt;       at java.lang.ClassLoader.defineClass1(Native Method)
&gt;&gt; &gt;       at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
&gt;&gt; &gt;       at
&gt;&gt; &gt; java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
&gt;&gt; &gt;       at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
&gt;&gt; &gt;       at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
&gt;&gt; &gt;       at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
&gt;&gt; &gt;       at java.security.AccessController.doPrivileged(Native Method)
&gt;&gt; &gt;       at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
&gt;&gt; &gt;       at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
&gt;&gt; &gt;       at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
&gt;&gt; &gt;       at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
&gt;&gt; &gt;       at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
&gt;&gt; &gt;       at
&gt;&gt; &gt;
&gt;&gt; org.apache.openjpa.persistence.validation.ValidationUtils.setupValidation(ValidationUtils.java:53)
&gt;&gt; &gt;       at
&gt;&gt; &gt;
&gt;&gt; org.apache.openjpa.persistence.PersistenceProviderImpl.loadValidator(PersistenceProviderImpl.java:290)
&gt;&gt; &gt;       at
&gt;&gt; &gt;
&gt;&gt; org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:97)
&gt;&gt; &gt;       at
&gt;&gt; &gt;
&gt;&gt; org.apache.openjpa.persistence.OpenJPAPersistence.createEntityManagerFactory(OpenJPAPersistence.java:128)
&gt;&gt; &gt;       at
&gt;&gt; &gt;
&gt;&gt; org.apache.openjpa.persistence.OpenJPAPersistence.createEntityManagerFactory(OpenJPAPersistence.java:111)
&gt;&gt; &gt;       at test_test.user.UserAction.execute(UserAction.java:39)
&gt;&gt; &gt;
&gt;&gt; &gt;
&gt;&gt; &gt; I've already confirmed that the OpenJPA classes in question do NOT
&gt;&gt; exist
&gt;&gt; &gt; in any other JARs in the path.
&gt;&gt; &gt;
&gt;&gt; &gt; ValidationUtils.setupValidation(ValidationUtils.java:53) calls the
&gt;&gt; &gt; OpenJPAConfiguration.getConfigurationLog(). The object being referenced
&gt;&gt; is
&gt;&gt; &gt; JDBCConfigurationImpl, which in other classes retrieves the log
&gt;&gt; reference
&gt;&gt; &gt; perfectly fine, before it gets to the offending line.
&gt;&gt; &gt;
&gt;&gt;
&gt;&gt; --
&gt;&gt; View this message in context:
&gt;&gt; http://n2.nabble.com/Struts-2x-OpenJPA-2-0-M3-Tomcat-or-Glassfish-tp4087312p4093228.html
&gt;&gt; Sent from the OpenJPA Users mailing list archive at Nabble.com.
&gt;&gt;
&gt; 
&gt; 

-- 
View this message in context: http://n2.nabble.com/Struts-2x-OpenJPA-2-0-M3-Tomcat-or-Glassfish-tp4087312p4101439.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Struts 2x + OpenJPA 2.0 M3 + ( Tomcat or Glassfish )</title>
<author><name>Jeremy Bauer &lt;techhusky@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200912.mbox/%3cc4a1048f0912021026q23ce5e38xd304fbbb95f484b1@mail.gmail.com%3e"/>
<id>urn:uuid:%3cc4a1048f0912021026q23ce5e38xd304fbbb95f484b1@mail-gmail-com%3e</id>
<updated>2009-12-02T18:26:03Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Seth,

Thanks for reporting this problem.  I've opened JIRA OPENJPA-1410[1].  The
code in PersistenceProviderImpl that sets up validation looks like it might
be suspect to classloading issues.  Which version of Tomcat are you using?

-Jeremy

[1] https://issues.apache.org/jira/browse/OPENJPA-1410

On Tue, Dec 1, 2009 at 5:56 AM, seth.jackson &lt;seth.jackson.ctr@dfas.mil&gt;wrote:

&gt;
&gt; After further review, using Glassfish 2.1.1 I received this error message
&gt; in
&gt; the server log:
&gt;
&gt; Caused by: java.lang.LinkageError: loader constraint violation: when
&gt; resolving method
&gt;
&gt; "org.apache.openjpa.persistence.validation.ValidationUtils.setupValidation(Lorg/apache/openjpa/conf/OpenJPAConfiguration;)Z"
&gt; the class loader (instance of org/apache/catalina/loader/WebappClassLoader)
&gt; of the current class,
&gt; org/apache/openjpa/persistence/PersistenceProviderImpl, and the class
&gt; loader
&gt; (instance of sun/misc/Launcher$AppClassLoader) for resolved class,
&gt; org/apache/openjpa/persistence/validation/ValidationUtils, have different
&gt; Class objects for the type org/apache/openjpa/conf/OpenJPAConfiguration
&gt; used
&gt; in the signature
&gt;
&gt; So it appears to be the WebappClassLoader and the AppClassLoader are both
&gt; loading the OpenJPAConfiguration from the same JAR file, causing the error
&gt; when the class is trying to be resolved in this particular method..
&gt;
&gt;
&gt;
&gt; seth.jackson wrote:
&gt; &gt;
&gt; &gt; It appears something was modified in OpenJPA 2.0 M3 from M2 that causes a
&gt; &gt; LinkageError.
&gt; &gt;
&gt; &gt; In my current environment, I've tested both Glassfish and Tomcat using M2
&gt; &gt; and M3. M2 runs without problems, but M3 throws a linkage error as
&gt; &gt; follows:
&gt; &gt;
&gt; &gt; Caused by: java.lang.LinkageError: loader constraint violation: loader
&gt; &gt; (instance of sun/misc/Launcher$AppClassLoader) previously initiated
&gt; &gt; loading for a different type with name
&gt; &gt; "org/apache/openjpa/conf/OpenJPAConfiguration"
&gt; &gt;       at java.lang.ClassLoader.defineClass1(Native Method)
&gt; &gt;       at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
&gt; &gt;       at
&gt; &gt; java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
&gt; &gt;       at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
&gt; &gt;       at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
&gt; &gt;       at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
&gt; &gt;       at java.security.AccessController.doPrivileged(Native Method)
&gt; &gt;       at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
&gt; &gt;       at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
&gt; &gt;       at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
&gt; &gt;       at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
&gt; &gt;       at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
&gt; &gt;       at
&gt; &gt;
&gt; org.apache.openjpa.persistence.validation.ValidationUtils.setupValidation(ValidationUtils.java:53)
&gt; &gt;       at
&gt; &gt;
&gt; org.apache.openjpa.persistence.PersistenceProviderImpl.loadValidator(PersistenceProviderImpl.java:290)
&gt; &gt;       at
&gt; &gt;
&gt; org.apache.openjpa.persistence.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:97)
&gt; &gt;       at
&gt; &gt;
&gt; org.apache.openjpa.persistence.OpenJPAPersistence.createEntityManagerFactory(OpenJPAPersistence.java:128)
&gt; &gt;       at
&gt; &gt;
&gt; org.apache.openjpa.persistence.OpenJPAPersistence.createEntityManagerFactory(OpenJPAPersistence.java:111)
&gt; &gt;       at test_test.user.UserAction.execute(UserAction.java:39)
&gt; &gt;
&gt; &gt;
&gt; &gt; I've already confirmed that the OpenJPA classes in question do NOT exist
&gt; &gt; in any other JARs in the path.
&gt; &gt;
&gt; &gt; ValidationUtils.setupValidation(ValidationUtils.java:53) calls the
&gt; &gt; OpenJPAConfiguration.getConfigurationLog(). The object being referenced
&gt; is
&gt; &gt; JDBCConfigurationImpl, which in other classes retrieves the log reference
&gt; &gt; perfectly fine, before it gets to the offending line.
&gt; &gt;
&gt;
&gt; --
&gt; View this message in context:
&gt; http://n2.nabble.com/Struts-2x-OpenJPA-2-0-M3-Tomcat-or-Glassfish-tp4087312p4093228.html
&gt; Sent from the OpenJPA Users mailing list archive at Nabble.com.
&gt;


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: openjpa-maven-plugin snapshot</title>
<author><name>Adam Hardy &lt;adam.sql@cyberspaceroad.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200912.mbox/%3c4B16AC1D.9020409@cyberspaceroad.com%3e"/>
<id>urn:uuid:%3c4B16AC1D-9020409@cyberspaceroad-com%3e</id>
<updated>2009-12-02T18:04:13Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Oh I thought the dev guys for the plugin preferred this user list.

No problem. It looks like I'll have to download the source and have a go at it 
myself anyway.


Regards
Adam

Michael Dick on 02/12/09 16:14, wrote:
&gt; Hi all,
&gt; 
&gt; The maven plugin is something different. The code is in codehaus SVN and the
&gt; resulting binaries are probably published to a codehaus m2-snapshot
&gt; repository.
&gt; 
&gt; I don't know how often those get published, so I've cross-posted to their
&gt; users email list.
&gt; 
&gt; Sorry for the confusion,
&gt; 
&gt; -mike
&gt; 
&gt; On Tue, Dec 1, 2009 at 5:13 PM, Adam Hardy &lt;adam.sql@cyberspaceroad.com&gt;wrote:
&gt; 
&gt;&gt; ljnelson on 01/12/09 20:47, wrote:
&gt;&gt;
&gt;&gt;&gt; On Tue, Dec 1, 2009 at 1:48 PM, Michael Dick [via OpenJPA] &lt;
&gt;&gt;&gt; ml-node+4095467-513228112@n2.nabble.com&lt;ml-node%2B4095467-513228112@n2.nabble.com&gt;
&gt;&gt;&gt; &lt;ml-node%2B4095467-513228112@n2.nabble.com&lt;ml-node%252B4095467-513228112@n2.nabble.com&gt;
&gt;&gt;&gt;&gt; wrote:
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;  I publish the snapshots to the m2-snapshot repository on
&gt;&gt;&gt;&gt; people.apache.orgfairly regularly. You can find 1.1.1-SNAPSHOT at
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt; http://people.apache.org/repo/m2-snapshot-repository/org/apache/openjpa/openjpa/1.1.1-SNAPSHOT/
&gt;&gt;&gt;&gt;
&gt;&gt;&gt;&gt;
&gt;&gt;&gt; (Not part of this conversation, but is that for the OpenJPA Maven plugin,
&gt;&gt;&gt; or
&gt;&gt;&gt; just OpenJPA?)
&gt;&gt;&gt;
&gt;&gt; Looks like OpenJPA itself. I should have mentioned the openjpa-maven-plugin
&gt;&gt; in the text as well as the title.
&gt;&gt;
&gt;&gt; Interesting to know about the repository for Apache snapshots though.
&gt;&gt;
&gt;&gt; Regards
&gt;&gt; Adam
&gt;&gt;
&gt; 



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: openjpa-maven-plugin snapshot</title>
<author><name>Michael Dick &lt;michael.d.dick@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/openjpa-users/200912.mbox/%3c72c1350f0912020814m4b9abb69i6e656c673787beb7@mail.gmail.com%3e"/>
<id>urn:uuid:%3c72c1350f0912020814m4b9abb69i6e656c673787beb7@mail-gmail-com%3e</id>
<updated>2009-12-02T16:14:09Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi all,

The maven plugin is something different. The code is in codehaus SVN and the
resulting binaries are probably published to a codehaus m2-snapshot
repository.

I don't know how often those get published, so I've cross-posted to their
users email list.

Sorry for the confusion,

-mike

On Tue, Dec 1, 2009 at 5:13 PM, Adam Hardy &lt;adam.sql@cyberspaceroad.com&gt;wrote:

&gt; ljnelson on 01/12/09 20:47, wrote:
&gt;
&gt;&gt; On Tue, Dec 1, 2009 at 1:48 PM, Michael Dick [via OpenJPA] &lt;
&gt;&gt; ml-node+4095467-513228112@n2.nabble.com&lt;ml-node%2B4095467-513228112@n2.nabble.com&gt;
&gt;&gt; &lt;ml-node%2B4095467-513228112@n2.nabble.com&lt;ml-node%252B4095467-513228112@n2.nabble.com&gt;
&gt;&gt; &gt;
&gt;&gt;
&gt;&gt;&gt; wrote:
&gt;&gt;&gt;
&gt;&gt;
&gt;&gt;  I publish the snapshots to the m2-snapshot repository on
&gt;&gt;&gt; people.apache.orgfairly regularly. You can find 1.1.1-SNAPSHOT at
&gt;&gt;&gt;
&gt;&gt;&gt;
&gt;&gt;&gt; http://people.apache.org/repo/m2-snapshot-repository/org/apache/openjpa/openjpa/1.1.1-SNAPSHOT/
&gt;&gt;&gt;
&gt;&gt;&gt;
&gt;&gt; (Not part of this conversation, but is that for the OpenJPA Maven plugin,
&gt;&gt; or
&gt;&gt; just OpenJPA?)
&gt;&gt;
&gt;
&gt; Looks like OpenJPA itself. I should have mentioned the openjpa-maven-plugin
&gt; in the text as well as the title.
&gt;
&gt; Interesting to know about the repository for Apache snapshots though.
&gt;
&gt; Regards
&gt; Adam
&gt;


</pre>
</div>
</content>
</entry>
</feed>
