[ 
https://issues.apache.org/jira/browse/OPENJPA-2766?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16737417#comment-16737417
 ] 

Matt Pavlovich commented on OPENJPA-2766:
-----------------------------------------

The value proposition is true modularity. The ability for extension of entities 
post-build time. Support 3rd party extension of an application, customized 
builds.. in my experience this capability is what a lot of enterprises and 
product companies have been working towards for quite some time.

Ugh.. I see your point regarding the JPA Spec calling for classes by name. The 
JPA spec pretty much dictates classes by name and single class loader. Perhaps 
an extension to register a number of class loaders instead of the entities by 
name? Entity bundles could hand the whiteboard their class loader.. register 
classes by string name and then loop over the registered class loaders should 
work.

As far as the whiteboard goes, I am not suggesting that be a requirement for 
this ticket. I have no problem handling that (although, I think a lot of people 
would look forward to having that feature), or make it a non-standard openjpa 
extension. 

> Modularity support
> ------------------
>
>                 Key: OPENJPA-2766
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2766
>             Project: OpenJPA
>          Issue Type: New Feature
>            Reporter: Matt Pavlovich
>            Priority: Major
>
> Support modular organization of entities so that all entities do not need to 
> be contained in the same jar, or referenced in a single persistence.xml 
> <class> listing.
> Use cases:
> 1. Jar A contains entityA, Jar B contains entityB.  (EntityB may or may not 
> extend from entityA.)
> 2. Jar X contains persistence.xml defining the PU
> 3. Jar C contains entityC and a list of classes that extend entityA. Jar X 
> persistence unit should be able to persist entityC and its collection of 
> entityA, entityB.. etc
> Features:
> 1. Auto-classpath scanning (perhaps for persistence-fragment.xml.. then 
> enumerate)
> 2. Support manual registration and unregistration of entity classes (not just 
> class names) to support OSGi environments that have per-bundle classloaders 
> and deploy/undeploy support.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to