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

Donald Woods commented on OPENJPA-1403:
---------------------------------------

I haven't looked thoroughly at the patch source (have the same EPL concerns as 
Kevin), but it does follow the design direction I started working on, by 
creating a openjpa-osgi module that contains the OSGi specific classloading and 
PersistenceProvider that would work for OSGi users, but leaves the existing 
code (openjpa.jar and openjpa-all.jar) unmodified.  This is done by extending 
the existing PersistnceProviderImpl with an OSGi aware version - 
openjpa-osgi/src/main/java/org/apache/openjpa/osgi/OSGiPersistenceProviderImpl.java

Given EPL 1.0 is considered a category B license -
    http://www.apache.org/legal/resolved.html#category-b
we should not include any EPL licensed Java source in OpenJPA.  A schema/DTD 
would be fine, but not Java code.
Please recreate the patch without using any EPL source or chime in on the dev 
list for the Aries Incubator project to help create a RFC 143 cleanroom 
implementation.


> OSGi Aware Persistence Provider Implementation
> ----------------------------------------------
>
>                 Key: OPENJPA-1403
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1403
>             Project: OpenJPA
>          Issue Type: New Feature
>            Reporter: Milinda Lakmal Pathirage
>         Attachments: osgi.patch
>
>
> Current OpenJPA trunk implementation doesn't have full support for using 
> OpenJPA in OSGi containers. For example when OSGi bundle which use OpenJPA 
> deployed, OpenJPA persistence provider cannot locate the persistence.xml in 
> that bundle due to class loading differences in OSGi environment. EclipseLink 
> has resolved this by using bundle listeners and JPA specific OSGi bundle 
> header. Patch provided in this JIRA solve issues in OpenJPA in OSGi 
> environment by following method used in EclipseLink. But there is a problem 
> with current OpenJPA implementation which caused me to add Dynamic-Imports 
> header to OpenJPA OSGi bundle to allow loading classes from bundles that use 
> OpenJPA. I think current OpenJPA implementation doesn't provide support to 
> replace central class load to support loading classes from bundles which use 
> OpenJPA. If we have that support we'll be able to remove Dynamic-Imports and 
> make OpenJPA OSGi bundle follow OSGi best practices .
> Please review the path and provide your ideas about this patch. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to