You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by aa...@apache.org on 2010/06/14 15:26:52 UTC

svn commit: r954444 - in /cayenne/main/trunk/framework: cayenne-di-unpublished/src/main/java/org/apache/cayenne/di/ cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/ cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/c...

Author: aadamchik
Date: Mon Jun 14 13:26:51 2010
New Revision: 954444

URL: http://svn.apache.org/viewvc?rev=954444&view=rev
Log:
refactoring and cleanup

* javadocs
* DIBootstrap new convenience method
* unused test class

Removed:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/conn/TstConnection.java
Modified:
    cayenne/main/trunk/framework/cayenne-di-unpublished/src/main/java/org/apache/cayenne/di/DIBootstrap.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/Runtime.java

Modified: cayenne/main/trunk/framework/cayenne-di-unpublished/src/main/java/org/apache/cayenne/di/DIBootstrap.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-di-unpublished/src/main/java/org/apache/cayenne/di/DIBootstrap.java?rev=954444&r1=954443&r2=954444&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-di-unpublished/src/main/java/org/apache/cayenne/di/DIBootstrap.java (original)
+++ cayenne/main/trunk/framework/cayenne-di-unpublished/src/main/java/org/apache/cayenne/di/DIBootstrap.java Mon Jun 14 13:26:51 2010
@@ -18,6 +18,8 @@
  ****************************************************************/
 package org.apache.cayenne.di;
 
+import java.util.Collection;
+
 import org.apache.cayenne.ConfigurationException;
 import org.apache.cayenne.di.spi.DefaultInjector;
 
@@ -35,4 +37,12 @@ public class DIBootstrap {
             throws ConfigurationException {
         return new DefaultInjector(modules);
     }
+
+    /**
+     * Creates and returns an injector instance working with the set of provided modules.
+     */
+    public static Injector createInjector(Collection<Module> modules) {
+        Module[] moduleArray = modules.toArray(new Module[modules.size()]);
+        return createInjector(moduleArray);
+    }
 }

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/Runtime.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/Runtime.java?rev=954444&r1=954443&r2=954444&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/Runtime.java (original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/configuration/Runtime.java Mon Jun 14 13:26:51 2010
@@ -29,7 +29,9 @@ import org.apache.cayenne.di.Module;
 /**
  * A superclass of various Cayenne runtime stacks. A Runtime is the main access point to
  * Cayenne for a user application. It provides a default Cayenne configuration as well as
- * a way to customize this configuration via a built-in dependency injection container.
+ * a way to customize this configuration via a built-in dependency injection (DI)
+ * container. In fact implementation-wise, Runtime object is just a convenience thin
+ * wrapper around a DI container.
  * 
  * @since 3.1
  */