openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jrba...@apache.org
Subject svn commit: r1177327 - /openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/osgi/PersistenceActivator.java
Date Thu, 29 Sep 2011 15:05:09 GMT
Author: jrbauer
Date: Thu Sep 29 15:05:08 2011
New Revision: 1177327

URL: http://svn.apache.org/viewvc?rev=1177327&view=rev
Log:
OPENJPA-2053 Added property to enable proper OSGi service tracking of the OpenJPA provider.

Modified:
    openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/osgi/PersistenceActivator.java

Modified: openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/osgi/PersistenceActivator.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/osgi/PersistenceActivator.java?rev=1177327&r1=1177326&r2=1177327&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/osgi/PersistenceActivator.java
(original)
+++ openjpa/trunk/openjpa-persistence/src/main/java/org/apache/openjpa/persistence/osgi/PersistenceActivator.java
Thu Sep 29 15:05:08 2011
@@ -49,7 +49,13 @@ public class PersistenceActivator implem
         this.ctx = ctx;
         PersistenceProvider provider = new PersistenceProviderImpl();
         Hashtable<String, String> props = new Hashtable<String, String>();
+        // Aries queries for service providers by property "javax.persistence.provider"
         props.put(PERSISTENCE_PROVIDER_ARIES, OSGI_PERSISTENCE_PROVIDER);
+        // The persistence service tracker in the geronimo spec api bundle examines
+        // the property named "javax.persistence.PersistenceProvider" rather than
+        // the the property provided for Aries.  In order to properly track the OpenJPA 
+        // provider, this property must be set upon service registration.
+        props.put(PERSISTENCE_PROVIDER, OSGI_PERSISTENCE_PROVIDER);
         svcReg = ctx.registerService(PERSISTENCE_PROVIDER, provider, props);
         
         OSGiManagedRuntime.registerServiceListener(ctx);



Mime
View raw message