[jboss-svn-commits] JBL Code SVN: r31353 - in labs/jbossrules/trunk: drools-api/META-INF and 13 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Feb 1 22:56:29 EST 2010


Author: mark.proctor at jboss.com
Date: 2010-02-01 22:56:29 -0500 (Mon, 01 Feb 2010)
New Revision: 31353

Added:
   labs/jbossrules/trunk/drools-persistence-jpa/META-INF/
   labs/jbossrules/trunk/drools-persistence-jpa/META-INF/MANIFEST.MF
   labs/jbossrules/trunk/drools-persistence-jpa/build.properties
   labs/jbossrules/trunk/drools-persistence-jpa/src/main/java/org/drools/persistence/processinstance/EventType.java
   labs/jbossrules/trunk/drools-persistence-jpa/src/test/resources/jndi.properties
Removed:
   labs/jbossrules/trunk/drools-persistence-jpa/src/main/resources/META-INF/persistence.xml
   labs/jbossrules/trunk/drools-persistence-jpa/src/main/resources/jndi.properties
Modified:
   labs/jbossrules/trunk/drools-api/META-INF/MANIFEST.MF
   labs/jbossrules/trunk/drools-api/pom.xml
   labs/jbossrules/trunk/drools-compiler/META-INF/MANIFEST.MF
   labs/jbossrules/trunk/drools-compiler/pom.xml
   labs/jbossrules/trunk/drools-core/META-INF/MANIFEST.MF
   labs/jbossrules/trunk/drools-core/pom.xml
   labs/jbossrules/trunk/drools-persistence-jpa/pom.xml
   labs/jbossrules/trunk/drools-persistence-jpa/src/main/java/org/drools/persistence/processinstance/ProcessInstanceInfo.java
   labs/jbossrules/trunk/drools-persistence-jpa/src/main/java/org/drools/persistence/session/SingleSessionCommandService.java
   labs/jbossrules/trunk/drools-persistence-jpa/src/main/resources/META-INF/orm.xml
   labs/jbossrules/trunk/drools-persistence-jpa/src/test/resources/META-INF/persistence.xml
   labs/jbossrules/trunk/drools-process/drools-bpmn2/pom.xml
Log:
-just getting the build working again.

Modified: labs/jbossrules/trunk/drools-api/META-INF/MANIFEST.MF
===================================================================
--- labs/jbossrules/trunk/drools-api/META-INF/MANIFEST.MF	2010-02-02 03:11:50 UTC (rev 31352)
+++ labs/jbossrules/trunk/drools-api/META-INF/MANIFEST.MF	2010-02-02 03:56:29 UTC (rev 31353)
@@ -48,24 +48,14 @@
  "org.drools.runtime,org.drools";version="5.1.0.SNAPSHOT",org.drools.m
  anagement;uses:="javax.management";version="5.1.0.SNAPSHOT",org.drool
  s.command.impl;uses:="org.drools.command";version="5.1.0.SNAPSHOT"
-Ignore-Package: org.drools.event.io,org.drools.marshalling,org.drools.
- runtime,org.drools.conf,org.drools.event,org.drools.event.knowledgeba
- se,org.drools,org.drools.definition.process,org.drools.util,org.drool
- s.builder,org.drools.builder.conf,org.drools.logger,org.drools.runtim
- e.process,org.drools.runtime.conf,org.drools.runtime.help,org.drools.
- time,org.drools.definition.rule,org.drools.event.rule,org.drools.osgi
- .api,org.drools.runtime.rule,org.drools.event.process,org.drools.defi
- nition,org.drools.vsm,org.drools.definition.type,org.drools.builder.h
- elp,org.drools.runtime.pipeline,org.drools.io,org.drools.task.service
- ,org.drools.command,org.drools.agent,org.drools.command.impl,org.droo
- ls.management,org.drools.persistence.jpa
+Private-Package: .;version="5.1.0.SNAPSHOT"
 Tool: Bnd-0.0.357
 Bundle-Name: Drools :: API
 Created-By: 1.6.0_18 (Sun Microsystems Inc.)
 Bundle-Vendor: JBoss Inc.
 DynamicImport-Package: *
 Bundle-Version: 5.1.0.SNAPSHOT
-Bnd-LastModified: 1264724421150
+Bnd-LastModified: 1265079297838
 Bundle-Activator: org.drools.osgi.api.Activator
 Bundle-ManifestVersion: 2
 Bundle-Description: A rule production system

Modified: labs/jbossrules/trunk/drools-api/pom.xml
===================================================================
--- labs/jbossrules/trunk/drools-api/pom.xml	2010-02-02 03:11:50 UTC (rev 31352)
+++ labs/jbossrules/trunk/drools-api/pom.xml	2010-02-02 03:56:29 UTC (rev 31353)
@@ -89,6 +89,7 @@
             <configuration>
                <manifestLocation>META-INF</manifestLocation>
                <instructions>
+                  <_removeheaders>Ignore-Package</_removeheaders>
                   <Import-Package>!org.drools.*,*;resolution:=optional</Import-Package>
                   <Export-Package>org.drools.*</Export-Package>
                   <DynamicImport-Package>*</DynamicImport-Package>

Modified: labs/jbossrules/trunk/drools-compiler/META-INF/MANIFEST.MF
===================================================================
--- labs/jbossrules/trunk/drools-compiler/META-INF/MANIFEST.MF	2010-02-02 03:11:50 UTC (rev 31352)
+++ labs/jbossrules/trunk/drools-compiler/META-INF/MANIFEST.MF	2010-02-02 03:56:29 UTC (rev 31353)
@@ -46,35 +46,12 @@
  com.thoughtworks.xstream,org.drools.guvnor.client.modeldriven,org.mve
  l2,org.drools.guvnor.client.modeldriven.dt,org.drools.guvnor.client.m
  odeldriven.testing";version="5.1.0.SNAPSHOT"
-Ignore-Package: org.drools.osgi.compiler,org.drools.util.asm,org.drool
- s.process.core.impl,org.drools.base.dataproviders,org.drools.builder.
- conf.impl,org.drools,org.drools.definition.process,org.drools.util,or
- g.drools.type,org.drools.testframework,org.drools.workflow.core,org.d
- rools.builder,org.drools.workflow.core.impl,org.drools.builder.conf,o
- rg.drools.process.core.validation,org.drools.rule.builder.dialect.mve
- l,org.drools.runtime.process,org.drools.time.impl,org.drools.guvnor.s
- erver.rules,org.drools.rule,org.drools.guvnor.client.modeldriven.brl,
- org.drools.guvnor.client.modeldriven.testing,org.drools.spi,org.drool
- s.time,org.drools.reteoo,org.drools.xml,org.drools.base.extractors,or
- g.drools.base.field,org.drools.process.core.context.exception,org.dro
- ols.osgi.api,org.drools.impl,org.drools.guvnor.client.modeldriven.ui,
- org.drools.workflow.instance.impl,org.drools.ruleflow.core,org.drools
- .guvnor.client,org.drools.process.core.context.swimlane,org.drools.wo
- rkflow.core.node,org.drools.base.evaluators,org.drools.compiler,org.d
- rools.definition,org.drools.process.core.event,org.drools.definitions
- .impl,org.drools.reteoo.compiled,org.drools.guvnor.client.modeldriven
- .dt,org.drools.ruleflow.core.validation,org.drools.process.core.timer
- ,org.drools.process.core.context.variable,org.drools.io.impl,org.droo
- ls.event,org.drools.base.mvel,org.drools.base.accumulators,org.drools
- .facttemplates,org.drools.process.builder,org.drools.rule.builder.dia
- lect.java,org.drools.builder.impl,org.drools.base,org.drools.process.
- core.datatype,org.drools.rule.builder.dialect.java.parser,org.drools.
- xml.rules,org.drools.guvnor.server,org.drools.xml.processes,org.drool
- s.process.core,org.drools.factmodel,org.drools.process.core.datatype.
- impl.type,org.drools.runtime.rule,org.drools.semantics.java.parser,or
- g.drools.common,org.drools.io,org.drools.agent,org.drools.io.internal
- ,org.drools.guvnor.client.modeldriven,org.drools.rule.builder,org.dro
- ols.guvnor.server.util
+Private-Package: org.drools.lang.descr;version="5.1.0.SNAPSHOT",org.dr
+ ools.commons.jci.compilers;version="5.1.0.SNAPSHOT",org.drools.lang.d
+ sl;version="5.1.0.SNAPSHOT",org.drools.commons.jci.problems;version="
+ 5.1.0.SNAPSHOT",org.drools.commons.jci.readers;version="5.1.0.SNAPSHO
+ T",org.drools.commons.jci.stores;version="5.1.0.SNAPSHOT",org.drools.
+ lang;version="5.1.0.SNAPSHOT"
 Tool: Bnd-0.0.357
 Bundle-Name: Drools :: Compiler
 Created-By: 1.6.0_18 (Sun Microsystems Inc.)
@@ -82,7 +59,7 @@
 Bundle-Vendor: JBoss Inc.
 DynamicImport-Package: *
 Bundle-Version: 5.1.0.SNAPSHOT
-Bnd-LastModified: 1264632495664
+Bnd-LastModified: 1265079373773
 Bundle-Activator: org.drools.osgi.compiler.Activator
 Bundle-ManifestVersion: 2
 Bundle-Description: A rule production system
@@ -96,11 +73,12 @@
  ;provider=jasper;version="3.3",org.eclipse.jdt.internal.compiler.clas
  sfmt;provider=jasper;version="3.3",org.eclipse.jdt.internal.compiler.
  env;provider=jasper;version="3.3",org.eclipse.jdt.internal.compiler.p
- roblem;provider=jasper;version="3.3",org.mvel2,org.mvel2.ast,org.mvel
- 2.compiler,org.mvel2.integration,org.mvel2.integration.impl,org.mvel2
- .optimizers,org.mvel2.templates,org.mvel2.util,org.osgi.framework;ver
- sion="1.5",org.osgi.util.tracker;version="1.4",org.w3c.dom,org.xml.sa
- x
+ roblem;provider=jasper;version="3.3",org.mvel2;version="2.0",org.mvel
+ 2.ast;version="2.0",org.mvel2.compiler;version="2.0",org.mvel2.integr
+ ation;version="2.0",org.mvel2.integration.impl;version="2.0",org.mvel
+ 2.optimizers;version="2.0",org.mvel2.templates;version="2.0",org.mvel
+ 2.util;version="2.0",org.osgi.framework;version="1.5",org.osgi.util.t
+ racker;version="1.4",org.w3c.dom,org.xml.sax
 Bundle-SymbolicName: org.drools.compiler
 Bundle-DocURL: http://www.jboss.org/
 

Modified: labs/jbossrules/trunk/drools-compiler/pom.xml
===================================================================
--- labs/jbossrules/trunk/drools-compiler/pom.xml	2010-02-02 03:11:50 UTC (rev 31352)
+++ labs/jbossrules/trunk/drools-compiler/pom.xml	2010-02-02 03:56:29 UTC (rev 31353)
@@ -190,14 +190,16 @@
             </executions>
             <configuration>
                <manifestLocation>META-INF</manifestLocation>
-               <instructions>&lt;_removeheaders&gt;Ignore-Package&lt;/_removeheaders&gt; 
-               <Require-Bundle>org.drools.core;bundle-version="${pom.version}"</Require-Bundle>
-               <Import-Package>!org.drools.*, *</Import-Package>
-               <Export-Package>!org.drools.commons.*, !org.drools.lang.*, org.drools.builder.impl, 
-               <!-- add this one manually as BND seems to miss it out -->
-               org.drools.*</Export-Package>
-               <DynamicImport-Package>*</DynamicImport-Package>
-               <Bundle-Activator>org.drools.osgi.compiler.Activator</Bundle-Activator></instructions>
+               <instructions>
+                  <_removeheaders>Ignore-Package</_removeheaders> 
+                  <Require-Bundle>org.drools.core;bundle-version="${pom.version}"</Require-Bundle>
+                  <Import-Package>!org.drools.*, *</Import-Package>
+                  <Export-Package>!org.drools.commons.*, !org.drools.lang.*, org.drools.builder.impl, 
+                  <!-- add this one manually as BND seems to miss it out -->
+                  org.drools.*</Export-Package>
+                  <DynamicImport-Package>*</DynamicImport-Package>
+                  <Bundle-Activator>org.drools.osgi.compiler.Activator</Bundle-Activator>
+               </instructions>
             </configuration>
          </plugin>
       </plugins>

Modified: labs/jbossrules/trunk/drools-core/META-INF/MANIFEST.MF
===================================================================
--- labs/jbossrules/trunk/drools-core/META-INF/MANIFEST.MF	2010-02-02 03:11:50 UTC (rev 31352)
+++ labs/jbossrules/trunk/drools-core/META-INF/MANIFEST.MF	2010-02-02 03:56:29 UTC (rev 31353)
@@ -257,49 +257,9 @@
  ols,org.drools.command.runtime,org.drools.rule,org.drools.time,org.dr
  ools.runtime.impl";version="5.1.0.SNAPSHOT",org.drools.concurrent;use
  s:="org.drools,org.drools.spi";version="5.1.0.SNAPSHOT"
-Ignore-Package: org.drools.conf,org.drools.process.core.impl,org.drool
- s.command.assertion,org.drools.workflow.instance.context,org.drools.d
- efinition.process,org.drools.runtime.pipeline.impl,org.drools.conflic
- t,org.drools.time.impl,org.drools.process.instance.impl.humantask,org
- .drools.process.instance.context,org.drools.base.field,org.drools.bas
- e.extractors,org.drools.workflow.instance.impl,org.drools.ruleflow.co
- re,org.drools.event.rule.impl,org.drools.base.evaluators,org.drools.d
- efinition,org.drools.definitions.impl,org.drools.process.core.event,o
- rg.drools.process.instance.event,org.drools.definition.type,org.drool
- s.ruleflow.core.validation,org.drools.process.instance.context.variab
- le,org.drools.command.runtime,org.drools.process.instance.context.exc
- eption,org.drools.command,org.drools.management,org.drools.process.co
- re.context.variable,org.drools.definitions.rule.impl,org.drools.workf
- low.instance.node,org.drools.process.instance.impl,org.drools.event.p
- rocess.impl,org.drools.process.core.validation.impl,org.drools.proces
- s.instance.timer,org.drools.logger,org.drools.base,org.drools.workflo
- w.instance,org.drools.visualize,org.drools.util.debug,org.drools.proc
- ess.core,org.drools.event.rule,org.drools.process.core.datatype.impl.
- type,org.drools.event.process,org.drools.common,org.drools.process.in
- stance.impl.factory,org.drools.workflow.instance.impl.factory,org.dro
- ols.command.runtime.rule,org.drools.agent,org.drools.xml.changeset,or
- g.drools.command.impl,org.drools.event.io,org.drools.audit.event,org.
- drools.process.instance.context.swimlane,org.drools.runtime,org.drool
- s.marshalling,org.drools.util.asm,org.drools.base.dataproviders,org.d
- rools.builder.conf.impl,org.drools,org.drools.util,org.drools.type,or
- g.drools.workflow.core,org.drools.builder,org.drools.workflow.core.im
- pl,org.drools.process.core.validation,org.drools.command.runtime.proc
- ess,org.drools.runtime.process,org.drools.process.core.datatype.impl,
- org.drools.rule,org.drools.runtime.help,org.drools.spi,org.drools.tim
- e,org.drools.xml,org.drools.audit,org.drools.process.core.context.exc
- eption,org.drools.impl,org.drools.osgi.core,org.drools.event.knowlege
- base.impl,org.drools.ruleflow.core.factory,org.drools.process.core.co
- ntext.swimlane,org.drools.workflow.core.node,org.drools.process.insta
- nce,org.drools.command.builder,org.drools.process.core.timer,org.droo
- ls.io.impl,org.drools.event,org.drools.base.mvel,org.drools.event.kno
- wledgebase,org.drools.runtime.impl,org.drools.base.accumulators,org.d
- rools.runtime.rule.impl,org.drools.facttemplates,org.drools.process.c
- ore.datatype,org.drools.runtime.conf,org.drools.definition.rule,org.d
- rools.factmodel,org.drools.ruleflow.instance,org.drools.runtime.rule,
- org.drools.marshalling.impl,org.drools.vsm,org.drools.process.instanc
- e.impl.demo,org.drools.process.core.context,org.drools.agent.impl,org
- .drools.io,org.drools.runtime.pipeline,org.drools.runtime.help.impl,o
- rg.drools.io.internal,org.drools.concurrent
+Private-Package: org.drools.reteoo;version="5.1.0.SNAPSHOT",.;version=
+ "5.1.0.SNAPSHOT",org.drools.reteoo.compiled;version="5.1.0.SNAPSHOT",
+ org.drools.reteoo.builder;version="5.1.0.SNAPSHOT"
 Tool: Bnd-0.0.357
 Bundle-Name: Drools :: Core
 Created-By: 1.6.0_18 (Sun Microsystems Inc.)
@@ -308,7 +268,7 @@
 Bundle-Vendor: JBoss Inc.
 DynamicImport-Package: *
 Bundle-Version: 5.1.0.SNAPSHOT
-Bnd-LastModified: 1264724432806
+Bnd-LastModified: 1265079316810
 Bundle-Activator: org.drools.osgi.core.Activator
 Bundle-ManifestVersion: 2
 Bundle-Description: A rule production system

Modified: labs/jbossrules/trunk/drools-core/pom.xml
===================================================================
--- labs/jbossrules/trunk/drools-core/pom.xml	2010-02-02 03:11:50 UTC (rev 31352)
+++ labs/jbossrules/trunk/drools-core/pom.xml	2010-02-02 03:56:29 UTC (rev 31353)
@@ -71,12 +71,14 @@
             </executions>
             <configuration>
                <manifestLocation>META-INF</manifestLocation>
-               <instructions>&lt;_removeheaders&gt;Ignore-Package&lt;/_removeheaders&gt; 
-               <Require-Bundle>org.drools.api;visibility:=reexport;bundle-version="${pom.version}"</Require-Bundle>
-               <Import-Package>!org.drools.*, *</Import-Package>
-               <Export-Package>!org.drools.reteoo.*, org.drools.*</Export-Package>
-               <DynamicImport-Package>*</DynamicImport-Package>
-               <Bundle-Activator>org.drools.osgi.core.Activator</Bundle-Activator></instructions>
+               <instructions>
+                  <_removeheaders>Ignore-Package</_removeheaders> 
+                  <Require-Bundle>org.drools.api;visibility:=reexport;bundle-version="${pom.version}"</Require-Bundle>
+                  <Import-Package>!org.drools.*, *</Import-Package>
+                  <Export-Package>!org.drools.reteoo.*, org.drools.*</Export-Package>
+                  <DynamicImport-Package>*</DynamicImport-Package>
+                  <Bundle-Activator>org.drools.osgi.core.Activator</Bundle-Activator>
+                </instructions>
             </configuration>
          </plugin>
          <plugin>

Added: labs/jbossrules/trunk/drools-persistence-jpa/META-INF/MANIFEST.MF
===================================================================
--- labs/jbossrules/trunk/drools-persistence-jpa/META-INF/MANIFEST.MF	                        (rev 0)
+++ labs/jbossrules/trunk/drools-persistence-jpa/META-INF/MANIFEST.MF	2010-02-02 03:56:29 UTC (rev 31353)
@@ -0,0 +1,30 @@
+Manifest-Version: 1.0
+Export-Package: org.drools.persistence.processinstance;uses:="javax.pe
+ rsistence,org.drools.persistence.processinstance.variabletypes,org.hi
+ bernate.annotations,org.drools.persistence.processinstance.persisters
+ ";version="5.1.0.SNAPSHOT",org.drools.persistence.jpa.impl;uses:="org
+ .drools.persistence.processinstance,org.drools.persistence.session";v
+ ersion="5.1.0.SNAPSHOT",org.drools.persistence.processinstance.persis
+ ters;uses:="org.drools.persistence.processinstance.variabletypes,java
+ x.persistence";version="5.1.0.SNAPSHOT",org.drools.persistence.proces
+ sinstance.variabletypes;uses:="javax.persistence";version="5.1.0.SNAP
+ SHOT",org.drools.persistence.session;uses:="javax.persistence,org.dro
+ ols.persistence.processinstance,javax.transaction,javax.naming,org.ap
+ ache.commons.collections.map";version="5.1.0.SNAPSHOT"
+Tool: Bnd-0.0.357
+Bundle-Name: Drools :: Persistence :: JPA
+Created-By: 1.6.0_18 (Sun Microsystems Inc.)
+Require-Bundle: org.drools.api;visibility:=reexport;bundle-version="5.
+ 1.0.SNAPSHOT"
+Bundle-Vendor: JBoss Inc.
+DynamicImport-Package: *
+Bundle-Version: 5.1.0.SNAPSHOT
+Bnd-LastModified: 1264901969905
+Bundle-ManifestVersion: 2
+Bundle-Description: A rule production system
+Bundle-License: http://www.apache.org/licenses/LICENSE-2.0.txt
+Import-Package: javax.naming,javax.persistence,javax.transaction,
+ org.apache.commons.collections.map,org.hibernate.annotations
+Bundle-SymbolicName: org.drools.persistence-jpa
+Bundle-DocURL: http://www.jboss.org/
+

Added: labs/jbossrules/trunk/drools-persistence-jpa/build.properties
===================================================================
--- labs/jbossrules/trunk/drools-persistence-jpa/build.properties	                        (rev 0)
+++ labs/jbossrules/trunk/drools-persistence-jpa/build.properties	2010-02-02 03:56:29 UTC (rev 31353)
@@ -0,0 +1,12 @@
+src.includes = .,\
+               build.properties,\
+               META-INF/,\
+               src/,\
+               pom.xml
+bin.includes = .,\
+               META-INF/,\
+               build.properties               
+source.. = src/main/java/,\
+           src/main/resources/
+output.. = target/classes/     
+jars.compile.order = .          

Modified: labs/jbossrules/trunk/drools-persistence-jpa/pom.xml
===================================================================
--- labs/jbossrules/trunk/drools-persistence-jpa/pom.xml	2010-02-02 03:11:50 UTC (rev 31352)
+++ labs/jbossrules/trunk/drools-persistence-jpa/pom.xml	2010-02-02 03:56:29 UTC (rev 31353)
@@ -12,6 +12,45 @@
   <packaging>jar</packaging>
   <name>Drools :: Persistence :: JPA</name> 
     
+   <build>
+      <plugins>
+         <plugin>
+            <artifactId>maven-jar-plugin</artifactId>
+            <configuration>
+               <archive>
+                  <manifestFile>META-INF/MANIFEST.MF</manifestFile>
+               </archive>
+            </configuration>
+         </plugin>
+         <plugin>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>maven-bundle-plugin</artifactId>
+            <version>2.0.1</version>
+            <extensions>true</extensions>
+            <executions>
+               <execution>
+                  <id>manifest</id>
+                  <phase>process-classes</phase>
+                  <goals>
+                     <goal>manifest</goal>
+                  </goals>
+               </execution>
+            </executions>
+            <configuration>
+               <manifestLocation>META-INF</manifestLocation>
+               <instructions>
+                  <_removeheaders>Ignore-Package</_removeheaders> 
+                  <Require-Bundle>org.drools.api;visibility:=reexport;bundle-version="${pom.version}"</Require-Bundle>
+                  <Import-Package>!org.drools.*, *</Import-Package>
+                  <Export-Package> org.drools.*</Export-Package>
+                  <DynamicImport-Package>*</DynamicImport-Package>
+                  <!--Bundle-Activator>org.drools.osgi.core.Activator</Bundle-Activator-->
+               </instructions>
+            </configuration>
+         </plugin>
+      </plugins>
+   </build>    
+    
       <dependencies> 	       
     	<dependency>
     		<groupId>org.drools</groupId>
@@ -91,12 +130,6 @@
     		<version>3.4.GA</version>
     	</dependency>
 
-     	<dependency>
-    		<groupId>commons-collections</groupId>
-    		<artifactId>commons-collections</artifactId>
-    		<version>3.2</version>
-    	</dependency>
-
     	<dependency>
     		<groupId>javax.transaction</groupId>
     		<artifactId>jta</artifactId>
@@ -109,7 +142,31 @@
 		    <version>1.3.2</version>    	
 		    <scope>test</scope>
     	</dependency>    	
+    	
+        <!--dependency>  
+           <groupId>org.objectweb.jotm</groupId>  
+           <artifactId>com.springsource.org.objectweb.jotm</artifactId>  
+           <version>2.0.10</version>
+        </dependency>  	
+        
+        <dependency>  
+           <groupId>com.experlog.xapool</groupId>  
+           <artifactId>com.springsource.org.enhydra.jdbc</artifactId>  
+           <version>1.5.0</version> 
+       </dependency>        
+       
+      <dependency>  
+         <groupId>org.apache.directory</groupId>  
+         <artifactId>com.springsource.org.apache.directory.server.jndi</artifactId>  
+         <version>1.0.2</version> 
+      </dependency>       
 
+      <dependency>  
+          <groupId>javax.resource</groupId>  
+          <artifactId>com.springsource.javax.resource</artifactId>  
+          <version>1.5.0</version> 
+      </dependency-->
+
       </dependencies>              
                   
 </project>

Added: labs/jbossrules/trunk/drools-persistence-jpa/src/main/java/org/drools/persistence/processinstance/EventType.java
===================================================================
--- labs/jbossrules/trunk/drools-persistence-jpa/src/main/java/org/drools/persistence/processinstance/EventType.java	                        (rev 0)
+++ labs/jbossrules/trunk/drools-persistence-jpa/src/main/java/org/drools/persistence/processinstance/EventType.java	2010-02-02 03:56:29 UTC (rev 31353)
@@ -0,0 +1,80 @@
+/**
+ * 
+ */
+package org.drools.persistence.processinstance;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.ManyToOne;
+
+ at Entity
+public class EventType {
+    @Id
+    @GeneratedValue(strategy = GenerationType.AUTO)
+    private int    id;
+    
+//    @ManyToOne
+//    private long    processInstanceId;
+    
+    private String name;
+
+    public EventType() {
+
+    }
+//
+//    public EventType(long    processInstanceId, String name) {
+//        this.name = name;
+//        this.processInstanceId = processInstanceId;
+//    }
+    
+    public EventType(String name) {
+        this.name = name;
+    }
+    
+    public int getId() {
+        return id;
+    }
+
+    public void setId(int id) {
+        this.id = id;
+    }
+
+//    public long getProcessInstanceId() {
+//        return processInstanceId;
+//    }
+//
+//    public void setProcessInstanceId(long processInstanceId) {
+//        this.processInstanceId = processInstanceId;
+//    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((name == null) ? 0 : name.hashCode());
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if ( this == obj ) return true;
+        if ( obj == null ) return false;
+        if ( getClass() != obj.getClass() ) return false;
+        EventType other = (EventType) obj;
+        if ( name == null ) {
+            if ( other.name != null ) return false;
+        } else if ( !name.equals( other.name ) ) return false;
+        return true;
+    }
+ 
+}
\ No newline at end of file

Modified: labs/jbossrules/trunk/drools-persistence-jpa/src/main/java/org/drools/persistence/processinstance/ProcessInstanceInfo.java
===================================================================
--- labs/jbossrules/trunk/drools-persistence-jpa/src/main/java/org/drools/persistence/processinstance/ProcessInstanceInfo.java	2010-02-02 03:11:50 UTC (rev 31352)
+++ labs/jbossrules/trunk/drools-persistence-jpa/src/main/java/org/drools/persistence/processinstance/ProcessInstanceInfo.java	2010-02-02 03:56:29 UTC (rev 31353)
@@ -56,33 +56,40 @@
 @Entity
 public class ProcessInstanceInfo {
 
-    private static final String VARIABLE_SEPARATOR = ":";
+    private static final String               VARIABLE_SEPARATOR = ":";
 
     @Id
     @GeneratedValue(strategy = GenerationType.AUTO)
-    private  Long processInstanceId;
-    
+    private Long                              processInstanceId;
+
     @Version
     @Column(name = "OPTLOCK")
-    private int         version;
-    
-    private String processId;
-    private Date startDate;
-    private Date lastReadDate;
-    private Date lastModificationDate;
-    private int state;
+    private int                               version;
+
+    private String                            processId;
+    private Date                              startDate;
+    private Date                              lastReadDate;
+    private Date                              lastModificationDate;
+    private int                               state;
     // TODO How do I mark a process instance info as dirty when the process
-	// instance has changed (so that byte array is regenerated and saved) ?
-	private @Lob byte[] processInstanceByteArray;
-	private @CollectionOfElements Set<String> eventTypes = new HashSet<String>();
-	private @Transient ProcessInstance processInstance;
-	private @Transient Environment env;
-	@OneToMany(cascade = CascadeType.ALL)
-	@JoinColumn(name = "processId")
-	@MapKey(name = "name")
-	private Map<String, VariableInstanceInfo> variables =
-		new HashMap<String, VariableInstanceInfo>();
-	private boolean externalVariables = false;
+    // instance has changed (so that byte array is regenerated and saved) ?
+    private @Lob
+    byte[]                                    processInstanceByteArray;
+    
+//  @OneToMany(cascade = {CascadeType.PERSIST, CascadeType.MERGE})
+//  @JoinColumn(name = "processInstanceId")
+//  private Set<EventType>                    eventTypes         = new HashSet<EventType>();    
+    private @CollectionOfElements
+    Set<String>                               eventTypes         = new HashSet<String>();
+    private @Transient
+    ProcessInstance                           processInstance;
+    private @Transient
+    Environment                               env;
+    @OneToMany(cascade = CascadeType.ALL)
+    @JoinColumn(name = "processId")
+    @MapKey(name = "name")
+    private Map<String, VariableInstanceInfo> variables          = new HashMap<String, VariableInstanceInfo>();
+    private boolean                           externalVariables  = false;
 
     ProcessInstanceInfo() {
     }
@@ -93,12 +100,13 @@
         startDate = new Date();
     }
 
-	public ProcessInstanceInfo(ProcessInstance processInstance, Environment env) {
-		this.processInstance = processInstance;
-		this.processId = processInstance.getProcessId();
-		startDate = new Date();
-		this.env = env;
-	}
+    public ProcessInstanceInfo(ProcessInstance processInstance,
+                               Environment env) {
+        this.processInstance = processInstance;
+        this.processId = processInstance.getProcessId();
+        startDate = new Date();
+        this.env = env;
+    }
 
     public long getId() {
         return processInstanceId;
@@ -128,313 +136,288 @@
         return state;
     }
 
-	public ProcessInstance getProcessInstance(WorkingMemory workingMemory, Environment env) {
-		this.env = env;
-        if (processInstance == null) {
+    public ProcessInstance getProcessInstance(WorkingMemory workingMemory,
+                                              Environment env) {
+        this.env = env;
+        if ( processInstance == null ) {
             try {
-				ByteArrayInputStream bais =
-					new ByteArrayInputStream(processInstanceByteArray);
-                MarshallerReaderContext context = new MarshallerReaderContext(
-					bais, (InternalRuleBase) workingMemory.getRuleBase(),
-					null, null);
+                ByteArrayInputStream bais = new ByteArrayInputStream( processInstanceByteArray );
+                MarshallerReaderContext context = new MarshallerReaderContext( bais,
+                                                                               (InternalRuleBase) workingMemory.getRuleBase(),
+                                                                               null,
+                                                                               null );
                 context.wm = (InternalWorkingMemory) workingMemory;
-                ProcessInstanceMarshaller marshaller = getMarshallerFromContext(context);
-				processInstance = marshaller.readProcessInstance(context, !externalVariables);
-				if (externalVariables) {
-					restoreVariables();
-				}
+                ProcessInstanceMarshaller marshaller = getMarshallerFromContext( context );
+                processInstance = marshaller.readProcessInstance( context,
+                                                                  !externalVariables );
+                if ( externalVariables ) {
+                    restoreVariables();
+                }
                 context.close();
-            } catch (IOException e) {
+            } catch ( IOException e ) {
                 e.printStackTrace();
-                throw new IllegalArgumentException(
-					"IOException while loading process instance: " + e.getMessage(), e);
+                throw new IllegalArgumentException( "IOException while loading process instance: " + e.getMessage(),
+                                                    e );
             }
         }
         return processInstance;
     }
 
-	private void restoreVariables() {
-		for (Map.Entry<String, VariableInstanceInfo> entry : variables.entrySet()) {
-			String[] variableHierarchy = entry.getKey().split(VARIABLE_SEPARATOR);
-			// last one is variable name
-			String variableName = variableHierarchy[variableHierarchy.length - 1];
-			// other ones are parent ids
-			List<Long> parentIds = new ArrayList<Long>();
-			for (int i = 0; i < variableHierarchy.length - 1; i++) {
-				parentIds.add(Long.valueOf(variableHierarchy[i]));
-			}
-			restoreVariable(entry.getValue(), parentIds, variableName,
-				(WorkflowProcessInstance) processInstance);
-		}
-	}
+    private void restoreVariables() {
+        for ( Map.Entry<String, VariableInstanceInfo> entry : variables.entrySet() ) {
+            String[] variableHierarchy = entry.getKey().split( VARIABLE_SEPARATOR );
+            // last one is variable name
+            String variableName = variableHierarchy[variableHierarchy.length - 1];
+            // other ones are parent ids
+            List<Long> parentIds = new ArrayList<Long>();
+            for ( int i = 0; i < variableHierarchy.length - 1; i++ ) {
+                parentIds.add( Long.valueOf( variableHierarchy[i] ) );
+            }
+            restoreVariable( entry.getValue(),
+                             parentIds,
+                             variableName,
+                             (WorkflowProcessInstance) processInstance );
+        }
+    }
 
-	private void restoreVariable(VariableInstanceInfo variableInfo,
-			List<Long> parentIds, String variableName,
-			NodeInstanceContainer nodeInstanceContainer)
-			throws NumberFormatException {
-		if (parentIds.size() == 0) {
-			if (!(nodeInstanceContainer instanceof ContextableInstance)) {
-				throw new IllegalArgumentException(
-						"Parent node instance is not a contextable instance: "
-								+ nodeInstanceContainer);
-			}
-			VariableScopeInstance variableScopeInstance = (VariableScopeInstance)
-				((ContextableInstance) nodeInstanceContainer)
-					.getContextInstance(VariableScope.VARIABLE_SCOPE);
-			VariablePersistenceStrategy persistenceStrategy =
-				VariablePersistenceStrategyFactory.getVariablePersistenceStrategy();
-			Object value = persistenceStrategy.getVariable(variableInfo, this.env);
-			System.out.println(">>>>> Restoring variable " + variableName + " = " + value);
-			variableScopeInstance.setVariable(variableName, value);
-		} else {
-			Long nodeInstanceId = parentIds.get(0);
-			// find the node and get the variableScopeInstance and insert the
-			// variable..
-			Collection<NodeInstance> nodeInstances =
-				nodeInstanceContainer.getNodeInstances();
-			for (NodeInstance nodeInstance : nodeInstances) {
-				if (nodeInstance.getId() == nodeInstanceId) {
-					parentIds.remove(0);
-					if (!(nodeInstance instanceof NodeInstanceContainer)) {
-						throw new IllegalArgumentException(
-							"Restoring variable " + variableName + 
-							" but node found is not a node instance container:" +
-							nodeInstance);
-					}
-					restoreVariable(variableInfo, parentIds, variableName,
-						(NodeInstanceContainer) nodeInstance);
-				}
-				return;
-			}
-			throw new IllegalArgumentException("Could not find node instance "
-				+ nodeInstanceId + " in " + nodeInstanceContainer);
-		}
-	}
+    private void restoreVariable(VariableInstanceInfo variableInfo,
+                                 List<Long> parentIds,
+                                 String variableName,
+                                 NodeInstanceContainer nodeInstanceContainer) throws NumberFormatException {
+        if ( parentIds.size() == 0 ) {
+            if ( !(nodeInstanceContainer instanceof ContextableInstance) ) {
+                throw new IllegalArgumentException( "Parent node instance is not a contextable instance: " + nodeInstanceContainer );
+            }
+            VariableScopeInstance variableScopeInstance = (VariableScopeInstance) ((ContextableInstance) nodeInstanceContainer).getContextInstance( VariableScope.VARIABLE_SCOPE );
+            VariablePersistenceStrategy persistenceStrategy = VariablePersistenceStrategyFactory.getVariablePersistenceStrategy();
+            Object value = persistenceStrategy.getVariable( variableInfo,
+                                                            this.env );
+            System.out.println( ">>>>> Restoring variable " + variableName + " = " + value );
+            variableScopeInstance.setVariable( variableName,
+                                               value );
+        } else {
+            Long nodeInstanceId = parentIds.get( 0 );
+            // find the node and get the variableScopeInstance and insert the
+            // variable..
+            Collection<NodeInstance> nodeInstances = nodeInstanceContainer.getNodeInstances();
+            for ( NodeInstance nodeInstance : nodeInstances ) {
+                if ( nodeInstance.getId() == nodeInstanceId ) {
+                    parentIds.remove( 0 );
+                    if ( !(nodeInstance instanceof NodeInstanceContainer) ) {
+                        throw new IllegalArgumentException( "Restoring variable " + variableName + " but node found is not a node instance container:" + nodeInstance );
+                    }
+                    restoreVariable( variableInfo,
+                                     parentIds,
+                                     variableName,
+                                     (NodeInstanceContainer) nodeInstance );
+                }
+                return;
+            }
+            throw new IllegalArgumentException( "Could not find node instance " + nodeInstanceId + " in " + nodeInstanceContainer );
+        }
+    }
 
-    private ProcessInstanceMarshaller getMarshallerFromContext(
-            MarshallerReaderContext context) throws IOException {
+    private ProcessInstanceMarshaller getMarshallerFromContext(MarshallerReaderContext context) throws IOException {
         ObjectInputStream stream = context.stream;
         String processInstanceType = stream.readUTF();
-        return ProcessMarshallerRegistry.INSTANCE
-                .getMarshaller(processInstanceType);
+        return ProcessMarshallerRegistry.INSTANCE.getMarshaller( processInstanceType );
     }
 
     private void saveProcessInstanceType(MarshallerWriteContext context,
-            ProcessInstance processInstance, String processInstanceType)
-            throws IOException {
+                                         ProcessInstance processInstance,
+                                         String processInstanceType) throws IOException {
         ObjectOutputStream stream = context.stream;
         // saves the processInstance type first
-        stream.writeUTF(processInstanceType);
+        stream.writeUTF( processInstanceType );
     }
 
     @PreUpdate
     public void update() {
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
-		boolean variablesChanged = false;
+        boolean variablesChanged = false;
         try {
-            MarshallerWriteContext context = new MarshallerWriteContext(baos,
-                    null, null, null, null);
-			String processType = ((ProcessInstanceImpl) processInstance)
-					.getProcess().getType();
-			saveProcessInstanceType(context, processInstance, processType);
-			ProcessInstanceMarshaller marshaller = ProcessMarshallerRegistry.INSTANCE
-				.getMarshaller(processType);
-			externalVariables = VariablePersistenceStrategyFactory.getVariablePersistenceStrategy().isEnabled();
-			marshaller.writeProcessInstance(context, processInstance, !externalVariables);
-			if (externalVariables) {
-				variablesChanged = persistVariables();
-			}
+            MarshallerWriteContext context = new MarshallerWriteContext( baos,
+                                                                         null,
+                                                                         null,
+                                                                         null,
+                                                                         null );
+            String processType = ((ProcessInstanceImpl) processInstance).getProcess().getType();
+            saveProcessInstanceType( context,
+                                     processInstance,
+                                     processType );
+            ProcessInstanceMarshaller marshaller = ProcessMarshallerRegistry.INSTANCE.getMarshaller( processType );
+            externalVariables = VariablePersistenceStrategyFactory.getVariablePersistenceStrategy().isEnabled();
+            marshaller.writeProcessInstance( context,
+                                             processInstance,
+                                             !externalVariables );
+            if ( externalVariables ) {
+                variablesChanged = persistVariables();
+            }
             context.close();
-        } catch (IOException e) {
-            throw new IllegalArgumentException(
-                    "IOException while storing process instance "
-                            + processInstance.getId() + ": " + e.getMessage());
+        } catch ( IOException e ) {
+            throw new IllegalArgumentException( "IOException while storing process instance " + processInstance.getId() + ": " + e.getMessage() );
         }
         byte[] newByteArray = baos.toByteArray();
-		if (variablesChanged
-				|| !Arrays.equals(newByteArray, processInstanceByteArray)) {
+        if ( variablesChanged || !Arrays.equals( newByteArray,
+                                                 processInstanceByteArray ) ) {
             this.state = processInstance.getState();
             this.lastModificationDate = new Date();
             this.processInstanceByteArray = newByteArray;
             this.eventTypes.clear();
-            for (String type : processInstance.getEventTypes()) {
-                eventTypes.add(type);
+            for ( String type : processInstance.getEventTypes() ) {
+                eventTypes.add( type );
             }
         }
-	}
+    }
 
-        private boolean persistVariables() {
-		// Get Process Variables
-		VariableScopeInstance variableScopeInstance = (VariableScopeInstance) ((WorkflowProcessInstanceImpl) this.processInstance)
-			.getContextInstance(VariableScope.VARIABLE_SCOPE);
-		Map<String, Object> processVariables = variableScopeInstance.getVariables();
-		Map<String, VariableInstanceInfo> newVariables = new HashMap<String, VariableInstanceInfo>();
-		// persist process variables
-		persist(processVariables, "", newVariables);
-		// persist variables in nested variable scopes
-		Collection<NodeInstance> nodeInstances =
-			((WorkflowProcessInstanceImpl) this.processInstance).getNodeInstances();
-		if (nodeInstances.size() > 0) {
-			persistNodeVariables(nodeInstances, "", newVariables);
-                }
-		if (newVariables.size() > 0 || this.variables.size() > 0) {
-			// clear variables so unnecessary values are removed
-			this.variables.clear();
-			this.variables.putAll(newVariables);
-			// TODO: how can I know that no variables were changed?
-			return true;
-		} else {
-			return false;
-                }
-	}
+    private boolean persistVariables() {
+        // Get Process Variables
+        VariableScopeInstance variableScopeInstance = (VariableScopeInstance) ((WorkflowProcessInstanceImpl) this.processInstance).getContextInstance( VariableScope.VARIABLE_SCOPE );
+        Map<String, Object> processVariables = variableScopeInstance.getVariables();
+        Map<String, VariableInstanceInfo> newVariables = new HashMap<String, VariableInstanceInfo>();
+        // persist process variables
+        persist( processVariables,
+                 "",
+                 newVariables );
+        // persist variables in nested variable scopes
+        Collection<NodeInstance> nodeInstances = ((WorkflowProcessInstanceImpl) this.processInstance).getNodeInstances();
+        if ( nodeInstances.size() > 0 ) {
+            persistNodeVariables( nodeInstances,
+                                  "",
+                                  newVariables );
+        }
+        if ( newVariables.size() > 0 || this.variables.size() > 0 ) {
+            // clear variables so unnecessary values are removed
+            this.variables.clear();
+            this.variables.putAll( newVariables );
+            // TODO: how can I know that no variables were changed?
+            return true;
+        } else {
+            return false;
+        }
+    }
 
-	private void persist(Map<String, Object> variables, String prefix, Map<String, VariableInstanceInfo> newVariables) {
-		VariablePersistenceStrategy persistenceStrategy =
-			VariablePersistenceStrategyFactory.getVariablePersistenceStrategy();
-		for (Map.Entry<String, Object> entries : variables.entrySet()) {
-			String variableName = prefix + entries.getKey();
-			Object value = entries.getValue();
-			VariableInstanceInfo oldValue = this.variables.get(variableName);
-			VariableInstanceInfo variable = persistenceStrategy
-				.persistVariable(variableName, value, oldValue, this.env);
+    private void persist(Map<String, Object> variables,
+                         String prefix,
+                         Map<String, VariableInstanceInfo> newVariables) {
+        VariablePersistenceStrategy persistenceStrategy = VariablePersistenceStrategyFactory.getVariablePersistenceStrategy();
+        for ( Map.Entry<String, Object> entries : variables.entrySet() ) {
+            String variableName = prefix + entries.getKey();
+            Object value = entries.getValue();
+            VariableInstanceInfo oldValue = this.variables.get( variableName );
+            VariableInstanceInfo variable = persistenceStrategy.persistVariable( variableName,
+                                                                                 value,
+                                                                                 oldValue,
+                                                                                 this.env );
 
-			if (variable != null) {
-                                System.out.println("<<<<< Persisting variable " + variableName + " = " + value);
-				newVariables.put(variableName, variable);
-			}else{
-                                System.out.println("<<<<< Variable " + variableName + " not persisted (value null)");
-                        }
-		}
-	}
+            if ( variable != null ) {
+                System.out.println( "<<<<< Persisting variable " + variableName + " = " + value );
+                newVariables.put( variableName,
+                                  variable );
+            } else {
+                System.out.println( "<<<<< Variable " + variableName + " not persisted (value null)" );
+            }
+        }
+    }
 
-	private void persistNodeVariables(Collection<NodeInstance> nodeInstances,
-			String parentPrefix, Map<String, VariableInstanceInfo> newVariables) {
-		for (NodeInstance nodeInstance : nodeInstances) {
-			String prefix = parentPrefix + nodeInstance.getId()
-					+ VARIABLE_SEPARATOR;
-			if (nodeInstance instanceof ContextInstanceContainer) {
-				List<ContextInstance> variableScopeInstances = ((ContextInstanceContainer) nodeInstance)
-						.getContextInstances(VariableScope.VARIABLE_SCOPE);
-				if (variableScopeInstances != null) {
-					for (ContextInstance contextInstance : variableScopeInstances) {
-						VariableScopeInstance variableScopeInstance = (VariableScopeInstance) contextInstance;
-						persist(variableScopeInstance.getVariables(), prefix, newVariables);
-					}
-				}
-			}
-			if (nodeInstance instanceof NodeInstanceContainer) {
-				Collection<NodeInstance> nodeInstancesInsideTheContainer = ((NodeInstanceContainer) nodeInstance)
-						.getNodeInstances();
-				persistNodeVariables(nodeInstancesInsideTheContainer, prefix, newVariables);
-			}
-		}
-	}
+    private void persistNodeVariables(Collection<NodeInstance> nodeInstances,
+                                      String parentPrefix,
+                                      Map<String, VariableInstanceInfo> newVariables) {
+        for ( NodeInstance nodeInstance : nodeInstances ) {
+            String prefix = parentPrefix + nodeInstance.getId() + VARIABLE_SEPARATOR;
+            if ( nodeInstance instanceof ContextInstanceContainer ) {
+                List<ContextInstance> variableScopeInstances = ((ContextInstanceContainer) nodeInstance).getContextInstances( VariableScope.VARIABLE_SCOPE );
+                if ( variableScopeInstances != null ) {
+                    for ( ContextInstance contextInstance : variableScopeInstances ) {
+                        VariableScopeInstance variableScopeInstance = (VariableScopeInstance) contextInstance;
+                        persist( variableScopeInstance.getVariables(),
+                                 prefix,
+                                 newVariables );
+                    }
+                }
+            }
+            if ( nodeInstance instanceof NodeInstanceContainer ) {
+                Collection<NodeInstance> nodeInstancesInsideTheContainer = ((NodeInstanceContainer) nodeInstance).getNodeInstances();
+                persistNodeVariables( nodeInstancesInsideTheContainer,
+                                      prefix,
+                                      newVariables );
+            }
+        }
+    }
 
-	public Map<String, VariableInstanceInfo> getVariables() {
-		return variables;
-	}
+    public Map<String, VariableInstanceInfo> getVariables() {
+        return variables;
+    }
 
-	public void setVariables(Map<String, VariableInstanceInfo> variables) {
-		this.variables = variables;
-	}
+    public void setVariables(Map<String, VariableInstanceInfo> variables) {
+        this.variables = variables;
+    }
 
-	@Override
-	public boolean equals(Object obj) {
-		if (obj == null) {
-			return false;
-		}
-		if (getClass() != obj.getClass()) {
-			return false;
-		}
-		final ProcessInstanceInfo other = (ProcessInstanceInfo) obj;
-		if (this.processInstanceId != other.processInstanceId
-				&& (this.processInstanceId == null || !this.processInstanceId
-						.equals(other.processInstanceId))) {
-			return false;
-		}
-		if (this.version != other.version) {
-			return false;
-		}
-		if ((this.processId == null) ? (other.processId != null)
-				: !this.processId.equals(other.processId)) {
-			return false;
-		}
-		if (this.startDate != other.startDate
-				&& (this.startDate == null || !this.startDate
-						.equals(other.startDate))) {
-			return false;
-		}
-		if (this.lastReadDate != other.lastReadDate
-				&& (this.lastReadDate == null || !this.lastReadDate
-						.equals(other.lastReadDate))) {
-			return false;
-		}
-		if (this.lastModificationDate != other.lastModificationDate
-				&& (this.lastModificationDate == null || !this.lastModificationDate
-						.equals(other.lastModificationDate))) {
-			return false;
-		}
-		if (this.state != other.state) {
-			return false;
-		}
-		if (!Arrays.equals(this.processInstanceByteArray,
-				other.processInstanceByteArray)) {
-			return false;
-		}
-		if (this.eventTypes != other.eventTypes
-				&& (this.eventTypes == null || !this.eventTypes
-						.equals(other.eventTypes))) {
-			return false;
-		}
-		if (this.processInstance != other.processInstance
-				&& (this.processInstance == null || !this.processInstance
-						.equals(other.processInstance))) {
-			return false;
-		}
-		if (this.env != other.env
-				&& (this.env == null || !this.env.equals(other.env))) {
-			return false;
-		}
-		if (this.variables != other.variables
-				&& (this.variables == null || !this.variables
-						.equals(other.variables))) {
-			return false;
-		}
-		return true;
-	}
+    @Override
+    public boolean equals(Object obj) {
+        if ( obj == null ) {
+            return false;
+        }
+        if ( getClass() != obj.getClass() ) {
+            return false;
+        }
+        final ProcessInstanceInfo other = (ProcessInstanceInfo) obj;
+        if ( this.processInstanceId != other.processInstanceId && (this.processInstanceId == null || !this.processInstanceId.equals( other.processInstanceId )) ) {
+            return false;
+        }
+        if ( this.version != other.version ) {
+            return false;
+        }
+        if ( (this.processId == null) ? (other.processId != null) : !this.processId.equals( other.processId ) ) {
+            return false;
+        }
+        if ( this.startDate != other.startDate && (this.startDate == null || !this.startDate.equals( other.startDate )) ) {
+            return false;
+        }
+        if ( this.lastReadDate != other.lastReadDate && (this.lastReadDate == null || !this.lastReadDate.equals( other.lastReadDate )) ) {
+            return false;
+        }
+        if ( this.lastModificationDate != other.lastModificationDate && (this.lastModificationDate == null || !this.lastModificationDate.equals( other.lastModificationDate )) ) {
+            return false;
+        }
+        if ( this.state != other.state ) {
+            return false;
+        }
+        if ( !Arrays.equals( this.processInstanceByteArray,
+                             other.processInstanceByteArray ) ) {
+            return false;
+        }
+        if ( this.eventTypes != other.eventTypes && (this.eventTypes == null || !this.eventTypes.equals( other.eventTypes )) ) {
+            return false;
+        }
+        if ( this.processInstance != other.processInstance && (this.processInstance == null || !this.processInstance.equals( other.processInstance )) ) {
+            return false;
+        }
+        if ( this.env != other.env && (this.env == null || !this.env.equals( other.env )) ) {
+            return false;
+        }
+        if ( this.variables != other.variables && (this.variables == null || !this.variables.equals( other.variables )) ) {
+            return false;
+        }
+        return true;
+    }
 
-	@Override
-	public int hashCode() {
-		int hash = 7;
-		hash = 61
-				* hash
-				+ (this.processInstanceId != null ? this.processInstanceId
-						.hashCode() : 0);
-		hash = 61 * hash + this.version;
-		hash = 61 * hash
-				+ (this.processId != null ? this.processId.hashCode() : 0);
-		hash = 61 * hash
-				+ (this.startDate != null ? this.startDate.hashCode() : 0);
-		hash = 61
-				* hash
-				+ (this.lastReadDate != null ? this.lastReadDate.hashCode() : 0);
-		hash = 61
-				* hash
-				+ (this.lastModificationDate != null ? this.lastModificationDate
-						.hashCode()
-						: 0);
-		hash = 61 * hash + this.state;
-		hash = 61 * hash + Arrays.hashCode(this.processInstanceByteArray);
-		hash = 61 * hash
-				+ (this.eventTypes != null ? this.eventTypes.hashCode() : 0);
-		hash = 61
-				* hash
-				+ (this.processInstance != null ? this.processInstance
-						.hashCode() : 0);
-		hash = 61 * hash + (this.env != null ? this.env.hashCode() : 0);
-		hash = 61 * hash
-				+ (this.variables != null ? this.variables.hashCode() : 0);
-		return hash;
-	}
+    @Override
+    public int hashCode() {
+        int hash = 7;
+        hash = 61 * hash + (this.processInstanceId != null ? this.processInstanceId.hashCode() : 0);
+        hash = 61 * hash + this.version;
+        hash = 61 * hash + (this.processId != null ? this.processId.hashCode() : 0);
+        hash = 61 * hash + (this.startDate != null ? this.startDate.hashCode() : 0);
+        hash = 61 * hash + (this.lastReadDate != null ? this.lastReadDate.hashCode() : 0);
+        hash = 61 * hash + (this.lastModificationDate != null ? this.lastModificationDate.hashCode() : 0);
+        hash = 61 * hash + this.state;
+        hash = 61 * hash + Arrays.hashCode( this.processInstanceByteArray );
+        hash = 61 * hash + (this.eventTypes != null ? this.eventTypes.hashCode() : 0);
+        hash = 61 * hash + (this.processInstance != null ? this.processInstance.hashCode() : 0);
+        hash = 61 * hash + (this.env != null ? this.env.hashCode() : 0);
+        hash = 61 * hash + (this.variables != null ? this.variables.hashCode() : 0);
+        return hash;
+    }
 
 }

Modified: labs/jbossrules/trunk/drools-persistence-jpa/src/main/java/org/drools/persistence/session/SingleSessionCommandService.java
===================================================================
--- labs/jbossrules/trunk/drools-persistence-jpa/src/main/java/org/drools/persistence/session/SingleSessionCommandService.java	2010-02-02 03:11:50 UTC (rev 31352)
+++ labs/jbossrules/trunk/drools-persistence-jpa/src/main/java/org/drools/persistence/session/SingleSessionCommandService.java	2010-02-02 03:56:29 UTC (rev 31353)
@@ -1,6 +1,7 @@
 package org.drools.persistence.session;
 
 import java.util.Date;
+import java.util.IdentityHashMap;
 import java.util.Map;
 
 import javax.naming.InitialContext;
@@ -13,7 +14,6 @@
 import javax.transaction.TransactionManager;
 import javax.transaction.UserTransaction;
 
-import org.apache.commons.collections.map.IdentityMap;
 import org.drools.KnowledgeBase;
 import org.drools.RuleBase;
 import org.drools.SessionConfiguration;
@@ -316,7 +316,7 @@
 
         Map map = (Map) env.get( "synchronizations" );
         if ( map == null ) {
-            map = new IdentityMap();
+            map = new IdentityHashMap();
             env.set( "synchronizations",
                      map );
         }

Modified: labs/jbossrules/trunk/drools-persistence-jpa/src/main/resources/META-INF/orm.xml
===================================================================
--- labs/jbossrules/trunk/drools-persistence-jpa/src/main/resources/META-INF/orm.xml	2010-02-02 03:11:50 UTC (rev 31352)
+++ labs/jbossrules/trunk/drools-persistence-jpa/src/main/resources/META-INF/orm.xml	2010-02-02 03:56:29 UTC (rev 31353)
@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
-               xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-               xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm orm_1_0.xsd"
-               version="1.0">  
+                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+                 xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm orm_1_0.xsd"
+                 version="1.0">  
       <named-query name="ProcessInstancesWaitingForEvent">
           <query>
 select 
@@ -10,7 +10,7 @@
 from 
     ProcessInstanceInfo processInstanceInfo
 where
-    :type in elements(processInstanceInfo.eventTypes)
+    :type in (processInstanceInfo.eventTypes.name)
           </query>
       </named-query>
 </entity-mappings>

Deleted: labs/jbossrules/trunk/drools-persistence-jpa/src/main/resources/META-INF/persistence.xml
===================================================================
--- labs/jbossrules/trunk/drools-persistence-jpa/src/main/resources/META-INF/persistence.xml	2010-02-02 03:11:50 UTC (rev 31352)
+++ labs/jbossrules/trunk/drools-persistence-jpa/src/main/resources/META-INF/persistence.xml	2010-02-02 03:56:29 UTC (rev 31353)
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:orm="http://java.sun.com/xml/ns/persistence/orm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence       http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd    http://java.sun.com/xml/ns/persistence/orm     http://java.sun.com/xml/ns/persistence/orm_1_0.xsd">
- <!--persistence-unit name="ProcessService">
-  <jta-data-source>java:/DefaultDS</jta-data-source>
-  <properties>
-   <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
-  </properties>
- </persistence-unit-->
-    <persistence-unit name="org.drools.persistence.jpa" transaction-type="JTA">
-        <provider>org.hibernate.ejb.HibernatePersistence</provider>
-        <jta-data-source>jdbc/testDS1</jta-data-source>        
-        <class>org.drools.persistence.session.SessionInfo</class>
-    <class>org.drools.persistence.processinstance.ProcessInstanceInfo</class>
-    
-    <class>org.drools.persistence.processinstance.variabletypes.JPAPersistedVariable</class>
-    <class>org.drools.persistence.processinstance.variabletypes.VariableInstanceInfo</class>
-    <class>org.drools.persistence.processinstance.variabletypes.SerializablePersistedVariable</class>
-    <class>org.drools.persistence.processinstance.WorkItemInfo</class>
-	    <properties>
-	        <property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>	        
-	        <property name="hibernate.max_fetch_depth" value="3"/>
-		    <property name="hibernate.hbm2ddl.auto" value="update" />
-            <property name="hibernate.show_sql" value="false" />	
-            <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.BTMTransactionManagerLookup" />
-	    </properties>        
-    </persistence-unit>
-</persistence>
\ No newline at end of file

Deleted: labs/jbossrules/trunk/drools-persistence-jpa/src/main/resources/jndi.properties
===================================================================
--- labs/jbossrules/trunk/drools-persistence-jpa/src/main/resources/jndi.properties	2010-02-02 03:11:50 UTC (rev 31352)
+++ labs/jbossrules/trunk/drools-persistence-jpa/src/main/resources/jndi.properties	2010-02-02 03:56:29 UTC (rev 31353)
@@ -1 +0,0 @@
-java.naming.factory.initial=bitronix.tm.jndi.BitronixInitialContextFactory
\ No newline at end of file

Modified: labs/jbossrules/trunk/drools-persistence-jpa/src/test/resources/META-INF/persistence.xml
===================================================================
--- labs/jbossrules/trunk/drools-persistence-jpa/src/test/resources/META-INF/persistence.xml	2010-02-02 03:11:50 UTC (rev 31352)
+++ labs/jbossrules/trunk/drools-persistence-jpa/src/test/resources/META-INF/persistence.xml	2010-02-02 03:56:29 UTC (rev 31353)
@@ -11,6 +11,7 @@
         <jta-data-source>jdbc/testDS1</jta-data-source>        
         <class>org.drools.persistence.session.SessionInfo</class>
     <class>org.drools.persistence.processinstance.ProcessInstanceInfo</class>
+    <class>org.drools.persistence.processinstance.EventType</class>
     <class>org.drools.persistence.session.MyEntity</class>
     <class>org.drools.persistence.session.MyEntityMethods</class>
     <class>org.drools.persistence.session.MyEntityOnlyFields</class>

Copied: labs/jbossrules/trunk/drools-persistence-jpa/src/test/resources/jndi.properties (from rev 31227, labs/jbossrules/trunk/drools-persistence-jpa/src/main/resources/jndi.properties)
===================================================================
--- labs/jbossrules/trunk/drools-persistence-jpa/src/test/resources/jndi.properties	                        (rev 0)
+++ labs/jbossrules/trunk/drools-persistence-jpa/src/test/resources/jndi.properties	2010-02-02 03:56:29 UTC (rev 31353)
@@ -0,0 +1 @@
+java.naming.factory.initial=bitronix.tm.jndi.BitronixInitialContextFactory
\ No newline at end of file

Modified: labs/jbossrules/trunk/drools-process/drools-bpmn2/pom.xml
===================================================================
--- labs/jbossrules/trunk/drools-process/drools-bpmn2/pom.xml	2010-02-02 03:11:50 UTC (rev 31352)
+++ labs/jbossrules/trunk/drools-process/drools-bpmn2/pom.xml	2010-02-02 03:56:29 UTC (rev 31353)
@@ -43,7 +43,7 @@
     <dependency>
       <groupId>org.codehaus.btm</groupId>
       <artifactId>btm</artifactId>
-      <version>1.3.2</version>    	
+      <version>1.3.3</version>    	
       <scope>test</scope>
     </dependency>    	
 



More information about the jboss-svn-commits mailing list