[jboss-jira] [JBoss JIRA] Commented: (JBRULES-2290) Remove org.drools.persistence.session.MyEntity definition from persistence.xml in drools-persistence-jpa module

Juraj Tomasov (JIRA) jira-events at lists.jboss.org
Fri Oct 9 05:52:05 EDT 2009


    [ https://jira.jboss.org/jira/browse/JBRULES-2290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12489127#action_12489127 ] 

Juraj Tomasov commented on JBRULES-2290:
----------------------------------------

Index: src/main/resources/META-INF/persistence.xml
===================================================================
--- src/main/resources/META-INF/persistence.xml	(revision 29567)
+++ src/main/resources/META-INF/persistence.xml	(working copy)
@@ -11,7 +11,6 @@
         <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.session.MyEntity</class>
     <class>org.drools.persistence.processinstance.variabletypes.JPAPersistedVariable</class>
     <class>org.drools.persistence.processinstance.variabletypes.VariableInstanceInfo</class>
 	    <properties>
Index: src/test/resources/META-INF/persistence.xml
===================================================================
--- src/test/resources/META-INF/persistence.xml	(revision 0)
+++ src/test/resources/META-INF/persistence.xml	(revision 0)
@@ -0,0 +1,25 @@
+<?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.session.MyEntity</class>
+    <class>org.drools.persistence.processinstance.variabletypes.JPAPersistedVariable</class>
+    <class>org.drools.persistence.processinstance.variabletypes.VariableInstanceInfo</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


> Remove org.drools.persistence.session.MyEntity definition from persistence.xml in drools-persistence-jpa module
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: JBRULES-2290
>                 URL: https://jira.jboss.org/jira/browse/JBRULES-2290
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: drools-process
>    Affects Versions: 5.1.0.M1
>            Reporter: Juraj Tomasov
>            Assignee: Mark Proctor
>            Priority: Critical
>             Fix For: 5.1.0.M2
>
>   Original Estimate: 30 minutes
>  Remaining Estimate: 30 minutes
>
> This bug occurs when drools-persistence-jpa module is running out of JUnit test.
> Quick description:
> org.drools.persistence.session.MyEntity is defined in src/test/java(test scope), persistence.xml in src/main/resources(production scope) and therefore drools-persistence-jpa module is not usable except for JUnit tests. The solution is to have another persistence.xml (with org.drools.persistence.session.MyEntity definition) in src/test/resources for JUnit tests.
> I propose to create integration Junit tests to cover such production/test configuration bugs.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list