[jboss-svn-commits] JBL Code SVN: r26247 - in labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects: src/main/java and 7 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Apr 24 12:14:57 EDT 2009


Author: whitingjr
Date: 2009-04-24 12:14:56 -0400 (Fri, 24 Apr 2009)
New Revision: 26247

Added:
   labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/main/java/basedata.xml
   labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/main/resources/auction/
   labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/main/resources/auction/test/
   labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/main/resources/auction/test/basedata.xml
   labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/main/resources/log4j.xml
   labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/main/resources/testsuite-integration-ejb3.xml
   labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/test/java/uk/ac/ncl/sdia/a8905943/mapping/
Removed:
   labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/main/java/uk/ac/ncl/sdia/a8905943/mapping/MappingHandles.java
   labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/main/resources/log4j.properties
Modified:
   labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/.classpath
   labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/pom.xml
   labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/main/java/uk/ac/ncl/sdia/a8905943/event/MVCCLoadEventListener.java
   labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/main/java/uk/ac/ncl/sdia/a8905943/mapping/MappingSessionMVCC.java
   labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/main/resources/META-INF/persistence.xml
Log:
Updated.

Modified: labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/.classpath
===================================================================
--- labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/.classpath	2009-04-24 15:58:43 UTC (rev 26246)
+++ labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/.classpath	2009-04-24 16:14:56 UTC (rev 26247)
@@ -1,13 +1,14 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <classpath>
-	<classpathentry kind="src" output="target/classes" path="src/main/java"/>
-	<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
-	<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+	<classpathentry kind="src" path="src/main/java"/>
+	<classpathentry excluding="**" kind="src" path="src/main/resources"/>
+	<classpathentry kind="src" path="src/test/java"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
-	<classpathentry kind="lib" path="/caveatemptor/lib/jboss-ejb3-all.jar" sourcepath="/home/whitingjr/eclipse/workspaces/red-hat/thirdparty/org/jboss/javaee/lib/jboss-ejb-api-sources.jar"/>
 	<classpathentry kind="var" path="hibernate-home/hibernate-entitymanager-3.3.2.GA/hibernate-entitymanager.jar" sourcepath="/hibernate-home/hibernate-entitymanager-3.3.2.GA/src"/>
 	<classpathentry kind="var" path="hibernate-home/hibernate-annotations-3.3.1.GA/hibernate-annotations.jar" sourcepath="/hibernate-home/hibernate-annotations-3.3.1.GA/src"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/multiverse"/>
+	<classpathentry kind="lib" path="/home/whitingjr/eclipse/workspaces/red-hat/caveatemptor/lib/thirdparty-all.jar"/>
+	<classpathentry kind="lib" path="/caveatemptor/lib/jboss-ejb3-all.jar" sourcepath="/home/whitingjr/eclipse/workspaces/red-hat/thirdparty/org/jboss/javaee/lib/jboss-ejb-api-sources.jar"/>
 	<classpathentry kind="output" path="target/classes"/>
 </classpath>

Modified: labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/pom.xml
===================================================================
--- labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/pom.xml	2009-04-24 15:58:43 UTC (rev 26246)
+++ labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/pom.xml	2009-04-24 16:14:56 UTC (rev 26247)
@@ -45,12 +45,40 @@
 			<artifactId>hibernate</artifactId>
 			<version>3.2.6.ga</version>
 		</dependency>
-		
-<dependency>
-  <groupId>javax.persistence</groupId>
-  <artifactId>persistence-api</artifactId>
-  <version>1.0</version>
-</dependency>
 
+		<dependency>
+			<groupId>javax.persistence</groupId>
+			<artifactId>persistence-api</artifactId>
+			<version>1.0</version>
+		</dependency>
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-api</artifactId>
+			<version>1.5.6</version>
+		</dependency>
+
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-log4j12</artifactId>
+			<version>1.5.6</version>
+		</dependency>
+
+		<dependency>
+			<groupId>oswego-concurrent</groupId>
+			<artifactId>concurrent</artifactId>
+			<version>1.3.4</version>
+		</dependency>
+
+		<dependency>
+			<groupId>apache-xerces</groupId>
+			<artifactId>xercesImpl</artifactId>
+			<version>2.7.0</version>
+		</dependency>
+
+		<dependency>
+			<groupId>commons-io</groupId>
+			<artifactId>commons-io</artifactId>
+			<version>1.4</version>
+		</dependency>
 	</dependencies>
 </project>
\ No newline at end of file

Added: labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/main/java/basedata.xml
===================================================================
--- labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/main/java/basedata.xml	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/main/java/basedata.xml	2009-04-24 16:14:56 UTC (rev 26247)
@@ -0,0 +1,168 @@
+<?xml version="1.0"?>
+
+<!--
+    Just a basic set of rows that are currently sufficient for all tests.
+    In future, maybe several datasets are required.
+-->
+<dataset>
+
+    <BILLING_DETAILS
+        BILLING_DETAILS_ID      ="1"
+        BILLING_DETAILS_TYPE    ="CC"
+        OBJ_VERSION             ="0"
+        OWNER                   ="John Doe"
+        CREATED                 ="2006-09-23 13:45:00"
+        USER_ID                 ="1"
+        BA_ACCOUNT              ="[NULL]"
+        BA_BANKNAME             ="[NULL]"
+        BA_SWIFT                ="[NULL]"
+    />
+
+    <CREDIT_CARD CREDIT_CARD_ID     ="1"
+                 CC_TYPE            ="MASTERCARD"
+                 CC_NUMBER          ="123123123123"
+                 CC_EXP_MONTH       ="08"
+                 CC_EXP_YEAR        ="2010"
+            />
+
+    <USERS
+        USER_ID             ="1"
+        OBJ_VERSION         ="0"
+        FIRSTNAME           ="John"
+        LASTNAME            ="Doe"
+        USERNAME            ="johndoe"
+        PASSWORD            ="secret"
+        EMAIL               ="jd at mail.tld"
+        RANK                ="0"
+        IS_ADMIN            ="true"
+        CREATED             ="2006-09-23 13:45:00"
+        HOME_STREET         ="Foostreet"
+        HOME_ZIPCODE        ="22222"
+        HOME_CITY           ="Foocity"
+        DEFAULT_BILLING_DETAILS_ID ="1"
+    />
+
+    <USERS
+        USER_ID             ="2"
+        OBJ_VERSION         ="0"
+        FIRSTNAME           ="Another"
+        LASTNAME            ="User"
+        USERNAME            ="anotheruser"
+        PASSWORD            ="secret"
+        EMAIL               ="anotheruser at mail.tld"
+        RANK                ="0"
+        IS_ADMIN            ="false"
+        CREATED             ="2006-09-23 13:45:00"
+        HOME_STREET         ="Foostreet"
+        HOME_ZIPCODE        ="22222"
+        HOME_CITY           ="Foocity"
+        DEFAULT_BILLING_DETAILS_ID ="[NULL]"
+    />
+
+    <ADDRESS
+        ADDRESS_ID      ="1"
+        OBJ_VERSION     ="0"
+        STREET          ="Shippingstreet 1"
+        ZIPCODE         ="12345"
+        CITY            ="Shippingcity"
+    />
+
+    <ITEM
+        ITEM_ID                 ="1"
+        OBJ_VERSION             ="0"
+        ITEM_NAME               ="Testitem 1"
+        DESCRIPTION             ="This is TestItem One."
+        INITIAL_PRICE           ="99"
+        INITIAL_PRICE_CURRENCY  ="USD"
+        RESERVE_PRICE           ="123"
+        RESERVE_PRICE_CURRENCY  ="USD"
+        START_DATE              ="2006-09-23 13:45:00"
+        END_DATE                ="2016-09-23 13:45:00"
+        ITEM_STATE              ="ACTIVE"
+        APPROVED_BY_USER_ID     ="1"
+        APPROVAL_DATETIME       ="2006-09-23 13:45:00"
+        SELLER_ID               ="1"
+        SUCCESSFUL_BID_ID       ="2"
+        CREATED                 ="2006-09-23 13:45:00"
+    />
+
+    <ITEM
+        ITEM_ID                 ="2"
+        OBJ_VERSION             ="0"
+        ITEM_NAME               ="Testitem 2"
+        DESCRIPTION             ="This is TestItem Two."
+        INITIAL_PRICE           ="111"
+        INITIAL_PRICE_CURRENCY  ="USD"
+        RESERVE_PRICE           ="222"
+        RESERVE_PRICE_CURRENCY  ="USD"
+        START_DATE              ="2006-09-23 13:45:00"
+        END_DATE                ="2016-09-23 13:45:00"
+        ITEM_STATE              ="DRAFT"
+        APPROVED_BY_USER_ID     ="1"
+        APPROVAL_DATETIME       ="2006-09-23 13:45:00"
+        SELLER_ID               ="1"
+        SUCCESSFUL_BID_ID       ="[NULL]"
+        CREATED                 ="2006-09-23 13:45:00"
+    />
+
+    <BID
+        BID_ID                  ="1"
+        BID_AMOUNT              ="100"
+        BID_AMOUNT_CURRENCY     ="USD"
+        ITEM_ID                 ="1"
+        BIDDER_ID               ="1"
+        BID_POSITION            ="0"
+        CREATED                 ="2006-09-23 13:46:00"
+    />
+
+    <BID
+        BID_ID                  ="2"
+        BID_AMOUNT              ="124"
+        BID_AMOUNT_CURRENCY     ="USD"
+        ITEM_ID                 ="1"
+        BIDDER_ID               ="1"
+        BID_POSITION            ="1"
+        CREATED                 ="2006-09-23 13:47:00"
+    />
+
+    <CATEGORY
+        CATEGORY_ID             ="1"
+        OBJ_VERSION             ="0"
+        CATEGORY_NAME           ="Category One"
+        CREATED                 ="2006-09-23 13:45:00"
+        PARENT_CATEGORY_ID      ="[NULL]"
+    />
+
+    <CATEGORY
+        CATEGORY_ID             ="2"
+        OBJ_VERSION             ="0"
+        CATEGORY_NAME           ="Category Two"
+        CREATED                 ="2006-09-23 13:45:00"
+        PARENT_CATEGORY_ID      ="1"
+    />
+
+    <CATEGORIZED_ITEM
+        CATEGORY_ID             ="1"
+        ITEM_ID                 ="1"
+        ADDED_BY_USER           ="johndoe"
+        ADDED_ON                ="2006-09-23 13:45:00"
+    />
+
+    <CATEGORIZED_ITEM
+        CATEGORY_ID             ="2"
+        ITEM_ID                 ="1"
+        ADDED_BY_USER           ="johndoe"
+        ADDED_ON                ="2006-09-23 13:45:00"
+    />
+
+    <COMMENT
+        COMMENT_ID              ="1"
+        OBJ_VERSION             ="0"
+        RATING                  ="OK"
+        COMMENT_TEXT            ="Just a comment."
+        ABOUT_ITEM_ID           ="1"
+        FROM_USER_ID            ="1"
+        CREATED                 ="2006-09-23 13:47:00"
+    />
+
+</dataset>


Property changes on: labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/main/java/basedata.xml
___________________________________________________________________
Name: svn:executable
   + *

Modified: labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/main/java/uk/ac/ncl/sdia/a8905943/event/MVCCLoadEventListener.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/main/java/uk/ac/ncl/sdia/a8905943/event/MVCCLoadEventListener.java	2009-04-24 15:58:43 UTC (rev 26246)
+++ labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/main/java/uk/ac/ncl/sdia/a8905943/event/MVCCLoadEventListener.java	2009-04-24 16:14:56 UTC (rev 26247)
@@ -2,7 +2,6 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.codehaus.multiverse.api.Transaction;
 import org.hibernate.HibernateException;
 import org.hibernate.engine.EntityKey;
 import org.hibernate.engine.SessionImplementor;
@@ -31,16 +30,21 @@
         if ( stats ) startTime = System.currentTimeMillis();
 
         Object entity = mapping.load(keyToLoad, event.getSession());
+        if (null == entity)
+        {
+            entity = persister.load(
+    				event.getEntityId(),
+    				event.getInstanceToLoad(),
+    				event.getLockMode(),
+    				source
+    		);
+        }
         
-        /*
-        Object entity = persister.load(
-				event.getEntityId(),
-				event.getInstanceToLoad(),
-				event.getLockMode(),
-				source
-		);
-		*/
-
+        if (null != entity)
+        {
+        	mapping.store(keyToLoad, event.getSession(), entity);
+        }
+        	
 		if ( event.isAssociationFetch() && stats) {
 			source.getFactory().getStatisticsImplementor().fetchEntity( event.getEntityClassName(), System.currentTimeMillis() - startTime);
 		}

Deleted: labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/main/java/uk/ac/ncl/sdia/a8905943/mapping/MappingHandles.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/main/java/uk/ac/ncl/sdia/a8905943/mapping/MappingHandles.java	2009-04-24 15:58:43 UTC (rev 26246)
+++ labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/main/java/uk/ac/ncl/sdia/a8905943/mapping/MappingHandles.java	2009-04-24 16:14:56 UTC (rev 26247)
@@ -1,14 +0,0 @@
-package uk.ac.ncl.sdia.a8905943.mapping;
-
-import java.util.HashMap;
-import java.util.Map;
-
-public class MappingHandles {
-
-	private Map<Long, Long> handles = new HashMap<Long, Long>();
-	
-	public Long getTransactionHandle(Long _hibernateHandle)
-	{
-		return handles.get(_hibernateHandle	);
-	}
-}

Modified: labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/main/java/uk/ac/ncl/sdia/a8905943/mapping/MappingSessionMVCC.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/main/java/uk/ac/ncl/sdia/a8905943/mapping/MappingSessionMVCC.java	2009-04-24 15:58:43 UTC (rev 26246)
+++ labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/main/java/uk/ac/ncl/sdia/a8905943/mapping/MappingSessionMVCC.java	2009-04-24 16:14:56 UTC (rev 26247)
@@ -21,44 +21,57 @@
 
 	private static Map<Session, Transaction> mapping;
 	private static MultiversionedStm stm;
-	private static MappingHandles handles;
+	private static Map<Long, Long> handleMappings ; 
 	static
 	{
 		mapping = new HashMap<Session, Transaction> ();
 		stm = new MultiversionedStm();
-		handles = new MappingHandles();
+		handleMappings = new HashMap<Long, Long>();
 	}
 	
 	/** Use this method to retrieve the transaction associated with the Session. If non
-	 * is found the create a new Transaction.
+	 * is found associated with the session then start a new Transaction.
 	 */
 	public Transaction getTransaction(Session _session)
 	{
+		
 		Transaction returnValue = null;
-		if (mapping.containsKey(_session))
+		if (null != _session)
 		{
-			returnValue = mapping.get(_session);
+			if (mapping.containsKey(_session))
+			{
+				returnValue = mapping.get(_session);
+			}
+			else
+			{
+				returnValue = stm.startTransaction();
+				mapping.put(_session, returnValue);
+			}
 		}
-		else
-		{
-			returnValue = stm.startTransaction();
-			mapping.put(_session, returnValue);
-		}
 		
 		return returnValue;
 	}
 	public Transaction removeTransaction(Session _session)
 	{
-		return mapping.remove(_session);
+		Transaction returnValue = null;
+		if (null != _session)
+		{
+			returnValue = mapping.remove(_session);
+		}
+		return returnValue;
 	}
 	
 	public Object load(EntityKey _entry, Session _session)
 	{
-		return load(_entry, mapping.get(_session));
+		return load(_entry, getTransaction( _session));
 	}
-	public Object load(EntityKey _entry, Transaction _transaction)
+	private Object load(EntityKey _entry, Transaction _transaction)
 	{
-		return _transaction.read(handles.getTransactionHandle(Long.valueOf( _entry.hashCode())));
+		return _transaction.read(handleMappings.get(Long.valueOf( _entry.hashCode())));
 	}
+	public void store(EntityKey _entry, Session _session, Object _object)
+	{
+		handleMappings.put( Integer.valueOf(_entry.hashCode()).longValue(), getTransaction(_session).attachAsRoot(_object)); 
+	}
 
  }

Modified: labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/main/resources/META-INF/persistence.xml
===================================================================
--- labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/main/resources/META-INF/persistence.xml	2009-04-24 15:58:43 UTC (rev 26246)
+++ labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/main/resources/META-INF/persistence.xml	2009-04-24 16:14:56 UTC (rev 26247)
@@ -61,9 +61,9 @@
            -->
            <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
            
-           <!--  custom event listener for MVCC -->
+           <!--  custom event listener for MVCC
 			<property name="hibernate.ejb.event.load" value="uk.ac.ncl.sdia.a8905943.event.MVCCLoadEventListener"/>
-		
+--> 		
 
       </properties>
    </persistence-unit>

Added: labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/main/resources/auction/test/basedata.xml
===================================================================
--- labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/main/resources/auction/test/basedata.xml	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/main/resources/auction/test/basedata.xml	2009-04-24 16:14:56 UTC (rev 26247)
@@ -0,0 +1,168 @@
+<?xml version="1.0"?>
+
+<!--
+    Just a basic set of rows that are currently sufficient for all tests.
+    In future, maybe several datasets are required.
+-->
+<dataset>
+
+    <BILLING_DETAILS
+        BILLING_DETAILS_ID      ="1"
+        BILLING_DETAILS_TYPE    ="CC"
+        OBJ_VERSION             ="0"
+        OWNER                   ="John Doe"
+        CREATED                 ="2006-09-23 13:45:00"
+        USER_ID                 ="1"
+        BA_ACCOUNT              ="[NULL]"
+        BA_BANKNAME             ="[NULL]"
+        BA_SWIFT                ="[NULL]"
+    />
+
+    <CREDIT_CARD CREDIT_CARD_ID     ="1"
+                 CC_TYPE            ="MASTERCARD"
+                 CC_NUMBER          ="123123123123"
+                 CC_EXP_MONTH       ="08"
+                 CC_EXP_YEAR        ="2010"
+            />
+
+    <USERS
+        USER_ID             ="1"
+        OBJ_VERSION         ="0"
+        FIRSTNAME           ="John"
+        LASTNAME            ="Doe"
+        USERNAME            ="johndoe"
+        PASSWORD            ="secret"
+        EMAIL               ="jd at mail.tld"
+        RANK                ="0"
+        IS_ADMIN            ="true"
+        CREATED             ="2006-09-23 13:45:00"
+        HOME_STREET         ="Foostreet"
+        HOME_ZIPCODE        ="22222"
+        HOME_CITY           ="Foocity"
+        DEFAULT_BILLING_DETAILS_ID ="1"
+    />
+
+    <USERS
+        USER_ID             ="2"
+        OBJ_VERSION         ="0"
+        FIRSTNAME           ="Another"
+        LASTNAME            ="User"
+        USERNAME            ="anotheruser"
+        PASSWORD            ="secret"
+        EMAIL               ="anotheruser at mail.tld"
+        RANK                ="0"
+        IS_ADMIN            ="false"
+        CREATED             ="2006-09-23 13:45:00"
+        HOME_STREET         ="Foostreet"
+        HOME_ZIPCODE        ="22222"
+        HOME_CITY           ="Foocity"
+        DEFAULT_BILLING_DETAILS_ID ="[NULL]"
+    />
+
+    <ADDRESS
+        ADDRESS_ID      ="1"
+        OBJ_VERSION     ="0"
+        STREET          ="Shippingstreet 1"
+        ZIPCODE         ="12345"
+        CITY            ="Shippingcity"
+    />
+
+    <ITEM
+        ITEM_ID                 ="1"
+        OBJ_VERSION             ="0"
+        ITEM_NAME               ="Testitem 1"
+        DESCRIPTION             ="This is TestItem One."
+        INITIAL_PRICE           ="99"
+        INITIAL_PRICE_CURRENCY  ="USD"
+        RESERVE_PRICE           ="123"
+        RESERVE_PRICE_CURRENCY  ="USD"
+        START_DATE              ="2006-09-23 13:45:00"
+        END_DATE                ="2016-09-23 13:45:00"
+        ITEM_STATE              ="ACTIVE"
+        APPROVED_BY_USER_ID     ="1"
+        APPROVAL_DATETIME       ="2006-09-23 13:45:00"
+        SELLER_ID               ="1"
+        SUCCESSFUL_BID_ID       ="2"
+        CREATED                 ="2006-09-23 13:45:00"
+    />
+
+    <ITEM
+        ITEM_ID                 ="2"
+        OBJ_VERSION             ="0"
+        ITEM_NAME               ="Testitem 2"
+        DESCRIPTION             ="This is TestItem Two."
+        INITIAL_PRICE           ="111"
+        INITIAL_PRICE_CURRENCY  ="USD"
+        RESERVE_PRICE           ="222"
+        RESERVE_PRICE_CURRENCY  ="USD"
+        START_DATE              ="2006-09-23 13:45:00"
+        END_DATE                ="2016-09-23 13:45:00"
+        ITEM_STATE              ="DRAFT"
+        APPROVED_BY_USER_ID     ="1"
+        APPROVAL_DATETIME       ="2006-09-23 13:45:00"
+        SELLER_ID               ="1"
+        SUCCESSFUL_BID_ID       ="[NULL]"
+        CREATED                 ="2006-09-23 13:45:00"
+    />
+
+    <BID
+        BID_ID                  ="1"
+        BID_AMOUNT              ="100"
+        BID_AMOUNT_CURRENCY     ="USD"
+        ITEM_ID                 ="1"
+        BIDDER_ID               ="1"
+        BID_POSITION            ="0"
+        CREATED                 ="2006-09-23 13:46:00"
+    />
+
+    <BID
+        BID_ID                  ="2"
+        BID_AMOUNT              ="124"
+        BID_AMOUNT_CURRENCY     ="USD"
+        ITEM_ID                 ="1"
+        BIDDER_ID               ="1"
+        BID_POSITION            ="1"
+        CREATED                 ="2006-09-23 13:47:00"
+    />
+
+    <CATEGORY
+        CATEGORY_ID             ="1"
+        OBJ_VERSION             ="0"
+        CATEGORY_NAME           ="Category One"
+        CREATED                 ="2006-09-23 13:45:00"
+        PARENT_CATEGORY_ID      ="[NULL]"
+    />
+
+    <CATEGORY
+        CATEGORY_ID             ="2"
+        OBJ_VERSION             ="0"
+        CATEGORY_NAME           ="Category Two"
+        CREATED                 ="2006-09-23 13:45:00"
+        PARENT_CATEGORY_ID      ="1"
+    />
+
+    <CATEGORIZED_ITEM
+        CATEGORY_ID             ="1"
+        ITEM_ID                 ="1"
+        ADDED_BY_USER           ="johndoe"
+        ADDED_ON                ="2006-09-23 13:45:00"
+    />
+
+    <CATEGORIZED_ITEM
+        CATEGORY_ID             ="2"
+        ITEM_ID                 ="1"
+        ADDED_BY_USER           ="johndoe"
+        ADDED_ON                ="2006-09-23 13:45:00"
+    />
+
+    <COMMENT
+        COMMENT_ID              ="1"
+        OBJ_VERSION             ="0"
+        RATING                  ="OK"
+        COMMENT_TEXT            ="Just a comment."
+        ABOUT_ITEM_ID           ="1"
+        FROM_USER_ID            ="1"
+        CREATED                 ="2006-09-23 13:47:00"
+    />
+
+</dataset>


Property changes on: labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/main/resources/auction/test/basedata.xml
___________________________________________________________________
Name: svn:executable
   + *

Deleted: labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/main/resources/log4j.properties
===================================================================
--- labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/main/resources/log4j.properties	2009-04-24 15:58:43 UTC (rev 26246)
+++ labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/main/resources/log4j.properties	2009-04-24 16:14:56 UTC (rev 26247)
@@ -1,21 +0,0 @@
-# Direct log messages to stdout
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.Target=System.out
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{6}:%L - %m%n
-
-# Root logger option
-log4j.rootLogger=ERROR, stdout
-
-# Hibernate logging options (INFO only shows startup messages)
-#log4j.logger.org.hibernate=DEBUG
-
-# Log JDBC bind parameter runtime arguments
-#log4j.logger.org.hibernate.type=DEBUG
-
-# JBoss EJB 3.0 container logging
-#log4j.logger.org.jboss=DEBUG
-
-# Disable warnings of noisy classes
-log4j.logger.org.jboss.ejb3.timerservice.jboss.JBossTimerServiceFactory=ERROR
-log4j.logger.org.hibernate.ejb.Ejb3Configuration=ERROR

Added: labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/main/resources/log4j.xml
===================================================================
--- labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/main/resources/log4j.xml	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/main/resources/log4j.xml	2009-04-24 16:14:56 UTC (rev 26247)
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<!-- ===================================================================== -->
+<!--                                                                       -->
+<!--  Log4j Configuration                                                  -->
+<!--                                                                       -->
+<!-- ===================================================================== -->
+
+<!-- $Id: log4j.xml 64096 2007-07-17 14:36:23Z stan.silvert at jboss.com $ -->
+
+<!--
+   | For more configuration information and examples see the Jakarta Log4j
+   | owebsite: http://jakarta.apache.org/log4j
+ -->
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+   <!-- ================================= -->
+   <!-- Preserve messages in a local file -->
+   <!-- ================================= -->
+
+
+   <!-- A size based file rolling appender      -->
+   <appender name="FILE" class="org.jboss.logging.appender.RollingFileAppender">
+     <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+     <param name="File" value="./mvcc-log.txt"/>
+     <param name="Append" value="false"/>
+     <param name="MaxFileSize" value="500KB"/>
+     <param name="MaxBackupIndex" value="1"/>
+
+     <layout class="org.apache.log4j.PatternLayout">
+       <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
+     </layout>	    
+   </appender>
+
+
+   <!-- ============================== -->
+   <!-- Append messages to the console -->
+   <!-- ============================== 
+
+   <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+      <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+      <param name="Target" value="System.out"/>
+      <param name="Threshold" value="INFO"/>
+
+      <layout class="org.apache.log4j.PatternLayout">
+         <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
+      </layout>
+   </appender>
+	-->
+   <!-- ====================== -->
+   <!-- More Appender examples -->
+   <!-- ====================== -->
+
+   <!-- Buffer events and log them asynchronously -->
+   <appender name="ASYNC" class="org.apache.log4j.AsyncAppender">
+     <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+     <appender-ref ref="FILE"/>
+   </appender>
+   
+
+   
+   <!-- ================ -->
+   <!-- Limit categories -->
+   <!-- ================ -->
+
+   <category name="org.jboss">
+      <priority value="TRACE"/>
+   </category>
+
+	<category name="org.dbunit">
+      <priority value="ERROR"/>
+   </category>
+
+   <!-- Limit the JSR77 categories -->
+   <category name="org.jboss.management">
+      <priority value="INFO"/>
+   </category>
+   
+   <!-- Limit the org.jboss.serial (jboss-serialization) to INFO as its DEBUG is verbose -->
+   <category name="org.jboss.serial">
+      <priority value="INFO"/>
+   </category>
+  
+   <!-- ======================= -->
+   <!-- Setup the Root category -->
+   <!-- ======================= -->
+
+   <root>
+      <appender-ref ref="ASYNC"/>
+   </root>
+
+</log4j:configuration>
\ No newline at end of file

Added: labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/main/resources/testsuite-integration-ejb3.xml
===================================================================
--- labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/main/resources/testsuite-integration-ejb3.xml	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/main/resources/testsuite-integration-ejb3.xml	2009-04-24 16:14:56 UTC (rev 26247)
@@ -0,0 +1,37 @@
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
+
+<suite name="CaveatEmptor Integration" verbose="2">
+
+    <!-- Our datasource definition for the embedded EJB 3.0 container -->
+    <parameter name="deploy_beans_xml" value="META-INF/caveatemptor-beans.xml"/>
+
+    <!-- Location to scan for META-INF/persistence.xml and @Entity classes
+         (must be in java.class.path, can be several paths comma separated,
+         all regular slashes are automatically replaced with Windows file separators!) -->
+    <parameter name="scan_classpath" value="build/classes"/> <!-- ant build file version -->
+
+    <!-- DBUnit needs a database connection -->
+    <parameter name="jndi_datasource" value="java:/caveatemptorTestingDatasource"/>
+
+    <!-- How do we get an EntityManagerFactory from JNDI in tests? -->
+    <parameter name="jndi_name_emf" value="java:/EntityManagerFactories/caveatEmptorEMF"/>
+
+    <!-- How do we get a JTA UserTransaction from JNDI in tests? -->
+    <parameter name="jndi_name_usertx" value="UserTransaction"/>
+
+    <test name="Integration JPA">
+        <groups>
+            <run><include name="integration-persistence.*"/></run>
+        </groups>
+        <classes>
+            <class name="auction.test.basic.PersistentStateTransitions"/>
+        </classes>
+        <!-- Or scan the whole package
+        <packages>
+            <package name="auction.test.basic"/>
+         </packages>
+         -->
+    </test>
+
+</suite>
+


Property changes on: labs/jbosstm/workspace/whitingjr/HibernateWithInMemoryObjects/src/main/resources/testsuite-integration-ejb3.xml
___________________________________________________________________
Name: svn:executable
   + *




More information about the jboss-svn-commits mailing list