incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1358571 - in /incubator/isis/trunk: ./ framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/javalang/ framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/jdo/ fra...
Date Sat, 07 Jul 2012 14:20:23 GMT
Author: danhaywood
Date: Sat Jul  7 14:20:22 2012
New Revision: 1358571

URL: http://svn.apache.org/viewvc?rev=1358571&view=rev
Log:
ISIS-14: more on jdo object store

Added:
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/jdo/
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/jdo/RemoveJdoEnhancementTypesFacetFactory.java
      - copied, changed from r1358272, incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/main/java/org/apache/isis/runtimes/dflt/objectstores/datanucleus/metamodel/facets/RemoveDataNucleusEnhancementTypesFacetFactory.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/lib/
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/lib/.gitignore
    incubator/isis/trunk/framework/tck/tck-dom/.gitignore
    incubator/isis/trunk/framework/tck/tck-dom/.project
    incubator/isis/trunk/framework/tck/tck-dom/log4j.properties
Removed:
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/main/java/org/apache/isis/runtimes/dflt/objectstores/datanucleus/metamodel/facets/RemoveDataNucleusEnhancementTypesFacetFactory.java
Modified:
    incubator/isis/trunk/.gitignore
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/javalang/AbstractRemoveMethodsFacetFactory.java
    incubator/isis/trunk/framework/progmodels/dflt/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-applib/pom.xml
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/pom.xml
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/main/java/org/apache/isis/runtimes/dflt/objectstores/datanucleus/DataNucleusApplicationComponents.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/main/java/org/apache/isis/runtimes/dflt/objectstores/datanucleus/metamodel/specloader/progmodelfacets/DataNucleusProgrammingModelFacets.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/main/java/org/apache/isis/runtimes/dflt/objectstores/datanucleus/persistence/queries/PersistenceQueryFindAllInstancesProcessor.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/datanucleus/Utils.java
    incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/pom.xml
    incubator/isis/trunk/framework/tck/tck-dom/pom.xml

Modified: incubator/isis/trunk/.gitignore
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/.gitignore?rev=1358571&r1=1358570&r2=1358571&view=diff
==============================================================================
--- incubator/isis/trunk/.gitignore (original)
+++ incubator/isis/trunk/.gitignore Sat Jul  7 14:20:22 2012
@@ -9,13 +9,16 @@ logs/
 .classpath
 
 framework/runtimes/dflt/objectstores/sql/sql-tests-common/hsql-db/
-framework/runtimes/dflt/objectstores/sql/sql-tests-common/isis.log
 framework/runtimes/dflt/objectstores/sql/sql-tests-common/xml/
 framework/runtimes/dflt/objectstores/xml/tmp/
 framework/runtimes/dflt/objectstores/xml/xml/
 framework/security/sql/hsql-db/
 framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/hsql-db/
 
+# log files
+datanucleus.log
+isis.log
+
 # Package Files #
 *.jar
 *.war

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/javalang/AbstractRemoveMethodsFacetFactory.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/javalang/AbstractRemoveMethodsFacetFactory.java?rev=1358571&r1=1358570&r2=1358571&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/javalang/AbstractRemoveMethodsFacetFactory.java
(original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/javalang/AbstractRemoveMethodsFacetFactory.java
Sat Jul  7 14:20:22 2012
@@ -24,6 +24,7 @@ import java.util.List;
 
 import com.google.common.collect.Lists;
 
+import org.apache.isis.core.commons.factory.InstanceUtil;
 import org.apache.isis.core.metamodel.facetapi.FeatureType;
 import org.apache.isis.core.metamodel.facets.FacetFactoryAbstract;
 import org.apache.isis.core.metamodel.methodutils.MethodScope;
@@ -43,19 +44,36 @@ public abstract class AbstractRemoveMeth
         }
     }
 
-    private final List<MethodAndParameterTypes> methodList = Lists.newArrayList();
+    private final List<MethodAndParameterTypes> methodsToIgnore = Lists.newArrayList();
 
     public AbstractRemoveMethodsFacetFactory(final Class<?> typeToIgnore) {
         super(FeatureType.OBJECTS_ONLY);
         final Method[] methods = typeToIgnore.getMethods();
         for (final Method method : methods) {
-            methodList.add(new MethodAndParameterTypes(method.getName(), method.getParameterTypes()));
+            methodsToIgnore.add(new MethodAndParameterTypes(method.getName(), method.getParameterTypes()));
+        }
+    }
+
+    public AbstractRemoveMethodsFacetFactory(final String typeToIgnoreIfOnClasspath) {
+        super(FeatureType.OBJECTS_ONLY);
+        try {
+            Class<?> typeToIgnore = InstanceUtil.loadClass(typeToIgnoreIfOnClasspath);
+            addMethodsToBeIgnored(typeToIgnore);
+        } catch(Exception ex) {
+            // ignore
+        }
+    }
+
+    private void addMethodsToBeIgnored(Class<?> typeToIgnore) {
+        final Method[] methods = typeToIgnore.getMethods();
+        for (final Method method : methods) {
+            methodsToIgnore.add(new MethodAndParameterTypes(method.getName(), method.getParameterTypes()));
         }
     }
 
     @Override
     public void process(final ProcessClassContext processClassContext) {
-        for (final MethodAndParameterTypes mapt : methodList) {
+        for (final MethodAndParameterTypes mapt : methodsToIgnore) {
             processClassContext.removeMethod(MethodScope.OBJECT, mapt.methodName, null, mapt.methodParameters);
         }
     }

Copied: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/jdo/RemoveJdoEnhancementTypesFacetFactory.java
(from r1358272, incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/main/java/org/apache/isis/runtimes/dflt/objectstores/datanucleus/metamodel/facets/RemoveDataNucleusEnhancementTypesFacetFactory.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/jdo/RemoveJdoEnhancementTypesFacetFactory.java?p2=incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/jdo/RemoveJdoEnhancementTypesFacetFactory.java&p1=incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/main/java/org/apache/isis/runtimes/dflt/objectstores/datanucleus/metamodel/facets/RemoveDataNucleusEnhancementTypesFacetFactory.java&r1=1358272&r2=1358571&rev=1358571&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/main/java/org/apache/isis/runtimes/dflt/objectstores/datanucleus/metamodel/facets/RemoveDataNucleusEnhancementTypesFacetFactory.java
(original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/ignore/jdo/RemoveJdoEnhancementTypesFacetFactory.java
Sat Jul  7 14:20:22 2012
@@ -17,18 +17,18 @@
  *  under the License.
  */
 
-package org.apache.isis.runtimes.dflt.objectstores.datanucleus.metamodel.facets;
+package org.apache.isis.core.progmodel.facets.object.ignore.jdo;
 
 
 import org.apache.isis.core.progmodel.facets.object.ignore.javalang.AbstractRemoveMethodsFacetFactory;
 
 /**
- * Removes all methods inherited from {@link javax.jdo.spi.PersistenceCapable}.
+ * Removes all methods inherited from <tt>javax.jdo.spi.PersistenceCapable</tt>
(if JDO is on the classpath).
  */
-public class RemoveDataNucleusEnhancementTypesFacetFactory extends AbstractRemoveMethodsFacetFactory
{
+public class RemoveJdoEnhancementTypesFacetFactory extends AbstractRemoveMethodsFacetFactory
{
 
-    public RemoveDataNucleusEnhancementTypesFacetFactory() {
-        super(javax.jdo.spi.PersistenceCapable.class);
+    public RemoveJdoEnhancementTypesFacetFactory() {
+        super("javax.jdo.spi.PersistenceCapable");
     }
 
 }

Modified: incubator/isis/trunk/framework/progmodels/dflt/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/progmodels/dflt/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java?rev=1358571&r1=1358570&r2=1358571&view=diff
==============================================================================
--- incubator/isis/trunk/framework/progmodels/dflt/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java
(original)
+++ incubator/isis/trunk/framework/progmodels/dflt/src/main/java/org/apache/isis/progmodels/dflt/ProgrammingModelFacetsJava5.java
Sat Jul  7 14:20:22 2012
@@ -85,6 +85,7 @@ import org.apache.isis.core.progmodel.fa
 import org.apache.isis.core.progmodel.facets.object.ignore.javalang.RemoveJavaLangObjectMethodsFacetFactory;
 import org.apache.isis.core.progmodel.facets.object.ignore.javalang.RemoveSuperclassMethodsFacetFactory;
 import org.apache.isis.core.progmodel.facets.object.ignore.javalang.SyntheticMethodFilteringFacetFactory;
+import org.apache.isis.core.progmodel.facets.object.ignore.jdo.RemoveJdoEnhancementTypesFacetFactory;
 import org.apache.isis.core.progmodel.facets.object.immutable.annotation.ImmutableAnnotationFacetFactory;
 import org.apache.isis.core.progmodel.facets.object.immutable.markerifc.ImmutableMarkerInterfacesFacetFactory;
 import org.apache.isis.core.progmodel.facets.object.mask.annotation.MaskAnnotationForTypeFacetFactory;
@@ -200,6 +201,7 @@ public class ProgrammingModelFacetsJava5
         addFactory(RemoveStaticGettersAndSettersFacetFactory.class);
         addFactory(RemoveGetClassMethodFacetFactory.class);
         addFactory(RemoveIgnoreAnnotationMethodsFacetFactory.class);
+        addFactory(RemoveJdoEnhancementTypesFacetFactory.class);
 
         // must be before any other FacetFactories that install
         // MandatoryFacet.class facets

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-applib/pom.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-applib/pom.xml?rev=1358571&r1=1358570&r2=1358571&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-applib/pom.xml (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-applib/pom.xml Sat Jul
 7 14:20:22 2012
@@ -41,8 +41,14 @@
         <dependency>
             <groupId>javax.jdo</groupId>
             <artifactId>jdo-api</artifactId>
-            <version>3.0</version>
         </dependency>
+
+		<!-- required for bytecode enhancement -->        
+        <dependency>
+            <groupId>org.datanucleus</groupId>
+            <artifactId>datanucleus-api-jdo</artifactId>
+        </dependency>
+        
     </dependencies>
 
 </project>

Added: incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/lib/.gitignore
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/lib/.gitignore?rev=1358571&view=auto
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/lib/.gitignore
(added)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/lib/.gitignore
Sat Jul  7 14:20:22 2012
@@ -0,0 +1,5 @@
+#
+# explicitly ignoring Microsoft JDBC4 jar
+# (cannot redistribute, licensing)
+#
+sqljdbc4.jar

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/pom.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/pom.xml?rev=1358571&r1=1358570&r2=1358571&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/pom.xml
(original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/pom.xml
Sat Jul  7 14:20:22 2012
@@ -110,5 +110,15 @@
             <scope>test</scope>
         </dependency>
 
+		
+		<dependency>
+			<groupId>com.microsoft.sqlserver</groupId>
+			<artifactId>jdbc</artifactId>
+			<version>4.0</version>
+			<scope>system</scope>
+			<optional>true</optional>
+			<systemPath>${basedir}/lib/sqljdbc4.jar</systemPath>
+		</dependency>
+
 	</dependencies>
 </project>

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/main/java/org/apache/isis/runtimes/dflt/objectstores/datanucleus/DataNucleusApplicationComponents.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/main/java/org/apache/isis/runtimes/dflt/objectstores/datanucleus/DataNucleusApplicationComponents.java?rev=1358571&r1=1358570&r2=1358571&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/main/java/org/apache/isis/runtimes/dflt/objectstores/datanucleus/DataNucleusApplicationComponents.java
(original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/main/java/org/apache/isis/runtimes/dflt/objectstores/datanucleus/DataNucleusApplicationComponents.java
Sat Jul  7 14:20:22 2012
@@ -2,7 +2,6 @@ package org.apache.isis.runtimes.dflt.ob
 
 import java.util.Collection;
 import java.util.Collections;
-import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
@@ -12,13 +11,11 @@ import javax.jdo.JDOHelper;
 import javax.jdo.PersistenceManager;
 import javax.jdo.PersistenceManagerFactory;
 
-import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Sets;
 
 import org.datanucleus.NucleusContext;
 import org.datanucleus.api.jdo.JDOPersistenceManagerFactory;
-import org.datanucleus.store.StoreManager;
 import org.datanucleus.store.schema.SchemaAwareStoreManager;
 
 import org.apache.isis.core.commons.components.ApplicationScopedComponent;
@@ -45,7 +42,6 @@ public class DataNucleusApplicationCompo
         
         final Set<String> classesToBePersisted = catalogClassesToBePersisted(objectSpecs);
 
-        enhanceClasses(classesToBePersisted.toArray(new String[0]));
         createSchema(props, classesToBePersisted);
 
         namedQueryByName = Collections.unmodifiableMap(catalogNamedQueries(objectSpecs));
@@ -53,15 +49,6 @@ public class DataNucleusApplicationCompo
         lifecycleListener = new IsisLifecycleListener();
     }
 
-    private static void enhanceClasses(String[] classesToBePersisted) {
-        JDOEnhancer enhancer = JDOHelper.getEnhancer();
-        enhancer.addClasses(classesToBePersisted);
-        int numberClassesEnhanced = enhancer.enhance();
-        if(numberClassesEnhanced == 0) {
-            throw new JdoRuntimeException("Failed to enhance any classes");
-        }
-    }
-
     private void createSchema(final Map<String, String> props, final Set<String>
classesToBePersisted) {
         final JDOPersistenceManagerFactory jdopmf = (JDOPersistenceManagerFactory)persistenceManagerFactory;
         final NucleusContext nucleusContext = jdopmf.getNucleusContext();

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/main/java/org/apache/isis/runtimes/dflt/objectstores/datanucleus/metamodel/specloader/progmodelfacets/DataNucleusProgrammingModelFacets.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/main/java/org/apache/isis/runtimes/dflt/objectstores/datanucleus/metamodel/specloader/progmodelfacets/DataNucleusProgrammingModelFacets.java?rev=1358571&r1=1358570&r2=1358571&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/main/java/org/apache/isis/runtimes/dflt/objectstores/datanucleus/metamodel/specloader/progmodelfacets/DataNucleusProgrammingModelFacets.java
(original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/main/java/org/apache/isis/runtimes/dflt/objectstores/datanucleus/metamodel/specloader/progmodelfacets/DataNucleusProgrammingModelFacets.java
Sat Jul  7 14:20:22 2012
@@ -19,8 +19,8 @@
 package org.apache.isis.runtimes.dflt.objectstores.datanucleus.metamodel.specloader.progmodelfacets;
 
 
+import org.apache.isis.core.progmodel.facets.object.ignore.jdo.RemoveJdoEnhancementTypesFacetFactory;
 import org.apache.isis.progmodels.dflt.ProgrammingModelFacetsJava5;
-import org.apache.isis.runtimes.dflt.objectstores.datanucleus.metamodel.facets.RemoveDataNucleusEnhancementTypesFacetFactory;
 import org.apache.isis.runtimes.dflt.objectstores.jdo.metamodel.specloader.progmodelfacets.JdoProgrammingModelFacets;
 
 /**
@@ -34,7 +34,7 @@ import org.apache.isis.runtimes.dflt.obj
 public class DataNucleusProgrammingModelFacets extends JdoProgrammingModelFacets {
 
     public DataNucleusProgrammingModelFacets() {
-        addFactory(RemoveDataNucleusEnhancementTypesFacetFactory.class);
+        addFactory(RemoveJdoEnhancementTypesFacetFactory.class);
     }
 
 }

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/main/java/org/apache/isis/runtimes/dflt/objectstores/datanucleus/persistence/queries/PersistenceQueryFindAllInstancesProcessor.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/main/java/org/apache/isis/runtimes/dflt/objectstores/datanucleus/persistence/queries/PersistenceQueryFindAllInstancesProcessor.java?rev=1358571&r1=1358570&r2=1358571&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/main/java/org/apache/isis/runtimes/dflt/objectstores/datanucleus/persistence/queries/PersistenceQueryFindAllInstancesProcessor.java
(original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/main/java/org/apache/isis/runtimes/dflt/objectstores/datanucleus/persistence/queries/PersistenceQueryFindAllInstancesProcessor.java
Sat Jul  7 14:20:22 2012
@@ -28,8 +28,12 @@ public class PersistenceQueryFindAllInst
         if (LOG.isDebugEnabled()) {
             LOG.debug("getInstances: class=" + specification.getFullIdentifier());
         }
-        Class<?> cls = specification.getCorrespondingClass();
-        final Query query = getPersistenceManager().newQuery(cls);
+        
+//        Class<?> cls = specification.getCorrespondingClass();
+//        final Query query = getPersistenceManager().newQuery(cls);
+        
+        final Query query = QueryUtil.createQuery(getPersistenceManager(), "o", null, specification,
null);
+
         final List<?> pojos = (List<?>) query.execute();
         return loadAdapters(specification, pojos);
     }

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/datanucleus/Utils.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/datanucleus/Utils.java?rev=1358571&r1=1358570&r2=1358571&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/datanucleus/Utils.java
(original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/jdo-datanucleus/src/test/java/org/apache/isis/runtimes/dflt/objectstores/datanucleus/Utils.java
Sat Jul  7 14:20:22 2012
@@ -46,11 +46,20 @@ public class Utils {
     public static IsisConfiguration configurationForDataNucleusOverHsqlDb() {
         final IsisConfigurationDefault configuration = new IsisConfigurationDefault();
         Properties props = new Properties();
-        props.put("isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName",
"org.hsqldb.jdbcDriver");
+        
+        props.put("isis.persistor.datanucleus.impl.javax.jdo.PersistenceManagerFactoryClass",
"org.datanucleus.api.jdo.JDOPersistenceManagerFactory");
+        
+        //props.put("isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName",
"org.hsqldb.jdbcDriver");
         //props.put("isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL", "jdbc:hsqldb:mem:test");
-        props.put("isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL", "jdbc:hsqldb:file:hsql-db/test;hsqldb.write_delay=false;shutdown=true");
-        props.put("isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionUserName",
"sa");
-        props.put("isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword",
"");
+        ////props.put("isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL", "jdbc:hsqldb:file:hsql-db/test;hsqldb.write_delay=false;shutdown=true");
+        //props.put("isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionUserName",
"sa");
+        //props.put("isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword",
"");
+
+        props.put("isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName",
"com.microsoft.sqlserver.jdbc.SQLServerDriver");
+        props.put("isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL", "jdbc:sqlserver://127.0.0.1:1433;instance=SQLEXPRESS;databaseName=jdo;");
+        props.put("isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionUserName",
"jdo");
+        props.put("isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword",
"jdopass");
+
         props.put("isis.persistor.datanucleus.impl.datanucleus.autoCreateSchema", "true");
         props.put("isis.persistor.datanucleus.impl.datanucleus.validateTables", "false");
         props.put("isis.persistor.datanucleus.impl.datanucleus.validateConstraints", "false");

Modified: incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/pom.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/pom.xml?rev=1358571&r1=1358570&r2=1358571&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/pom.xml (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/objectstores/jdo/pom.xml Sat Jul  7 14:20:22
2012
@@ -39,6 +39,16 @@
 	<!-- used in Site generation for relative references. -->
 	<url>http://incubator.apache.org/isis/${relativeUrl}</url>
 
+	<pluginRepositories>
+        <pluginRepository>
+            <id>DataNucleus_2</id>
+            <url>http://www.datanucleus.org/downloads/maven2/</url>
+            <snapshots>
+                <enabled>false</enabled>
+            </snapshots>
+        </pluginRepository>
+    </pluginRepositories>
+
 	<modules>
 		<module>jdo-applib</module>
 		<module>jdo-metamodel</module>

Added: incubator/isis/trunk/framework/tck/tck-dom/.gitignore
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/tck/tck-dom/.gitignore?rev=1358571&view=auto
==============================================================================
--- incubator/isis/trunk/framework/tck/tck-dom/.gitignore (added)
+++ incubator/isis/trunk/framework/tck/tck-dom/.gitignore Sat Jul  7 14:20:22 2012
@@ -0,0 +1,7 @@
+#
+# included back-in, for the DataNucleus builder
+#
+# DataNucleus plugin can be installed from 
+# http://www.datanucleus.org/plugins/ide.eclipse.html
+#
+!.project

Added: incubator/isis/trunk/framework/tck/tck-dom/.project
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/tck/tck-dom/.project?rev=1358571&view=auto
==============================================================================
--- incubator/isis/trunk/framework/tck/tck-dom/.project (added)
+++ incubator/isis/trunk/framework/tck/tck-dom/.project Sat Jul  7 14:20:22 2012
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.apache.isis.tck.tck-dom</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.m2e.core.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.datanucleus.ide.eclipse.enhancerbuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.m2e.core.maven2Nature</nature>
+		<nature>org.datanucleus.ide.eclipse.projectnature</nature>
+	</natures>
+</projectDescription>

Added: incubator/isis/trunk/framework/tck/tck-dom/log4j.properties
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/tck/tck-dom/log4j.properties?rev=1358571&view=auto
==============================================================================
--- incubator/isis/trunk/framework/tck/tck-dom/log4j.properties (added)
+++ incubator/isis/trunk/framework/tck/tck-dom/log4j.properties Sat Jul  7 14:20:22 2012
@@ -0,0 +1,24 @@
+# LOG4J Configuration
+# ===================
+
+# Basic logging goes to "datanucleus.log"
+log4j.appender.A1=org.apache.log4j.FileAppender
+log4j.appender.A1.File=datanucleus.log
+log4j.appender.A1.layout=org.apache.log4j.PatternLayout
+log4j.appender.A1.layout.ConversionPattern=%d{HH:mm:ss,SSS} (%t) %-5p [%c] - %m%n
+#log4j.appender.A1.Threshold=INFO
+
+# Categories
+# Each category can be set to a "level", and to direct to an appender
+
+# Default to DEBUG level for all DataNucleus categories
+log4j.logger.DataNucleus = DEBUG, A1
+
+log4j.category.com.mchange.v2.c3p0=INFO, A1
+log4j.category.com.mchange.v2.resourcepool=INFO, A1
+log4j.category.org.logicalcobwebs.proxool=INFO,A1
+
+
+# Hbase libs logging
+log4j.category.org.apache.hadoop=INFO,A1
+log4j.category.org.apache.zookeeper=INFO,A1
\ No newline at end of file

Modified: incubator/isis/trunk/framework/tck/tck-dom/pom.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/tck/tck-dom/pom.xml?rev=1358571&r1=1358570&r2=1358571&view=diff
==============================================================================
--- incubator/isis/trunk/framework/tck/tck-dom/pom.xml (original)
+++ incubator/isis/trunk/framework/tck/tck-dom/pom.xml Sat Jul  7 14:20:22 2012
@@ -28,6 +28,79 @@
 	<artifactId>tck-dom</artifactId>
 	<name>TCK DOM</name>
 
+
+	<build>
+		<plugins>
+            <plugin>
+                <groupId>org.datanucleus</groupId>
+                <artifactId>maven-datanucleus-plugin</artifactId>
+                <version>3.0.2</version>
+                <configuration>
+                    <log4jConfiguration>${basedir}/log4j.properties</log4jConfiguration>
+                    <verbose>true</verbose>
+                    <props>${basedir}/datanucleus.properties</props>
+                </configuration>
+                <executions>
+                    <execution>
+                        <phase>compile</phase>
+                        <goals>
+                            <goal>enhance</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+		</plugins>
+		<pluginManagement>
+			<plugins>
+				<!--This plugin's configuration is used to store Eclipse m2e settings only. It has
no influence on the Maven build itself.-->
+				<plugin>
+					<groupId>org.eclipse.m2e</groupId>
+					<artifactId>lifecycle-mapping</artifactId>
+					<version>1.0.0</version>
+					<configuration>
+						<lifecycleMappingMetadata>
+							<pluginExecutions>
+								<pluginExecution>
+									<pluginExecutionFilter>
+										<groupId>
+											org.datanucleus
+										</groupId>
+										<artifactId>
+											maven-datanucleus-plugin
+										</artifactId>
+										<versionRange>
+											[3.0.2,)
+										</versionRange>
+										<goals>
+											<goal>enhance</goal>
+										</goals>
+									</pluginExecutionFilter>
+									<action>
+										<ignore></ignore>
+									</action>
+								</pluginExecution>
+							</pluginExecutions>
+						</lifecycleMappingMetadata>
+					</configuration>
+				</plugin>
+			</plugins>
+		</pluginManagement>
+	</build>
+
+
+	<dependencyManagement>
+		<dependencies>
+			<!-- for DataNucleus, see below -->
+			<dependency>
+	            <groupId>org.apache.isis.runtimes.dflt.objectstores</groupId>
+				<artifactId>jdo</artifactId>
+				<version>0.3.1-incubating-SNAPSHOT</version>
+				<type>pom</type>
+				<scope>import</scope>						
+			</dependency>
+		</dependencies>
+	</dependencyManagement>	
+	
 	<dependencies>
 		<dependency>
 			<groupId>org.apache.isis</groupId>
@@ -39,6 +112,25 @@
 			<artifactId>jdo-applib</artifactId>
 		</dependency>
 
+		<!-- DataNucleus (horrid, but needed to run the enhancer)-->
+       <dependency>
+            <groupId>javax.jdo</groupId>
+            <artifactId>jdo-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.datanucleus</groupId>
+            <artifactId>datanucleus-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.datanucleus</groupId>
+            <artifactId>datanucleus-enhancer</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.datanucleus</groupId>
+            <artifactId>datanucleus-api-jdo</artifactId>
+        </dependency>
+		
+
 		<dependency>
             <groupId>org.apache.isis.runtimes.dflt.objectstores</groupId>
 			<artifactId>jpa-applib</artifactId>
@@ -48,6 +140,6 @@
 			<groupId>org.apache.isis.viewer</groupId>
 			<artifactId>wicket-applib</artifactId>
 		</dependency>
-		
+				
 	</dependencies>
 </project>



Mime
View raw message