Hi,

I had the same problem going from glassfish to tomee (eclipselink ->
openjpa), collections are lazily fetched and you can't access them outside
of the transaction. My solution was to log the size of the collection
inside the session bean method... ugly but it worked.

Regards


On 27 June 2014 11:25, hwaastad <[email protected]> wrote:

> Hi,
> I've startet to see if I can migrate some of my projects from using
> eclipselink 2.5.1 to openjpa 2.4xx.
>
> Does anyone know if there are any resources anywhere which discribes this?.
>
> I've just switched provider to openjpa and it seems that openjpa fetches
> differently from eclipselink.
>
> example:
>
> 1. use deltaspike repository with jta support
>
> 2. Stateless ejb handling request from cdi beans (View access scope)
>
> 3. onetomany are lazy fetched and unidirectional
>
> in my @VASB i fecth all customers via ejb call
> if I try getchildcollection for one of my parents in @VASB, it returns
> null.
>
> Switching back to eclipselink, get child collection returns collection.
> (and
> i off cource see the sql logs)
>
> I'm quite new to openjpa, but I would expect the two would operate similar
> without any changes...but obviously not.
>
> This is tomee 1.7.0-snapshot.
>
> My idea was actually to get openjpa works the same way my eclipselink
> implementation was, and the add LRS features and more.
>
> If this is not tomee dependent, I'll move over to stackoverflow :-)
>
> br hw
>
>
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/tomee-eclipselink-openjpa-tp4670212.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Reply via email to