ime. Alternatively, at runtime you can
> add units in a separate transaction. You suspend the current tx, start a
> new one, create and persist the new unit, commit the tx, and resume the
> original tx. The only drawback to that, is you don't get automatic rollback
> of the new
ay kilogram, in your
> object graph. If instead all references refereed to the same object
> instance, you the key would only be generated once. To test my theory,
> replace the Unit constructor with a static factory, and cache the instances
> you return.
>
> -dain
>
>
> On
much I've come to rely on it, and in many ways it makes my own work
possible. So, big thanks to all involved.
Cheers,
--
Alex
On Sun, Apr 20, 2008 at 10:59 AM, Alexander Saint Croix <
[EMAIL PROTECTED]> wrote:
> Great work! This is a really big deal. I'm going to cut o
Howdy, all.
I'm wondering what the best practice is for the following use case:
I have a handful of entity classes, one of which is a Unit (such as
"kilogram") which has an auto-generated UID field. Each individual instance
of Unit ("kilogram", "second", "ampere", etc) can and will be used by
mu
Great work! This is a really big deal. I'm going to cut over to the new
version right away and blog about it.
Congratulations to the whole team!
--
Alex
On Sun, Apr 13, 2008 at 2:40 AM, Per Newgro <[EMAIL PROTECTED]> wrote:
> Congrats David and the team,
>
> you all do an amazing job here.
, 2008 at 11:12 AM, Jacek Laskowski <[EMAIL PROTECTED]>
wrote:
> On Mon, Apr 7, 2008 at 4:40 PM, Alexander Saint Croix
> <[EMAIL PROTECTED]> wrote:
>
> > Anyway, the application is in. Hopefully you find it and pick me up.
>
> I'd be glad to do so, but I
That's me, man. I sent in the application, and would love to help out
more. The last two months have seen me buried in homework and learning my
new job, plus re-building a unit and metric conversion and representation
system that can jive with JPA (JScience didn't fit the bill so it had to
go).
In case it needs stating again, thanks to David Blevins for showing me how
to do this--I'm working on my app again, and making forward progress after
one tough month of test hangups.
--
Alex
Jack,
Funny you should ask--I was working on the same thing last week.
http://weblogs.java.net/blog/saintx/archive/2008/02/lambda_function.htmlshows
a good start on how to do this.
The transactions are controlled by a stateless session bean in the base
class, and the method blocks of the test cas
That worked--thank you, Paul.
--
Alex
On Feb 8, 2008 12:31 PM, Paul Spencer <[EMAIL PROTECTED]> wrote:
> Try 3.0-beta-2
>
> Paul Spencer
>
> Alexander Saint Croix wrote:
> > Hey guys. In my Maven build, I'm using:
> >
> >
> &g
Howdy, all,
What's the recommended method to persist 3rd party classes that are not
annotated as entities.? I'm looking for what my options are.
Correct me if I'm wrong, but the options are to extend the non-entity so as
to make the subclass an entity, to write the object as a BLOB column, and to
David, I posted an entry on that sweet example you showed me last week.
http://weblogs.java.net/blog/saintx/archive/2008/02/lambda_function.html#more
Hats off for this rocking test pattern. Ground off about 30% of my test
time, many lines of code, and eliminated my struggles with transaction
con
Hey guys. In my Maven build, I'm using:
org.apache.openejb
openejb-core
3.0.0-SNAPSHOT
test
I tried using 3.0.0-beta-2 and 3.0.0-beta-02, but both spit out errors:
[ERROR] BUILD ERROR
[INFO]
--
Hey, guys--I finally got the fault loading example to work. I'll post the
code here in the list so that other users can look at it in the future.
First, all of this code uses entity beans from the alpha-05 release of CORM
(my Open Source commercial O/R model project for Java), which can be
downlo
Is there an example of fault loading being used in an EJB 3 application?
I'm trying to load multiple collection valued references in one "unit of
work" or trip to the database.
Thanks,
--
Alex
In order to clean things up a bit and make them easier to show over e-mail,
I condensed the example test case so that it initializes its own entity
manager and does not involve itself with any session bean at all. Here is
the code, marked where it fails.
Cheers,
--
Alex (code below)
package org
Hello,
I'm trying to keep transactions alive inside of a TRANSACTION typed
transaction context long enough to test collection valued references of the
query results. Right now I have a test case that makes 26 different
transactions to the database, when I'm sure it should be more like 3 or 4.
Th
To all OpenEJB devs and users,
Today I was able (barely) to tag and release version alpha-05 of my open
source project CORM. This release includes the first real step in the
project toward supporting persistent entity model. I won't get into details
here, because this isn't about my project. I'
Sundstrom <[EMAIL PROTECTED]> wrote:
> On Jan 16, 2008, at 7:16 AM, Alexander Saint Croix wrote:
>
> > Hey, guys.
> >
> > Is it possible to write an EJBQL query with more than one LEFT JOIN
> > FETCH
> > clause?
>
> Sure. Just be careful with outer
Hey, guys.
Is it possible to write an EJBQL query with more than one LEFT JOIN FETCH
clause? I have a number of entities with more than collection-valued
references that are lazy loaded by default. I'm trying to avoid flagging
them as FetchType.EAGER. The O'Reilly book on EJB 3 has exactly [---
Heya.
While working with detached entities from a Stateless session bean that was
using a transactional persistence context, I came across the following error
while calling entityManager.remove(foo):
---
> Test set: org.e
Hey guys, when I run my build (which depends on the openejb-core
3.0.0snapshot pom, I get a build error. I wiped out the repo
directory and
rebuilt, to no avail. Here's the error:
[ERROR] BUILD ERROR
[INFO]
[INFO] Error bui
David, Dain and I tested this last night, and here's the final conclusion we
came to.
The initial problem was that retrieving and iterating over a list of the
entities from the entity manager and deleting them one at a time is
incredibly slow (one of my test cases took 4 minutes and 23 seconds to
Date: Jan 8, 2008 5:52 PM
Subject: Re: Nuking tables on tearDown() for CRUD tests
To: [EMAIL PROTECTED]
Alexander Saint Croix on 08/01/08 23:08, wrote:
> After working with devs on both the OpenEJB and the OpenJPA teams, I think
> that for anything other than trivial persistence units and entit
After working with devs on both the OpenEJB and the OpenJPA teams, I think
that for anything other than trivial persistence units and entity relations,
it is probably necessary to manually find a list of all of the entities of a
given type, iterate over that list, and use the entitymanager.remove()
> key constraints, you must delete the line items before the order can
> be deleted. This is normally accomplished with a cascade delete
> setting on the relationship.
>
> -dain
>
> On Jan 6, 2008, at 2:42 PM, Alexander Saint Croix wrote:
>
> > Hello,
> >
> > I
. It works out very well.
Cheers,
--
Alexander
On Jan 5, 2008 3:47 AM, Jacek Laskowski <[EMAIL PROTECTED]> wrote:
> On Dec 13, 2007 4:22 AM, Alexander Saint Croix
> <[EMAIL PROTECTED]> wrote:
>
> > I wonder whether there is any way for me to NOT include the
> and
>
I'll ask the OpenEJB guys if this is possible.
Cheers,
--
Alex
On Jan 6, 2008 7:46 PM, Pinaki Poddar <[EMAIL PROTECTED]> wrote:
>
> This error is related to dynamic runtime enhancement (my guess). If you
> can,
> switch to build-time enhancement, to verify this guess.
> --
> View this message
> On Jan 6, 2008 11:42 PM, Alexander Saint Croix
> <[EMAIL PROTECTED]> wrote:
>
> > Dain mentioned that I might completely drop and restart OpenEJB between
> > tests. He also mentioned that OpenJPA might have a way to wipe the
> database
> > tables clean for a
Hello,
I'm doing CRUD tests on a collection of integrated entities in a shared
persistence unit, and am encountering some errors because of crufty tables
from previous tests. I'm looking for a means of guaranteeing that the
tables for each of my entities is devoid of entries after each test runs.
Happy to help, David ;-)
--
Alex
On Dec 22, 2007 11:01 PM, David Blevins <[EMAIL PROTECTED]> wrote:
>
> On Dec 22, 2007, at 6:28 PM, David Blevins wrote:
>
> > So fixed two things. One, I fixed the tomcat servce-jar.xml so the
> > configuration you described above should work. Two, I added
> >
Howdy.
The 3.0 persistence spec, section 6.2.1.6, indicates that
elements in the persistence.xml should be relative to the root of the
persistence unit. However, I've found that it's digging from the root
of the tomcat installation. I think the PersistenceUnitInfoImpl.java
file is the location
Hi!
Good news. With (lots of) Dain's help, I finally got my example
working. We did, however, find what appears to be a bug and a
workaround for it.
I specify two mappings in my openejb.xml file, which look like this:
JdbcDriver com.mysql.jdbc.Driver
JdbcUrl jdbc:mysql://localhost/co
I read that there is a way to accomplish runtime enhancement for JPA
entities. Is there an example or documentation for this?
I'm VERY NEARLY done with this example application. I think that I've
finally got the JTA resources correctly configured in Tomcat, and with
David's corrections on the JN
Hello,
I'm having some trouble wiring my app's persistence.xml to the Resource
defined in the openejb.xml conf file.
First, here's the error:
> org.apache.openjpa.persistence.PersistenceException: There were errors
> initializing your configuration:
> org.apache.commons.lang.exception.NestableR
; wrote:
> On Dec 16, 2007, at 10:32 PM, Alexander Saint Croix wrote:
>
> > I am deploying in an embedded OpenEJB environment in Tomcat.
>
>
> >...
> >// inside of the doGet(...) method:
> >
> >FirstEntity ent1 = new FirstEntity();
> >
Hello.
I apologize in advance for the very long e-mail. Hopefully more info helps.
I'm getting a rather strange error and I'm at a loss at how to proceed. I'm
trying to build a collection of entity component jars that fulfill different
aspects of a business model. I will eventually have upward
t me thinking about doing my own, but not for
> OpenEJB. What tools did you use?
>
> Paul Spencer.
>
> Alexander Saint Croix wrote:
> > Part 4 of the tutorial series I'm working on is done.
> >
> > I just finished a demo based on the one Dain showed me over Tha
Part 4 of the tutorial series I'm working on is done.
I just finished a demo based on the one Dain showed me over Thanksgiving
break, building a simple Hello World web app and hooking into a stateless
session bean over a local interface. Credit for the whole presentation goes
to Dain. Start to f
Hey, guys.
This evening I cranked out a series of video tutorials for installing the
Apache Tomcat / OpenEJB / MySQL stack on OS X, and an accompanying PDF with
screenshots.
The attached PDF links to the videos and is a snapshot of the
work-in-progress at:
https://wiki.umn.edu/genpdf/OpenEJB/Buil
Thanks for the fast response, David.
The ability to remove the following four properties is very helpful and a
great start:
Namely the following:
> javax.persistence.provider
> javax.persistence.transactionType
> javax.persistence.jtaDataSource
> javax.persistence.nonJtaDataSource
>
Whil
Hello,
I'm working on an application that at the moment includes a single
(proof-of-concept) entity bean in my main web application WAR, and also
large number of entity beans which are JAR'd in the WEB-INF/lib.
Knowing that the persistence management is all outboard and not contained
inside of Op
Hello,
I'm working on an application that at the moment includes a single
(proof-of-concept) entity bean in my main web application WAR, and also
large number of entity beans which are JAR'd in the WEB-INF/lib.
Knowing that the persistence management is all outboard and not contained
inside of Op
43 matches
Mail list logo