RE: Slow JPA

2008-03-28 Thread Brill Pappin
As a rule you can expect *any* orm framework to be slower than simple JDBC, there is simply more to do... What you gain from it is ease of maintenance and implementation which will save you time later (often a lot of time). As with anything, you need to weigh the benefits of any solution over anoth

Re: PCEnhancer and MappedSuperclass problem???

2008-03-28 Thread iain
Hi Amit, I think (not sure) we might have 2 different problems. The Jira you opened indicates a NPE, whereas my problem is an out-of-memory exception... Cheers, Iain Patel Amit wrote: Hi Craig, I posted the original issue Iain mentioned in his first post and have opened a JIRA (https://issu

RE: Foreign Key constraints on Sybase?

2008-03-28 Thread Michael Vorburger
Continuing on with my monologue on this thread... The attached patch (does it make it through the list?) removes the getAddForeignKeySQL() with the return new String[0]; from the SybaseDictionary. I did a brief test, and with this, and (no cascasde) I get the ALTER TABLE on Sybase, and as expl

RE: One-Sided One-Many Mapping, but to different tables - missing @ElementEmbeddedMapping ?

2008-03-28 Thread Michael Vorburger
Patrick - I pulled an OpenJPA 1.1.0-SNAPSHOT from SVN and built it locally to give it a whirl - and indeed this appears to work like a charm! Great. Can anybody provide insight on about what timeframe your hoping to push v1.1 to a release? Roughly. PS: I'm using the following annotations: @Per

Re: How to set a tangosol cache per entity?

2008-03-28 Thread Pinaki Poddar
> What interface should I implement? The interface for L2 cache is org.apache.openjpa.datacache.DataCache. > How can I tell openjpa to use my implementation? In META-INF/persistence.xml > Which class has an implementation of that interface so I can use that as > an example? The basic abstract i

Slow JPA

2008-03-28 Thread Patrick T
Hello Everyone, I'm just wondering if anyone else is finding JPA slower than simple jdbc implementations. I have tried setting up some of the attributes to Lazy fetch and I still find it to be extremely slow. This is causing my web pages to load in the upwards of 10 seconds. I have tried running

RE: PCEnhancer and MappedSuperclass problem???

2008-03-28 Thread Patel Amit
Hi Kevin, My original thoughts were they were related because Iain referenced my original post in his first post. Looking at it more closely, the NPE I experience is related to using abstract persistable classes and extending them: @Entity @Table(name = "Persons") @Inheritance(strategy= Inherita

Re: JPQL swing console

2008-03-28 Thread Pinaki Poddar
A tool to construct/execute/debug JPQL will be useful indeed. We are interested to know the progress of this project. Check if this project has something towards this objective: http://www.eclipse.org/webtools/dali/main.php -- View this message in context: http://www.nabble.com/JPQL-swin

Re: PCEnhancer and MappedSuperclass problem???

2008-03-28 Thread Frederic_Bellier
I thought this was related to 258. "Kevin Sutter" <[EMAIL PROTECTED] om>

Re: (no subject)

2008-03-28 Thread Pinaki Poddar
> if there is an easy way to make a copy of the object such that it can be serialized without impacting the > current transaction. There is no easy answer to tis question :) Depends on what is being 'copied' in the serialized object. OpenJPA does provide a facility known as RemoteCommitProvider

Re: Where in the code does open jpa call get and put for the L2 cache

2008-03-28 Thread Frederic_Bellier
I just replied to the other email before I read this one. So I looked into that namespace yesterday. I thought it was kind of what I was looking for. But the method take an objectID - so how would I get the name of the cache from the object id? For example the method protected abstract DataCa

Re: JPQL Query on Collection

2008-03-28 Thread Pinaki Poddar
> what would be the correct where clause if I want to check if the user > "james" is in the users field of this MyObject class: String jpql = "SELECT p FROM MyObject p WHERE ?1 MEMBER OF users"; em.createQuery(jpql).setParameter(1, "james").getResultList(); -- View this message in context: htt

Re: How to set a tangosol cache per entity?

2008-03-28 Thread Frederic_Bellier
Hi Pinaki - This sounds quite interesting. Assuming I want to write my own plugin for the cache. How would I go about this? For example: What interface should I implement? How can I tell openjpa to use my implementation? Which class has an implementation of that interface so I can use that as an e

Re: How to set a tangosol cache per entity?

2008-03-28 Thread Pinaki Poddar
Firstly, out-of-the-box OpenJPA does not provide an integration with Tangosol cache. OPenJPA, however, does provide a flexible/pluggable mechanism for L2 cache of your choice. Out-of-the-box OpenJPA provides a concrete implementation which can target a particular entity to a named partition of L2

Re: Where in the code does open jpa call get and put for the L2 cache

2008-03-28 Thread Pinaki Poddar
Satrt looking from interface org.apache.openjpa.datacache.DataCache And its abstract implementation is a good place to extend abstract class org.apache.openjpa.datacache.AbstractDataCache Once you implement your own L2 caches (possibly as an extension of AbstractDataCache) -- OpenJPA will w

Re: PCEnhancer and MappedSuperclass problem???

2008-03-28 Thread Kevin Sutter
Patel, Thanks for the JIRA Issue, but OPENJPA-524 describes a NullPointerException problem and this thread seems to be concerned with OutOfMemory errors. Are you thinking that somehow these two are related? Thanks, Kevin On Fri, Mar 28, 2008 at 9:41 AM, Patel Amit <[EMAIL PROTECTED]> wrote: > H

Re: isolation level hints not working with DB2 v9.5

2008-03-28 Thread catalina wei
Hi Rajeev, The product version in trace looked good. Now, have you followed the example in (openjpa-persistence-jdbc/src/test/java folder), the java source ? org.apache.openjpa.persistence.jdbc.TestIsolationLevelOverride Could you give it a try ? We were able to get correct SQL generation using DB

Re: Specifying the location of the persistence.xml file at runtime

2008-03-28 Thread Brian H1
Hi, I'm wondering if I could get some clarification on this method from someone who's used this? I always seem to get a null back. If I make call this method URL xxx = getClass().getResource("/META-INF/persistence.xml");, I get a valid url that has a fully qualified path to the persistence.xml

RE: PCEnhancer and MappedSuperclass problem???

2008-03-28 Thread Patel Amit
Hi Craig, I posted the original issue Iain mentioned in his first post and have opened a JIRA (https://issues.apache.org/jira/browse/OPENJPA-524) with a test case attached to it that reproduces the problem. Hope this helps. Amit -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL

Re: Doing without Persistence.xml

2008-03-28 Thread Brian H1
Hi Mike, Thanks for this. Adding the metadatafactory property has fixed running my testcase as a JUnit test case. I no longer need to add a runtime path setting to the project directory that holds the META-INF directory (to find the persistence.xml). I now have a new problem when running the

Re: Mapping of table in persistence.xml

2008-03-28 Thread Kevin Sutter
Lars, Table and field mapping via xml is not done in the persitence.xml. It is only done as part of an orm.xml file. Any defined orm.xml files that you wish to use need to be specified in your persistence.xml using the element. But, the actual mapping is done in your orm.xmlfile. So, if you ha

Re: PCEnhancer and MappedSuperclass problem???

2008-03-28 Thread Kevin Sutter
Iain, Can you expand on this? On Wed, Mar 26, 2008 at 10:04 PM, iain <[EMAIL PROTECTED]> wrote: > FWIW, if I remove the inheritance of the MappedSuperclass, the enhancer > has no trouble with my application and things operate as they should. What exactly are you referring to when you say that y

Re: equals and hashCode methods

2008-03-28 Thread Adam Hardy
I already use the commons-lang equalsBuilder and hashCodeBuilder, they are good. But they don't reduce the maintenance problem. From a safety point of view, there is no way to check programmatically (i.e. in Maven reporting) that a developer has correctly coded equals() and hashCode() and the

Re: Mapping of table in persistence.xml

2008-03-28 Thread Lars Vogel
Any advice? 2008/3/27, Lars Vogel <[EMAIL PROTECTED]>: > > Hi, > > Can you please sent me an example in which the mapping to a certain table > is done in persistence.xml? > > I use orm.xml to map the class to a certain table: > > > > > > > >

JPQL Query on Collection

2008-03-28 Thread Nicolas Modrzyk
Hello, what would be the correct where clause if I want to check if the user "james" is in the users field of this MyObject class: @Entity public MyObject { @PersistentCollection private Collection users; } Select t from MyOjbect t JOIN t.users x where 'james' ... I got it working with a Coll