Author: ppoddar
Date: Tue Sep 27 15:32:59 2011
New Revision: 1176436

URL: http://svn.apache.org/viewvc?rev=1176436&view=rev
Log:
OPENJPA-2030: Loading custom Auditor in OSGi environment

Modified:
    
openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfiguration.java
    
openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java

Modified: 
openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfiguration.java
URL: 
http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfiguration.java?rev=1176436&r1=1176435&r2=1176436&view=diff
==============================================================================
--- 
openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfiguration.java
 (original)
+++ 
openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfiguration.java
 Tue Sep 27 15:32:59 2011
@@ -1867,18 +1867,33 @@ public interface OpenJPAConfiguration
     
     
     /**
-     * Gets an instance of {@link AuditManager} associated with this 
configuration.
+     * Gets the singular instance of {@link Auditor} associated with this 
configuration.
      * 
      * @since 2.2.0
      */
     public Auditor getAuditorInstance();
     
     /**
-     * Gets the plug-in string of {@link AuditManager} specified in this 
configuration.
+     * Sets the singular instance of {@link Auditor} associated with this 
configuration.
+     * 
+     * @since 2.2.0
+     */
+
+    public void setAuditorInstance(Auditor auditor);
+    
+    /**
+     * Gets the plug-in string of {@link Auditor} specified in this 
configuration.
      * 
      * @since 2.2.0
      */
     public String getAuditor();
     
+    /**
+     * Sets the plug-in string of {@link Auditor} specified in this 
configuration.
+     * 
+     * @since 2.2.0
+     */
+    public void setAuditor(String s);
+    
 }
 

Modified: 
openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java
URL: 
http://svn.apache.org/viewvc/openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java?rev=1176436&r1=1176435&r2=1176436&view=diff
==============================================================================
--- 
openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java
 (original)
+++ 
openjpa/trunk/openjpa-kernel/src/main/java/org/apache/openjpa/conf/OpenJPAConfigurationImpl.java
 Tue Sep 27 15:32:59 2011
@@ -1660,6 +1660,7 @@ public class OpenJPAConfigurationImpl
         super.instantiateAll();
         getMetaDataRepositoryInstance();
         getRemoteCommitEventManager();
+        getAuditorInstance();
         cacheMarshallerPlugins.initialize();
         if (isInitializeEagerly()) {
                getConnectionFactory();
@@ -1824,8 +1825,16 @@ public class OpenJPAConfigurationImpl
        return auditor;
     }
     
+    public void setAuditorInstance(Auditor auditor) {
+       auditorPlugin.set(auditor);
+    }
+    
     public String getAuditor() {
        return auditorPlugin.getString();
     }
+    
+    public void setAuditor(String auditor) {
+       auditorPlugin.setString(auditor);
+    }
 }
 


Reply via email to