geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacek Laskowski" <>
Subject Re: Geronimo 2.0.2 - OpenEJB "Passivation Failed"
Date Mon, 25 Feb 2008 22:41:14 GMT
On Mon, Feb 25, 2008 at 1:07 PM, Mario Kofler <> wrote:

> <persistence xmlns=""
>               xmlns:xsi=""
> xsi:schemaLocation=""
>               version="1.0">
>   <persistence-unit name="valhalla" transaction-type="JTA">


I'm pretty sure I've seen the persistence.xml before ;-)

Let's see how we can make it "better". Remote transaction-type - it's
unnecessary as the default value in the managed env like Geronimo is

>     <description>videothek</description>

Unnecessary, but could be helpful.

> <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>

Unnecessary. It's the default JPA provider in Geronimo and OpenEJB

>      <class>vt.bean.entity.Person</class>
>     <class>vt.bean.entity.Actor</class>
>     <class>vt.bean.entity.Director</class>
>     <class>vt.bean.entity.Movie</class>
>      <class>vt.bean.entity.Dvd</class>

I'm pretty sure you don't have to specify it either (you should do it
in the outside-the-container mode, outside javaee managed env).

>     <properties>
>       <property name="openjpa.jdbc.DBDictionary" value="postgres"/>
>     </properties>
>     <jta-data-source>jdbc/postgres</jta-data-source>
>      <non-jta-data-source>jdbc/postgres</non-jta-data-source>

I don't know if Geronimo provides a notion of a default jdbc data
source for JPA. It's available in some other java ee app servers and
it could be very handy for prototyping. In your case, it should
definitely be specified as you're using PostgreSQL (which I doubt will
ever be a default database).

>   </persistence-unit>
> </persistence>
> it took me some configuration time to get it working this way and i think it
> is already as short as it can get ;)

Nope. It could be shorter/more compact ;-) That's the beauty of Java
EE 5 - most of the configuration settings are defaults and there's no
need to repeat them if you don't have to.

> so another thing is when i keep calling the bean repeatedly to insert 1
> director per transaction as in a performance test after about 100 inserts it
> is the first time i get an exception. the server continues inserting to the
> db but the exception is coming every now and then.. i wonder what it means..
> i don't want to just throw exceptions here, but maybe you see it with one
> eye, taking a short look.. thanks in anyway, here is the stacktrace:

Add "implements Serializable" to your session bean(s) and the issue
should vanish in a puff of smoke. It's a bug in OpenEJB. It's reported
and it should be taken care of before OpenEJB 3.0. Dunno when it
appears in Geronimo. It could be 2.2 but it could take longer. I'm
sure you could help us fixing it. You're well skilled to squash it. (it looks Dave's
working on it so it should be available in a day or so ;-))


Jacek Laskowski

View raw message