Hi Christoph,

The Eclipselink PersistenceProvider caches persistence units, so when 
persistence-unit-providing bundles are refreshed, it keeps hold of the outdated 
classloader, and everything breaks.  As a workaround, I added a BundleListener 
to force Eclipselink to restart when any persistence-unit-providing bundles are 
redeployed.  See org.opencastproject.db.Activator$JpaClientBundleListener for 
the details, or the related Jira ticket [1].

The Eclipse Gemini JPA project looks like a promising fix for this, until you 
read the documentation [2]: "Documentation is not available, yet, but is in the 
process of being written for Gemini JPA.".   I haven't looked very deeply into 
this issue, so if you've got ideas for alternative solutions, feel free to give 
it a shot.

[1] http://opencast.jira.com/browse/MH-5450
[2] http://www.eclipse.org/gemini/jpa/documentation/

Josh

On Jul 13, 2011, at 7:50 AM, Christoph Drießen wrote:

> I'm facing the following problem: No matter which of the bundles using JPA 
> persistence I am trying to redeploy, it always causes issues in the 
> persistence layer so that the system doesn't work correctly anymore. This 
> occurs with current trunk.
> 
> As an example I redeployed two bundles by just copying them from target/ to 
> the felix matterhorn directory. The Felix output right after the redeployment 
> can be viewed here: 
>       matterhorn-annotation-impl-1.3-SNAPSHOT.jar: 
> https://gist.github.com/1080151
>       matterhorn-ingest-service-impl-1.3-SNAPSHOT.jar: 
> https://gist.github.com/1080174
> 
> Again I want to emphasize that the situation is more or less the same no 
> matter which JPA bundle is redeployed.
> 
> My questions are:
> - Why do the redeployment cause so much of the whole system to restart even 
> though there are no dependencies on these bundles?
> - Why have other bundles problems using their EntityManagerFactory 
> afterwards? Shouldn't it be that each bundle/component has its own one for 
> their own persistence unit?
> 
> Did anybody face this problem also or has some more insight into this?
> 
> Thanks,
> Christoph
> 
> 
> _______________________________________________
> Matterhorn mailing list
> [email protected]
> http://lists.opencastproject.org/mailman/listinfo/matterhorn
> 
> 
> To unsubscribe please email
> [email protected]
> _______________________________________________

_______________________________________________
Matterhorn mailing list
[email protected]
http://lists.opencastproject.org/mailman/listinfo/matterhorn


To unsubscribe please email
[email protected]
_______________________________________________

Reply via email to