[jboss-svn-commits] JBL Code SVN: r32089 - in labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211: database and 14 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Mar 15 06:17:51 EDT 2010


Author: whitingjr
Date: 2010-03-15 06:17:48 -0400 (Mon, 15 Mar 2010)
New Revision: 32089

Added:
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/.classpath
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/.project
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/CaveatEmptor.JPA.iml
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/CaveatEmptor.JPA.ipr
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/CaveatEmptor.JPA.iws
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/Changelog.txt
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/README.txt
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/build.xml
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/caveatemptor-jpa.jar
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/database/
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/database/db.properties
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/antlr.license.txt
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/apache.license-2.0.txt
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/apache.license.txt
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/dbunit-2.2-20060719.153040-1.jar
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/ejb3-persistence.jar
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/hibernate-annotations.jar
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/hibernate-core-3.3.0.GA.jar
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/hibernate-entitymanager.jar
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/hibernate-tools.jar
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/jboss-ejb3-all.jar
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/lgpl.txt
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/slf4j-api-1.5.8.jar
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/slf4j-log4j12-1.5.8.jar
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/testng-5.4-jdk15.jar
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/thirdparty-all.jar
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/conf/
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/conf/META-INF/
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/conf/META-INF/caveatemptor-beans.xml
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/conf/META-INF/persistence.xml
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/conf/default.persistence.properties
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/conf/ejb3-interceptors-aop.xml
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/conf/embedded-jboss-beans.xml
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/conf/jndi.properties
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/conf/log4j.properties
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/testsuite-integration-ejb3.xml
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/BillingDetailsDAO.java
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/CategoryDAO.java
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/GenericDAO.java
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/ItemDAO.java
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/UserDAO.java
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/ejb3/
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/ejb3/BillingDetailsDAOBean.java
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/ejb3/CategoryDAOBean.java
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/ejb3/GenericEJB3DAO.java
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/ejb3/ItemDAOBean.java
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/ejb3/UserDAOBean.java
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/exceptions/
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/exceptions/BusinessException.java
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/exceptions/PermissionException.java
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/Address.java
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/AddressEntity.java
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/Auditable.java
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/BankAccount.java
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/Bid.java
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/BillingDetails.java
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/CategorizedItem.java
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/CategorizedItemComponent.java
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/Category.java
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/Comment.java
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/CreditCard.java
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/CreditCardType.java
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/Item.java
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/ItemState.java
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/MonetaryAmount.java
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/Rating.java
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/Shipment.java
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/ShipmentState.java
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/User.java
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/EJB3IntegrationTest.java
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/FixDBUnit.java
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/TestUtil.java
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/basedata.xml
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/basic/
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/basic/PersistentStateTransitions.java
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/persistence/
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/persistence/MonetaryAmountCompositeUserType.java
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/persistence/MonetaryAmountSimpleUserType.java
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/persistence/MonetaryAmountType.java
   labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/persistence/package-info.java
Log:
Added project to source control. Provides source of modified Caveat Emptor application.
There are changes to the original project to enable database vendor neutral code.

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/.classpath
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/.classpath	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/.classpath	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry excluding="auction/persistence/" kind="src" path="src/java"/>
+	<classpathentry kind="lib" path="lib/dbunit-2.2-20060719.153040-1.jar"/>
+	<classpathentry kind="lib" path="lib/ejb3-persistence.jar"/>
+	<classpathentry kind="lib" path="lib/hibernate-annotations.jar"/>
+	<classpathentry kind="lib" path="lib/hibernate-entitymanager.jar"/>
+	<classpathentry kind="lib" path="lib/hibernate-tools.jar"/>
+	<classpathentry kind="lib" path="lib/jboss-ejb3-all.jar"/>
+	<classpathentry kind="lib" path="lib/testng-5.4-jdk15.jar"/>
+	<classpathentry kind="lib" path="lib/thirdparty-all.jar"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/.project
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/.project	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/.project	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>caveatemptor-jpa-061211</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/CaveatEmptor.JPA.iml
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/CaveatEmptor.JPA.iml	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/CaveatEmptor.JPA.iml	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,97 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module version="4" relativePaths="true" type="JAVA_MODULE">
+  <component name="ModuleRootManager" />
+  <component name="NewModuleRootManager">
+    <output url="file://$MODULE_DIR$/build/classes" />
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src/etc/conf" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/java" isTestSource="false" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/lib/hibernate3.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/lib/hibernate-entitymanager.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/lib/dbunit-2.2-20060719.153040-1.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/lib/hibernate-annotations.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/lib/ejb3-persistence.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/lib/thirdparty-all.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/lib/jboss-ejb3-all.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/lib/hibernate-tools.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/lib/testng-5.4-jdk15.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntryProperties />
+  </component>
+</module>
+

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/CaveatEmptor.JPA.ipr
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/CaveatEmptor.JPA.ipr	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/CaveatEmptor.JPA.ipr	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4" relativePaths="true">
+  <component name="AntConfiguration">
+    <defaultAnt bundledAnt="true" />
+    <buildFile url="file://$PROJECT_DIR$/build.xml">
+      <additionalClassPath />
+      <antReference projectDefault="true" />
+      <customJdkName value="" />
+      <maximumHeapSize value="128" />
+      <properties />
+    </buildFile>
+  </component>
+  <component name="CodeStyleSettingsManager">
+    <option name="PER_PROJECT_SETTINGS" />
+    <option name="USE_PER_PROJECT_SETTINGS" value="false" />
+  </component>
+  <component name="CompilerConfiguration">
+    <option name="DEFAULT_COMPILER" value="Javac" />
+    <option name="CLEAR_OUTPUT_DIRECTORY" value="false" />
+    <option name="DEPLOY_AFTER_MAKE" value="0" />
+    <resourceExtensions>
+      <entry name=".+\.(properties|xml|html|dtd|tld)" />
+      <entry name=".+\.(gif|png|jpeg|jpg)" />
+    </resourceExtensions>
+    <wildcardResourcePatterns>
+      <entry name="?*.properties" />
+      <entry name="?*.xml" />
+      <entry name="?*.html" />
+      <entry name="?*.dtd" />
+      <entry name="?*.tld" />
+      <entry name="?*.gif" />
+      <entry name="?*.png" />
+      <entry name="?*.jpeg" />
+      <entry name="?*.jpg" />
+    </wildcardResourcePatterns>
+  </component>
+  <component name="DataSourceManagerImpl" />
+  <component name="DependenciesAnalyzeManager">
+    <option name="myForwardDirection" value="false" />
+  </component>
+  <component name="DependencyValidationManager" />
+  <component name="EntryPointsManager">
+    <entry_points />
+  </component>
+  <component name="ExportToHTMLSettings">
+    <option name="PRINT_LINE_NUMBERS" value="false" />
+    <option name="OPEN_IN_BROWSER" value="false" />
+    <option name="OUTPUT_DIRECTORY" />
+  </component>
+  <component name="GUI Designer component loader factory" />
+  <component name="JavacSettings">
+    <option name="DEBUGGING_INFO" value="true" />
+    <option name="GENERATE_NO_WARNINGS" value="false" />
+    <option name="DEPRECATION" value="true" />
+    <option name="ADDITIONAL_OPTIONS_STRING" value="" />
+    <option name="MAXIMUM_HEAP_SIZE" value="128" />
+  </component>
+  <component name="JavadocGenerationManager">
+    <option name="OUTPUT_DIRECTORY" />
+    <option name="OPTION_SCOPE" value="protected" />
+    <option name="OPTION_HIERARCHY" value="true" />
+    <option name="OPTION_NAVIGATOR" value="true" />
+    <option name="OPTION_INDEX" value="true" />
+    <option name="OPTION_SEPARATE_INDEX" value="true" />
+    <option name="OPTION_DOCUMENT_TAG_USE" value="false" />
+    <option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false" />
+    <option name="OPTION_DOCUMENT_TAG_VERSION" value="false" />
+    <option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="true" />
+    <option name="OPTION_DEPRECATED_LIST" value="true" />
+    <option name="OTHER_OPTIONS" value="" />
+    <option name="HEAP_SIZE" />
+    <option name="OPEN_IN_BROWSER" value="true" />
+  </component>
+  <component name="JikesSettings">
+    <option name="JIKES_PATH" value="" />
+    <option name="DEBUGGING_INFO" value="true" />
+    <option name="DEPRECATION" value="true" />
+    <option name="GENERATE_NO_WARNINGS" value="false" />
+    <option name="IS_EMACS_ERRORS_MODE" value="true" />
+    <option name="ADDITIONAL_OPTIONS_STRING" value="" />
+  </component>
+  <component name="Palette2">
+    <group name="Swing">
+      <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false">
+        <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
+      </item>
+      <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false">
+        <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
+      </item>
+      <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false">
+        <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
+      </item>
+      <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
+        <initial-values>
+          <property name="text" value="Button" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="RadioButton" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false">
+        <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="CheckBox" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false">
+        <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
+        <initial-values>
+          <property name="text" value="Label" />
+        </initial-values>
+      </item>
+      <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+          <preferred-size width="150" height="-1" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false">
+        <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false">
+        <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false">
+        <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+          <preferred-size width="150" height="50" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+          <preferred-size width="200" height="200" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false">
+        <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+          <preferred-size width="200" height="200" />
+        </default-constraints>
+      </item>
+      <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+      </item>
+      <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false">
+        <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+      </item>
+    </group>
+  </component>
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/CaveatEmptor.JPA.iml" filepath="$PROJECT_DIR$/CaveatEmptor.JPA.iml" />
+    </modules>
+  </component>
+  <component name="ProjectRootManager" version="2" assert-keyword="true" jdk-15="true" project-jdk-name="1.5.0" />
+  <component name="RmicSettings">
+    <option name="IS_EANABLED" value="false" />
+    <option name="DEBUGGING_INFO" value="true" />
+    <option name="GENERATE_NO_WARNINGS" value="false" />
+    <option name="GENERATE_IIOP_STUBS" value="false" />
+    <option name="ADDITIONAL_OPTIONS_STRING" value="" />
+  </component>
+  <component name="libraryTable" />
+  <component name="uidesigner-configuration">
+    <option name="INSTRUMENT_CLASSES" value="true" />
+    <option name="COPY_FORMS_RUNTIME_TO_OUTPUT" value="true" />
+  </component>
+  <UsedPathMacros />
+</project>
+


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/CaveatEmptor.JPA.ipr
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/CaveatEmptor.JPA.iws
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/CaveatEmptor.JPA.iws	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/CaveatEmptor.JPA.iws	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,677 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4" relativePaths="true">
+  <component name="AspectsView" />
+  <component name="BookmarkManager" />
+  <component name="ChangeBrowserSettings">
+    <option name="MAIN_SPLITTER_PROPORTION" value="0.3" />
+    <option name="MESSAGES_SPLITTER_PROPORTION" value="0.8" />
+    <option name="USE_DATE_BEFORE_FILTER" value="false" />
+    <option name="USE_DATE_AFTER_FILTER" value="false" />
+    <option name="USE_CHANGE_BEFORE_FILTER" value="false" />
+    <option name="USE_CHANGE_AFTER_FILTER" value="false" />
+    <option name="DATE_BEFORE" value="" />
+    <option name="DATE_AFTER" value="" />
+    <option name="CHANGE_BEFORE" value="" />
+    <option name="CHANGE_AFTER" value="" />
+    <option name="USE_USER_FILTER" value="false" />
+    <option name="USER" value="" />
+  </component>
+  <component name="CheckinPanelState" />
+  <component name="Commander">
+    <leftPanel />
+    <rightPanel />
+    <splitter proportion="0.5" />
+  </component>
+  <component name="CompilerWorkspaceConfiguration">
+    <option name="COMPILE_IN_BACKGROUND" value="false" />
+    <option name="AUTO_SHOW_ERRORS_IN_EDITOR" value="true" />
+    <option name="CLOSE_MESSAGE_VIEW_IF_SUCCESS" value="true" />
+    <option name="COMPILE_DEPENDENT_FILES" value="false" />
+  </component>
+  <component name="Cvs2Configuration">
+    <option name="PRUNE_EMPTY_DIRECTORIES" value="true" />
+    <option name="MERGING_MODE" value="0" />
+    <option name="MERGE_WITH_BRANCH1_NAME" value="HEAD" />
+    <option name="MERGE_WITH_BRANCH2_NAME" value="HEAD" />
+    <option name="RESET_STICKY" value="false" />
+    <option name="CREATE_NEW_DIRECTORIES" value="true" />
+    <option name="DEFAULT_TEXT_FILE_SUBSTITUTION" value="kv" />
+    <option name="PROCESS_UNKNOWN_FILES" value="false" />
+    <option name="PROCESS_DELETED_FILES" value="false" />
+    <option name="PROCESS_IGNORED_FILES" value="false" />
+    <option name="RESERVED_EDIT" value="false" />
+    <option name="CHECKOUT_DATE_OR_REVISION_SETTINGS">
+      <value>
+        <option name="BRANCH" value="" />
+        <option name="DATE" value="" />
+        <option name="USE_BRANCH" value="false" />
+        <option name="USE_DATE" value="false" />
+      </value>
+    </option>
+    <option name="UPDATE_DATE_OR_REVISION_SETTINGS">
+      <value>
+        <option name="BRANCH" value="" />
+        <option name="DATE" value="" />
+        <option name="USE_BRANCH" value="false" />
+        <option name="USE_DATE" value="false" />
+      </value>
+    </option>
+    <option name="SHOW_CHANGES_REVISION_SETTINGS">
+      <value>
+        <option name="BRANCH" value="" />
+        <option name="DATE" value="" />
+        <option name="USE_BRANCH" value="false" />
+        <option name="USE_DATE" value="false" />
+      </value>
+    </option>
+    <option name="SHOW_OUTPUT" value="false" />
+    <option name="ADD_WATCH_INDEX" value="0" />
+    <option name="REMOVE_WATCH_INDEX" value="0" />
+    <option name="UPDATE_KEYWORD_SUBSTITUTION" />
+    <option name="MAKE_NEW_FILES_READONLY" value="false" />
+    <option name="SHOW_CORRUPTED_PROJECT_FILES" value="0" />
+    <option name="TAG_AFTER_PROJECT_COMMIT" value="false" />
+    <option name="OVERRIDE_EXISTING_TAG_FOR_PROJECT" value="true" />
+    <option name="TAG_AFTER_PROJECT_COMMIT_NAME" value="" />
+    <option name="CLEAN_COPY" value="false" />
+  </component>
+  <component name="DaemonCodeAnalyzer">
+    <disable_hints />
+  </component>
+  <component name="DebuggerManager">
+    <breakpoint_any>
+      <breakpoint>
+        <option name="NOTIFY_CAUGHT" value="true" />
+        <option name="NOTIFY_UNCAUGHT" value="true" />
+        <option name="ENABLED" value="false" />
+        <option name="SUSPEND_POLICY" value="SuspendAll" />
+        <option name="LOG_ENABLED" value="false" />
+        <option name="LOG_EXPRESSION_ENABLED" value="false" />
+        <option name="COUNT_FILTER_ENABLED" value="false" />
+        <option name="COUNT_FILTER" value="0" />
+        <option name="CONDITION_ENABLED" value="false" />
+        <option name="CLASS_FILTERS_ENABLED" value="false" />
+        <option name="INSTANCE_FILTERS_ENABLED" value="false" />
+        <option name="CONDITION" value="" />
+        <option name="LOG_MESSAGE" value="" />
+      </breakpoint>
+      <breakpoint>
+        <option name="NOTIFY_CAUGHT" value="true" />
+        <option name="NOTIFY_UNCAUGHT" value="true" />
+        <option name="ENABLED" value="false" />
+        <option name="SUSPEND_POLICY" value="SuspendAll" />
+        <option name="LOG_ENABLED" value="false" />
+        <option name="LOG_EXPRESSION_ENABLED" value="false" />
+        <option name="COUNT_FILTER_ENABLED" value="false" />
+        <option name="COUNT_FILTER" value="0" />
+        <option name="CONDITION_ENABLED" value="false" />
+        <option name="CLASS_FILTERS_ENABLED" value="false" />
+        <option name="INSTANCE_FILTERS_ENABLED" value="false" />
+        <option name="CONDITION" value="" />
+        <option name="LOG_MESSAGE" value="" />
+      </breakpoint>
+    </breakpoint_any>
+    <breakpoint_rules />
+    <ui_properties />
+  </component>
+  <component name="ErrorTreeViewConfiguration">
+    <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
+    <option name="HIDE_WARNINGS" value="false" />
+  </component>
+  <component name="FavoritesViewImpl">
+    <favorites_list name="CaveatEmptor.JPA">
+      <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
+      <option name="IS_SHOW_MEMBERS" value="false" />
+      <option name="IS_STRUCTURE_VIEW" value="false" />
+      <option name="IS_SHOW_MODULES" value="true" />
+      <option name="IS_FLATTEN_PACKAGES" value="false" />
+      <option name="IS_ABBREVIATION_PACKAGE_NAMES" value="false" />
+      <option name="IS_HIDE_EMPTY_MIDDLE_PACKAGES" value="false" />
+      <option name="IS_SHOW_LIBRARY_CONTENTS" value="true" />
+    </favorites_list>
+    <option name="myCurrentFavoritesList" value="CaveatEmptor.JPA" />
+  </component>
+  <component name="FileEditorManager">
+    <leaf>
+      <file leaf-file-name="README.txt" pinned="false" current="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/README.txt">
+          <provider selected="true" editor-type-id="text-editor">
+            <state line="0" column="26" selection-start="26" selection-end="26" vertical-scroll-proportion="0.0">
+              <folding />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file leaf-file-name="Changelog.txt" pinned="false" current="true" current-in-tab="true">
+        <entry file="file://$PROJECT_DIR$/Changelog.txt">
+          <provider selected="true" editor-type-id="text-editor">
+            <state line="6" column="0" selection-start="171" selection-end="171" vertical-scroll-proportion="0.056851313">
+              <folding />
+            </state>
+          </provider>
+        </entry>
+      </file>
+    </leaf>
+  </component>
+  <component name="FindManager">
+    <FindUsagesManager>
+      <setting name="OPEN_NEW_TAB" value="false" />
+    </FindUsagesManager>
+  </component>
+  <component name="HierarchyBrowserManager">
+    <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
+    <option name="SORT_ALPHABETICALLY" value="false" />
+    <option name="HIDE_CLASSES_WHERE_METHOD_NOT_IMPLEMENTED" value="false" />
+  </component>
+  <component name="InspectionManager">
+    <option name="AUTOSCROLL_TO_SOURCE" value="false" />
+    <option name="SPLITTER_PROPORTION" value="0.5" />
+    <option name="GROUP_BY_SEVERITY" value="false" />
+    <option name="ANALYZE_TEST_SOURCES" value="true" />
+    <option name="SCOPE_TYPE" value="1" />
+    <option name="CUSTOM_SCOPE_NAME" value="" />
+    <profile name="Default" />
+  </component>
+  <component name="J2EEProjectPane">
+    <PATH>
+      <PATH_ELEMENT>
+        <option name="myItemId" value="CaveatEmptor.JPA.ipr" />
+        <option name="myItemType" value="com.intellij.j2ee.module.view.nodes.J2EEProjectNodeDescriptor" />
+      </PATH_ELEMENT>
+    </PATH>
+    <setting name="SHOW_AS_DEPLOYMENT_VIEW" value="false" />
+  </component>
+  <component name="ModuleEditorState">
+    <option name="LAST_EDITED_MODULE_NAME" value="CaveatEmptor.JPA" />
+    <option name="LAST_EDITED_TAB_NAME" value="Libraries (Classpath)" />
+  </component>
+  <component name="NamedScopeManager" />
+  <component name="PackagesPane">
+    <PATH>
+      <PATH_ELEMENT>
+        <option name="myItemId" value="CaveatEmptor.JPA.ipr" />
+        <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" />
+      </PATH_ELEMENT>
+      <PATH_ELEMENT>
+        <option name="myItemId" value="CaveatEmptor.JPA" />
+        <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewModuleNode" />
+      </PATH_ELEMENT>
+    </PATH>
+  </component>
+  <component name="PerforceChangeBrowserSettings">
+    <option name="USE_CLIENT_FILTER" value="true" />
+    <option name="CLIENT" value="" />
+  </component>
+  <component name="PerforceDirect.Settings">
+    <option name="useP4CONFIG" value="true" />
+    <option name="port" value="jasper:1666" />
+    <option name="client" value="" />
+    <option name="user" value="" />
+    <option name="passwd" value="" />
+    <option name="showCmds" value="false" />
+    <option name="useNativeApi" value="false" />
+    <option name="pathToExec" value="p4" />
+    <option name="useCustomPathToExec" value="false" />
+    <option name="SYNC_FORCE" value="false" />
+    <option name="SYNC_RUN_RESOLVE" value="true" />
+    <option name="REVERT_UNCHANGED_FILES" value="true" />
+    <option name="CHARSET" value="none" />
+    <option name="SHOW_BRANCHES_HISTORY" value="true" />
+    <option name="ENABLED" value="true" />
+    <option name="USE_LOGIN" value="false" />
+    <option name="LOGIN_SILENTLY" value="false" />
+    <option name="INTEGRATE_BRANCH_NAME" />
+    <option name="INTEGRATE_CHANGELIST_NUM" value="-1" />
+    <option name="INTEGRATE_RUN_RESOLVE" value="true" />
+    <option name="INTEGRATE_REVERT_UNCHANGED" value="true" />
+    <option name="INTEGRATE_CHANGE_LIST_NUMBER" value="" />
+    <option name="INTEGRATE_CHANGE_LIST" value="false" />
+    <option name="INTEGRATE_REVERSE" value="false" />
+  </component>
+  <component name="ProjectLevelVcsManager">
+    <OptionsSetting value="true" id="Add" />
+    <OptionsSetting value="true" id="Remove" />
+    <OptionsSetting value="true" id="Checkin" />
+    <OptionsSetting value="true" id="Checkout" />
+    <OptionsSetting value="true" id="Update" />
+    <OptionsSetting value="true" id="Status" />
+    <OptionsSetting value="true" id="Edit" />
+    <OptionsSetting value="true" id="Undo Check Out" />
+    <OptionsSetting value="true" id="Compare with SourceSafe Version" />
+    <OptionsSetting value="true" id="Get Latest Version" />
+    <ConfirmationsSetting value="0" id="Add" />
+    <ConfirmationsSetting value="0" id="Remove" />
+  </component>
+  <component name="ProjectPane">
+    <PATH>
+      <PATH_ELEMENT>
+        <option name="myItemId" value="CaveatEmptor.JPA.ipr" />
+        <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+      </PATH_ELEMENT>
+      <PATH_ELEMENT>
+        <option name="myItemId" value="CaveatEmptor.JPA" />
+        <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+      </PATH_ELEMENT>
+    </PATH>
+    <PATH>
+      <PATH_ELEMENT>
+        <option name="myItemId" value="CaveatEmptor.JPA.ipr" />
+        <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+      </PATH_ELEMENT>
+      <PATH_ELEMENT>
+        <option name="myItemId" value="CaveatEmptor.JPA" />
+        <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+      </PATH_ELEMENT>
+      <PATH_ELEMENT>
+        <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
+        <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+      </PATH_ELEMENT>
+    </PATH>
+  </component>
+  <component name="ProjectReloadState">
+    <option name="STATE" value="0" />
+  </component>
+  <component name="ProjectView">
+    <navigator currentView="ProjectPane" splitterProportion="0.5">
+      <flattenPackages />
+      <showMembers />
+      <showModules />
+      <showLibraryContents />
+      <hideEmptyPackages />
+      <abbreviatePackageNames />
+      <showStructure ProjectPane="false" />
+      <autoscrollToSource />
+      <autoscrollFromSource />
+      <sortByType />
+    </navigator>
+  </component>
+  <component name="PropertiesComponent">
+    <property name="GoToClass.includeJavaFiles" value="false" />
+    <property name="MemberChooser.copyJavadoc" value="false" />
+    <property name="GoToClass.includeLibraries" value="false" />
+    <property name="MemberChooser.showClasses" value="true" />
+    <property name="MemberChooser.sorted" value="false" />
+    <property name="RunManagerConfig.compileBeforeRunning" value="true" />
+    <property name="GoToFile.includeJavaFiles" value="false" />
+    <property name="GoToClass.toSaveIncludeLibraries" value="false" />
+    <property name="RunManagerConfig.showSettingsBeforeRunnig" value="false" />
+  </component>
+  <component name="ReadonlyStatusHandler">
+    <option name="SHOW_DIALOG" value="true" />
+  </component>
+  <component name="RecentsManager" />
+  <component name="RestoreUpdateTree" />
+  <component name="RunManager">
+    <activeType name="Application" />
+    <configuration selected="false" default="true" type="WebLogic Instance" factoryName="Local">
+      <option name="WORKING_DIRECTORY" />
+      <option name="HOST" value="localhost" />
+      <option name="PORT" value="7001" />
+      <option name="LOCAL" value="true" />
+      <option name="OPEN_IN_BROWSER" value="true" />
+      <option name="OPEN_IN_BROWSER_URL" value="/" />
+      <option name="COMMON_VM_ARGUMENTS" value="" />
+      <option name="DOMAIN_PATH" value="" />
+      <option name="USER" value="weblogic" />
+      <option name="PASSWORD" value="weblogic" />
+      <option name="SERVER_NAME" value="myserver" />
+      <option name="DOMAIN_NAME" value="mydomain" />
+    </configuration>
+    <configuration selected="false" default="true" type="Applet" factoryName="Applet">
+      <module name="" />
+      <option name="MAIN_CLASS_NAME" />
+      <option name="HTML_FILE_NAME" />
+      <option name="HTML_USED" value="false" />
+      <option name="WIDTH" value="400" />
+      <option name="HEIGHT" value="300" />
+      <option name="POLICY_FILE" value="$PROJECT_DIR$/../../../../../Desktop/IntelliJ IDEA.app/bin/appletviewer.policy" />
+      <option name="VM_PARAMETERS" />
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+      <option name="ALTERNATIVE_JRE_PATH" />
+    </configuration>
+    <configuration selected="false" default="true" type="#com.intellij.j2ee.web.jsr45.JSR45ConfigurationFactory" factoryName="Local">
+      <option name="WORKING_DIRECTORY" />
+      <option name="HOST" value="localhost" />
+      <option name="PORT" value="8080" />
+      <option name="LOCAL" value="true" />
+      <option name="OPEN_IN_BROWSER" value="true" />
+      <option name="OPEN_IN_BROWSER_URL" value="/" />
+      <option name="COMMON_VM_ARGUMENTS" value="" />
+      <option name="JSP_PACKAGE" value="" />
+      <option name="VM_OPTS" value="VM_OPTS" />
+      <option name="USE_WEBSPHERE51_LINEMAPPING_MODEL" value="false" />
+      <option name="LOCAL_PORT" value="80" />
+    </configuration>
+    <configuration selected="false" default="true" type="WebLogic Instance" factoryName="Remote">
+      <option name="WORKING_DIRECTORY" />
+      <option name="HOST" value="localhost" />
+      <option name="PORT" value="7001" />
+      <option name="LOCAL" value="false" />
+      <option name="OPEN_IN_BROWSER" value="true" />
+      <option name="OPEN_IN_BROWSER_URL" value="/" />
+      <option name="COMMON_VM_ARGUMENTS" value="" />
+      <option name="DOMAIN_PATH" value="" />
+      <option name="USER" value="weblogic" />
+      <option name="PASSWORD" value="weblogic" />
+      <option name="SERVER_NAME" value="myserver" />
+      <option name="DOMAIN_NAME" value="mydomain" />
+    </configuration>
+    <configuration selected="false" default="true" type="Remote" factoryName="Remote">
+      <option name="USE_SOCKET_TRANSPORT" value="true" />
+      <option name="SERVER_MODE" value="false" />
+      <option name="SHMEM_ADDRESS" value="javadebug" />
+      <option name="HOST" value="localhost" />
+      <option name="PORT" value="5005" />
+    </configuration>
+    <configuration selected="false" default="true" type="JUnit" factoryName="JUnit">
+      <module name="" />
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+      <option name="ALTERNATIVE_JRE_PATH" />
+      <option name="PACKAGE_NAME" />
+      <option name="MAIN_CLASS_NAME" />
+      <option name="METHOD_NAME" />
+      <option name="TEST_OBJECT" value="class" />
+      <option name="VM_PARAMETERS" />
+      <option name="PARAMETERS" />
+      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
+      <option name="ADDITIONAL_CLASS_PATH" />
+      <option name="TEST_SEARCH_SCOPE">
+        <value defaultName="wholeProject" />
+      </option>
+    </configuration>
+    <configuration selected="false" default="true" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="Remote">
+      <option name="WORKING_DIRECTORY" />
+      <option name="HOST" value="localhost" />
+      <option name="PORT" value="8080" />
+      <option name="LOCAL" value="false" />
+      <option name="OPEN_IN_BROWSER" value="true" />
+      <option name="OPEN_IN_BROWSER_URL" value="/" />
+      <option name="COMMON_VM_ARGUMENTS" value="" />
+    </configuration>
+    <configuration selected="false" default="true" type="#com.intellij.j2ee.web.tomcat.TomcatRunConfigurationFactory" factoryName="Local">
+      <option name="WORKING_DIRECTORY" />
+      <option name="HOST" value="localhost" />
+      <option name="PORT" value="8080" />
+      <option name="LOCAL" value="true" />
+      <option name="OPEN_IN_BROWSER" value="true" />
+      <option name="OPEN_IN_BROWSER_URL" value="/" />
+      <option name="COMMON_VM_ARGUMENTS" value="" />
+    </configuration>
+    <configuration selected="false" default="true" type="#com.intellij.j2ee.web.jsr45.JSR45ConfigurationFactory" factoryName="Remote">
+      <option name="WORKING_DIRECTORY" />
+      <option name="HOST" value="localhost" />
+      <option name="PORT" value="8080" />
+      <option name="LOCAL" value="false" />
+      <option name="OPEN_IN_BROWSER" value="true" />
+      <option name="OPEN_IN_BROWSER_URL" value="/" />
+      <option name="COMMON_VM_ARGUMENTS" value="" />
+      <option name="JSP_PACKAGE" value="" />
+      <option name="VM_OPTS" value="VM_OPTS" />
+      <option name="USE_WEBSPHERE51_LINEMAPPING_MODEL" value="false" />
+      <option name="LOCAL_PORT" value="80" />
+    </configuration>
+    <configuration selected="false" default="true" type="Application" factoryName="Application">
+      <option name="MAIN_CLASS_NAME" />
+      <option name="VM_PARAMETERS" />
+      <option name="PROGRAM_PARAMETERS" />
+      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+      <option name="ALTERNATIVE_JRE_PATH" />
+      <module name="" />
+    </configuration>
+  </component>
+  <component name="SQLPlugin.ProjectConfiguration">
+    <queries />
+  </component>
+  <component name="SelectInManager" />
+  <component name="StarteamConfiguration">
+    <option name="SERVER" value="" />
+    <option name="PORT" value="49201" />
+    <option name="USER" value="" />
+    <option name="PASSWORD" value="" />
+    <option name="PROJECT" value="" />
+    <option name="VIEW" value="" />
+    <option name="ALTERNATIVE_WORKING_PATH" value="" />
+  </component>
+  <component name="StructuralSearchPlugin" />
+  <component name="StructureViewFactory">
+    <option name="AUTOSCROLL_MODE" value="true" />
+    <option name="AUTOSCROLL_FROM_SOURCE" value="false" />
+    <option name="ACTIVE_ACTIONS" value="" />
+  </component>
+  <component name="SvnChangesBrowserSettings">
+    <option name="USE_AUTHOR_FIELD" value="true" />
+    <option name="AUTHOR" value="" />
+    <option name="LOCATION" value="" />
+    <option name="USE_PROJECT_SETTINGS" value="true" />
+    <option name="USE_ALTERNATE_LOCATION" value="false" />
+  </component>
+  <component name="SvnConfiguration">
+    <option name="USER" value="" />
+    <option name="PASSWORD" value="" />
+    <option name="PROCESS_UNRESOLVED" value="false" />
+  </component>
+  <component name="TodoView" selected-index="0">
+    <todo-panel id="selected-file">
+      <are-packages-shown value="false" />
+      <are-modules-shown value="false" />
+      <flatten-packages value="false" />
+      <is-autoscroll-to-source value="true" />
+    </todo-panel>
+    <todo-panel id="all">
+      <are-packages-shown value="true" />
+      <are-modules-shown value="false" />
+      <flatten-packages value="false" />
+      <is-autoscroll-to-source value="true" />
+    </todo-panel>
+  </component>
+  <component name="ToolWindowManager">
+    <frame x="0" y="22" width="1874" height="1520" extended-state="0" />
+    <editor active="true" />
+    <layout>
+      <window_info id="SQL" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.78596085" order="8" />
+      <window_info id="CVS" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="12" />
+      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="7" />
+      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="true" weight="0.33844468" order="0" />
+      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.3290993" order="1" />
+      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="1" />
+      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.3290993" order="9" />
+      <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.4" order="6" />
+      <window_info id="Module Dependencies" active="false" anchor="right" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="3" />
+      <window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="10" />
+      <window_info id="Favorites" active="false" anchor="right" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="5" />
+      <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="docked" type="docked" visible="true" weight="0.24972618" order="1" />
+      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.5288684" order="2" />
+      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="2" />
+      <window_info id="File View" active="false" anchor="right" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="4" />
+      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.4" order="4" />
+      <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="sliding" type="sliding" visible="false" weight="0.4" order="0" />
+      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="11" />
+      <window_info id="Web" active="false" anchor="left" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="2" />
+      <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.33" order="0" />
+      <window_info id="EJB" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="3" />
+      <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="docked" type="docked" visible="false" weight="0.25" order="5" />
+    </layout>
+  </component>
+  <component name="VCS.FileViewConfiguration">
+    <option name="SELECTED_STATUSES" value="DEFAULT" />
+    <option name="SELECTED_COLUMNS" value="DEFAULT" />
+    <option name="SHOW_FILTERS" value="true" />
+    <option name="CUSTOMIZE_VIEW" value="true" />
+    <option name="SHOW_FILE_HISTORY_AS_TREE" value="true" />
+  </component>
+  <component name="VcsManagerConfiguration">
+    <option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="true" />
+    <option name="PUT_FOCUS_INTO_COMMENT" value="false" />
+    <option name="FORCE_NON_EMPTY_COMMENT" value="false" />
+    <option name="LAST_COMMIT_MESSAGE" />
+    <option name="SAVE_LAST_COMMIT_MESSAGE" value="true" />
+    <option name="CHECKIN_DIALOG_SPLITTER_PROPORTION" value="0.8" />
+    <option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
+    <option name="OPTIMIZE_IMPORTS_BEFORE_FILE_COMMIT" value="false" />
+    <option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" />
+    <option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" />
+    <option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" />
+    <option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" />
+    <option name="ERROR_OCCURED" value="false" />
+    <option name="ACTIVE_VCS_NAME" value="" />
+    <option name="UPDATE_GROUP_BY_PACKAGES" value="false" />
+    <option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
+    <option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
+  </component>
+  <component name="VssConfiguration">
+    <option name="CLIENT_PATH" value="" />
+    <option name="SRCSAFEINI_PATH" value="" />
+    <option name="USER_NAME" value="" />
+    <option name="PWD" value="" />
+    <option name="VSS_IS_INITIALIZED" value="true" />
+    <CheckoutOptions>
+      <option name="COMMENT" value="" />
+      <option name="DO_NOT_GET_LATEST_VERSION" value="false" />
+      <option name="REPLACE_WRITABLE" value="false" />
+      <option name="RECURSIVE" value="false" />
+    </CheckoutOptions>
+    <CheckinOptions>
+      <option name="COMMENT" value="" />
+      <option name="KEEP_CHECKED_OUT" value="false" />
+      <option name="RECURSIVE" value="false" />
+    </CheckinOptions>
+    <AddOptions>
+      <option name="COMMENT" value="" />
+      <option name="STORE_ONLY_LATEST_VERSION" value="false" />
+      <option name="CHECK_OUT_IMMEDIATELY" value="false" />
+      <option name="FILE_TYPE" value="0" />
+    </AddOptions>
+    <UndocheckoutOptions>
+      <option name="MAKE_WRITABLE" value="false" />
+      <option name="REPLACE_LOCAL_COPY" value="0" />
+      <option name="RECURSIVE" value="false" />
+    </UndocheckoutOptions>
+    <GetOptions>
+      <option name="REPLACE_WRITABLE" value="0" />
+      <option name="MAKE_WRITABLE" value="false" />
+      <option name="RECURSIVE" value="false" />
+    </GetOptions>
+  </component>
+  <component name="antWorkspaceConfiguration">
+    <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
+    <option name="FILTER_TARGETS" value="false" />
+    <buildFile url="file://$PROJECT_DIR$/build.xml">
+      <antCommandLine value="" />
+      <runInBackground value="false" />
+      <targetFilters>
+        <filter targetName="schemaexport" isVisible="true" />
+        <filter targetName="copymetafiles" isVisible="false" />
+        <filter targetName="compile" isVisible="false" />
+        <filter targetName="dbmanager" isVisible="true" />
+        <filter targetName="clean" isVisible="true" />
+        <filter targetName="run" isVisible="true" />
+        <filter targetName="startdb" isVisible="true" />
+      </targetFilters>
+      <treeView value="true" />
+      <verbose value="true" />
+      <viewClosedWhenNoErrors value="false" />
+    </buildFile>
+  </component>
+  <component name="editorHistoryManager">
+    <entry file="file://$PROJECT_DIR$/src/java/auction/model/Comment.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="25" column="0" selection-start="616" selection-end="616" vertical-scroll-proportion="0.39828432">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/java/auction/model/User.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="95" column="38" selection-start="3081" selection-end="3081" vertical-scroll-proportion="0.5355805">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/java/auction/model/BankAccount.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="21" column="46" selection-start="545" selection-end="545" vertical-scroll-proportion="0.3345588">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/java/auction/model/Item.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="62" column="13" selection-start="1840" selection-end="1840" vertical-scroll-proportion="0.33333334">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/java/auction/test/basic/PersistentStateTransitions.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="3" column="0" selection-start="76" selection-end="76" vertical-scroll-proportion="0.04779412">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/java/auction/test/basedata.xml">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="134" column="0" selection-start="4429" selection-end="4429" vertical-scroll-proportion="0.37867647">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/build.xml">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="116" column="38" selection-start="4305" selection-end="4305" vertical-scroll-proportion="0.7536443">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/etc/testsuite-integration-ejb3.xml">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="16" column="67" selection-start="845" selection-end="845" vertical-scroll-proportion="0.1516035">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/java/auction/test/EJB3IntegrationTest.java">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="20" column="22" selection-start="558" selection-end="558" vertical-scroll-proportion="0.18294461">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/etc/conf/META-INF/persistence.xml">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="27" column="58" selection-start="1145" selection-end="1145" vertical-scroll-proportion="0.2558309">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/etc/conf/META-INF/caveatemptor-beans.xml">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="26" column="45" selection-start="1236" selection-end="1265" vertical-scroll-proportion="0.24635568">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/etc/conf/log4j.properties">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="7" column="21" selection-start="310" selection-end="310" vertical-scroll-proportion="0.06632653">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/README.txt">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="0" column="26" selection-start="26" selection-end="26" vertical-scroll-proportion="0.0">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/Changelog.txt">
+      <provider selected="true" editor-type-id="text-editor">
+        <state line="6" column="0" selection-start="171" selection-end="171" vertical-scroll-proportion="0.056851313">
+          <folding />
+        </state>
+      </provider>
+    </entry>
+  </component>
+</project>
+

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/Changelog.txt
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/Changelog.txt	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/Changelog.txt	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,22 @@
+CaveatEmptor JPA
+###########################################################################
+
+Changes in version 20061211
+-----------------------------------------------
+
+* upgraded to Hibernate/HEM/HAN 3.2.1
+* upgraded to TestNG 5.4, fixes pathname with spaces problem on Windows
+
+Changes in version 20061209
+-----------------------------------------------
+
+* changed paths in build.xml to location, from value
+* changed default configuration to scan for deployment units in "build/classes"
+* removed runtime/ directory and merged all libs in lib/ directory
+* added automatic file separator replacement to EJB3IntegrationTest for Windows
+
+Changes in version 20061110
+-----------------------------------------------
+
+* tested everything on HSQL DB, not any other DBMS
+* initial release for the 'Java Persistence with Hibernate' book


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/Changelog.txt
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/README.txt
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/README.txt	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/README.txt	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,95 @@
+CaveatEmptor JPA (20061211)
+###########################################################################
+
+
+Requirements
+---------------------------------------------------------------------------
+
+- JDK 5.0
+- Ant 1.6
+
+
+Building and running the tests
+---------------------------------------------------------------------------
+
+The following Ant targets are available:
+
+    clean                   Clean the build directory
+
+    startdb                 Run HSQL database server with clean DB
+    dbmanager               Start HSQL DB manager
+    schemaexport            Exports schema DDL to file in build directory
+
+    test.integration        Run the integration tests
+
+    instrument.lazyloading  Enhance bytecode for lazy loading interception
+
+1. Open your command shell and change to the project directory
+
+2. Use 'ant startdb' to start a fresh HSQL database, keep the database running
+
+3. Open a second command shell and change to the project directory
+
+4. Use 'ant' to run the basic integration tests against HSQL DB (a schema is
+   exported automatically for each test run).
+
+5. Use 'ant schemaexport' to export the DDL file build/caveatemptor-jpa-ddl.sql
+
+6. Use 'ant dbmanager' to open the HSQL database browser, note that
+   the database is empty after each test run! Set automatic schema export to
+   "create" instead of "create-drop", to see the schema and data from the last
+   test run.
+
+
+Notes
+---------------------------------------------------------------------------
+
+You can always reset the database by restarting the database server.
+
+
+Contact & Forum
+---------------------------------------------------------------------------
+
+http://caveatemptor.hibernate.org/
+http://forum.hibernate.org/viewforum.php?f=7
+
+
+License
+---------------------------------------------------------------------------
+
+This product includes software developed by
+the Apache Software Foundation (http://www.apache.org/).
+
+This software is distributed as open source.
+The following disclaimer applies to all files
+(not any included 3rd party libraries) distributed in
+this package:
+
+Copyright (c) 2005, Christian Bauer <christian at hibernate.org>
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+- Redistributions of source code must retain the above copyright notice, this
+list of conditions and the following disclaimer.
+
+- Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation
+and/or other materials provided with the distribution.
+
+Neither the name of the original author nor the names of contributors may be
+used to endorse or promote products derived from this software without
+specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGE.


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/README.txt
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/build.xml
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/build.xml	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/build.xml	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,145 @@
+<project name="CaveatEmptor JPA" default="test.integration" basedir=".">
+
+    <!-- Name of project and version -->
+    <property name="proj.name"      value="CaveatEmptor JPA"/>
+    <property name="proj.shortname" value="caveatemptor-jpa"/>
+    <property name="version"        value="20061110"/>
+
+    <!-- Global properties for this build -->
+    <property name="database.dir"           location="database"/>
+    <property name="src.java.dir"           location="src/java"/>
+    <property name="src.etc.dir"            location="src/etc"/>
+    <property name="src.conf.dir"           location="src/etc/conf"/>
+    <property name="lib.dir"                location="lib"/>
+    <property name="build.dir"              location="build"/>
+    <property name="build.classes.dir"      location="${build.dir}/classes"/>
+
+    <!-- Classpath declaration -->
+    <path id="project.classpath">
+        <fileset dir="${lib.dir}">
+            <include name="**/*.jar"/>
+            <include name="**/*.zip"/>
+        </fileset>
+    </path>
+
+    <!-- Useful shortcuts -->
+    <patternset id="meta.files">
+        <include name="**/*.xml"/>
+        <include name="**/*.properties"/>
+        <include name="**/*.dtd"/>
+        <include name="**/*.sql"/>
+    </patternset>
+
+    <!-- Clean up -->
+    <target name="clean" description="Clean the build directory">
+        <delete dir="${build.dir}"/>
+        <mkdir dir="${build.dir}"/>
+    </target>
+
+    <!-- Compile Java source -->
+    <target name="compile">
+        <mkdir dir="${build.classes.dir}"/>
+        <javac srcdir="${src.java.dir}"
+               destdir="${build.classes.dir}"
+               classpathref="project.classpath" debug="true"/>
+    </target>
+
+    <!-- Copy metadata to build classpath -->
+    <target name="copymetafiles">
+        <mkdir dir="${build.classes.dir}"/>
+        <copy todir="${build.classes.dir}">
+            <fileset dir="${src.java.dir}">
+                <patternset refid="meta.files"/>
+            </fileset>
+        </copy>
+        <copy todir="${build.classes.dir}">
+            <fileset dir="${src.conf.dir}">
+                <patternset refid="meta.files"/>
+            </fileset>
+        </copy>
+    </target>
+
+    <!-- ################ TestNG ###################### -->
+
+    <property name="test.output.dir" location="${build.dir}/test-output"/>
+
+    <taskdef resource="testngtasks" classpathref="project.classpath"/>
+
+    <target name="test.integration" depends="compile, copymetafiles" description="Run the integration tests">
+
+        <delete dir="${test.output.dir}"/>
+        <mkdir dir="${test.output.dir}"/>
+        <testng outputDir="${test.output.dir}">
+            <classpath>
+                <path refid="project.classpath"/>
+                <pathelement path="${build.classes.dir}"/>
+            </classpath>
+            <xmlfileset dir="${src.etc.dir}">
+                <include name="testsuite-integration-ejb3.xml"/>
+            </xmlfileset>
+        </testng>
+        <echo>Validate the result of the test in ${test.output.dir}!</echo>
+    </target>
+
+    <!-- ################ Hibernate Tools ###################### -->
+
+    <taskdef name="hibernatetool"
+             classname="org.hibernate.tool.ant.HibernateToolTask"
+             classpathref="project.classpath"/>
+
+    <!-- Export the database schema -->
+    <target name="schemaexport" depends="compile, copymetafiles"
+        description="Exports DDL to file in build directory">
+
+        <hibernatetool destdir="${build.dir}">
+            <classpath path="${build.classes.dir}"/>
+            <jpaconfiguration persistenceunit="caveatemptor"/>
+            <hbm2ddl
+                drop="true"
+                create="true"
+                export="false"
+                outputfilename="${proj.shortname}-ddl.sql"
+                delimiter=";"
+                format="true"/>
+        </hibernatetool>
+    </target>
+
+    <!-- ################ HSQL DB ###################### -->
+
+    <!-- Start the HSQL DB server -->
+    <target name="startdb" description="Run HSQL database server with clean DB">
+        <!-- Delete database files -->
+        <delete dir="${database.dir}"/>
+        <java classname="org.hsqldb.Server"
+              fork="yes"
+              classpathref="project.classpath"
+              failonerror="true">
+            <arg value="-database.0"/>
+            <arg value="file:${database.dir}/db"/>
+        </java>
+    </target>
+
+    <!-- Start the HSQL DB browser tool -->
+    <target name="dbmanager" description="Start HSQL DB manager">
+        <java
+            classname="org.hsqldb.util.DatabaseManagerSwing"
+            fork="yes"
+            classpathref="project.classpath"
+            failonerror="true">
+            <arg value="-url"/>
+            <arg value="jdbc:hsqldb:hsql://localhost/"/>
+            <arg value="-driver"/>
+            <arg value="org.hsqldb.jdbcDriver"/>
+        </java>
+    </target>
+	
+	<target name="package" depends="test.integration">
+		<jar destfile="caveatemptor-jpa.jar">
+			<fileset dir="build/classes">
+				<include name="**/*.class"/>
+				<!--exclude name="auction/test/**"/-->
+			</fileset>
+		</jar>
+	</target>
+
+</project>


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/build.xml
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/caveatemptor-jpa.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/caveatemptor-jpa.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/database/db.properties
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/database/db.properties	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/database/db.properties	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,17 @@
+#HSQL Database Engine
+#Fri Nov 06 14:31:54 GMT 2009
+hsqldb.script_format=0
+runtime.gc_interval=0
+sql.enforce_strict_size=false
+hsqldb.cache_size_scale=8
+readonly=false
+hsqldb.nio_data_file=true
+hsqldb.cache_scale=14
+version=1.8.0
+hsqldb.default_table_type=memory
+hsqldb.cache_file_scale=1
+hsqldb.log_size=200
+modified=yes
+hsqldb.cache_version=1.7.0
+hsqldb.original_version=1.8.0
+hsqldb.compatible_version=1.8.0

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/antlr.license.txt
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/antlr.license.txt	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/antlr.license.txt	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,32 @@
+
+SOFTWARE RIGHTS
+$Id: antlr.license.txt,v 1.1 2006/09/03 15:40:05 cbauer Exp $
+
+ANTLR 1989-2003 Developed by jGuru.com, 
+http://www.ANTLR.org  and http://www.jGuru.com
+
+We reserve no legal rights to the ANTLR--it is fully in the
+public domain. An individual or company may do whatever
+they wish with source code distributed with ANTLR or the
+code generated by ANTLR, including the incorporation of
+ANTLR, or its output, into commerical software.
+
+We encourage users to develop software with ANTLR. However,
+we do ask that credit is given to us for developing
+ANTLR. By "credit", we mean that if you use ANTLR or
+incorporate any source code into one of your programs
+(commercial product, research project, or otherwise) that
+you acknowledge this fact somewhere in the documentation,
+research report, etc... If you like ANTLR and have
+developed a nice tool with the output, please mention that
+you developed it using ANTLR. In addition, we ask that the
+headers remain intact in our source code. As long as these
+guidelines are kept, we expect to continue enhancing this
+system and expect to make other tools available as they are
+completed.
+
+The primary ANTLR guy:
+
+Terence Parr
+http://www.jGuru.com
+parrt at jguru.com


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/antlr.license.txt
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/apache.license-2.0.txt
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/apache.license-2.0.txt	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/apache.license-2.0.txt	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/apache.license-2.0.txt
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/apache.license.txt
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/apache.license.txt	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/apache.license.txt	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,57 @@
+/*
+ *
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999-2001 The Apache Software Foundation.  All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ *    any, must include the following acknowlegement:
+ *       "This product includes software developed by the
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowlegement may appear in the software itself,
+ *    if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Commons", and "Apache Software
+ *    Foundation" must not be used to endorse or promote products derived
+ *    from this software without prior written permission. For written
+ *    permission, please contact apache at apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ *    nor may "Apache" appear in their names without prior written
+ *    permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ */


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/apache.license.txt
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/dbunit-2.2-20060719.153040-1.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/dbunit-2.2-20060719.153040-1.jar
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/ejb3-persistence.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/ejb3-persistence.jar
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/hibernate-annotations.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/hibernate-annotations.jar
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/hibernate-core-3.3.0.GA.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/hibernate-core-3.3.0.GA.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/hibernate-entitymanager.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/hibernate-entitymanager.jar
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/hibernate-tools.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/hibernate-tools.jar
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/jboss-ejb3-all.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/jboss-ejb3-all.jar
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/lgpl.txt
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/lgpl.txt	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/lgpl.txt	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,504 @@
+		  GNU LESSER GENERAL PUBLIC LICENSE
+		       Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL.  It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+			    Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it.  You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+  When we speak of free software, we are referring to freedom of use,
+not price.  Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+  To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights.  These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  To protect each distributor, we want to make it very clear that
+there is no warranty for the free library.  Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+  Finally, software patents pose a constant threat to the existence of
+any free program.  We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder.  Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+  Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License.  This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License.  We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+  When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library.  The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom.  The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+  We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License.  It also provides other free software developers Less
+of an advantage over competing non-free programs.  These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries.  However, the Lesser license provides advantages in certain
+special circumstances.
+
+  For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard.  To achieve this, non-free programs must be
+allowed to use the library.  A more frequent case is that a free
+library does the same job as widely used non-free libraries.  In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+  In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software.  For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+  Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+		  GNU LESSER GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+  
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+  6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Use a suitable shared library mechanism for linking with the
+    Library.  A suitable mechanism is one that (1) uses at run time a
+    copy of the library already present on the user's computer system,
+    rather than copying library functions into the executable, and (2)
+    will operate properly with a modified version of the library, if
+    the user installs one, as long as the modified version is
+    interface-compatible with the version that the work was made with.
+
+    c) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    d) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    e) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+			    NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+		     END OF TERMS AND CONDITIONS
+		     
+           How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.  It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the library's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Lesser General Public
+    License as published by the Free Software Foundation; either
+    version 2.1 of the License, or (at your option) any later version.
+
+    This library is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+    Lesser General Public License for more details.
+
+    You should have received a copy of the GNU Lesser General Public
+    License along with this library; if not, write to the Free Software
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
+
+


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/lgpl.txt
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/slf4j-api-1.5.8.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/slf4j-api-1.5.8.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/slf4j-log4j12-1.5.8.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/slf4j-log4j12-1.5.8.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/testng-5.4-jdk15.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/testng-5.4-jdk15.jar
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/thirdparty-all.jar
===================================================================
(Binary files differ)


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/lib/thirdparty-all.jar
___________________________________________________________________
Name: svn:executable
   + *
Name: svn:mime-type
   + application/octet-stream

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/conf/META-INF/caveatemptor-beans.xml
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/conf/META-INF/caveatemptor-beans.xml	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/conf/META-INF/caveatemptor-beans.xml	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd"
+    xmlns="urn:jboss:bean-deployer:2.0">
+
+    <!-- Enable a JCA datasource available through JNDI -->
+    <bean name="caveatEmptorDatasourceFactory"
+          class="org.jboss.resource.adapter.jdbc.local.LocalTxDataSource">
+        <property name="jndiName">java:/caveatemptorTestingDatasource</property>
+
+        <!-- HSQL DB -->
+        <property name="driverClass">org.hsqldb.jdbcDriver</property>
+        <property name="connectionURL">jdbc:hsqldb:hsql://localhost</property>
+        <property name="userName">sa</property>
+
+        <property name="minSize">0</property>
+        <property name="maxSize">10</property>
+        <property name="blockingTimeout">1000</property>
+        <property name="idleTimeout">100000</property>
+
+        <property name="transactionManager"><inject bean="TransactionManager"/></property>
+        <property name="cachedConnectionManager"><inject bean="CachedConnectionManager"/></property>
+        <property name="initialContextProperties"><inject bean="InitialContextProperties"/></property>
+    </bean>
+
+    <bean name="caveatemptorTestingDatasource" class="java.lang.Object">
+	      <constructor factoryMethod="getDatasource">
+	          <factory bean="caveatEmptorDatasourceFactory"/>
+	      </constructor>
+    </bean>
+
+</deployment>


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/conf/META-INF/caveatemptor-beans.xml
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/conf/META-INF/persistence.xml
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/conf/META-INF/persistence.xml	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/conf/META-INF/persistence.xml	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,67 @@
+<persistence xmlns="http://java.sun.com/xml/ns/persistence"
+   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"
+   version="1.0">
+
+   <persistence-unit name="caveatemptor">
+
+       <!-- A managed datasource provided by the application server, in this
+            case the microcontainer, see caveatemptor-beans.xml definition.
+        -->
+       <jta-data-source>java:/caveatemptorTestingDatasource</jta-data-source>
+
+       <!-- The path to scan for entity classes, different than the root of this file
+       <jar-file>file:/home/work/local/hibernate/jpwh/caveatemptor.jpa/build/classes</jar-file>
+        -->
+
+       <properties>
+          <!-- Only scan and detect annotated entities -->
+           <property name="hibernate.archive.autodetection" value="class"/>
+
+          <!-- Only scan and detect hbm.xml files
+          <property name="hibernate.archive.autodetection" value="hbm"/>
+          -->
+
+          <!-- SQL stdout logging
+           -->
+          <property name="hibernate.show_sql" value="false"/>
+          <property name="hibernate.format_sql" value="true"/>
+          <property name="use_sql_comments" value="true"/>
+
+           <!-- We have a JTA data source...
+          <property name="hibernate.connection.driver_class"
+                    value="org.hsqldb.jdbcDriver"/>
+          <property name="hibernate.connection.url"
+                    value="jdbc:hsqldb:hsql://localhost"/>
+          <property name="hibernate.connection.username"
+                    value="sa"/>
+
+          <property name="hibernate.c3p0.min_size"
+                    value="5"/>
+          <property name="hibernate.c3p0.max_size"
+                    value="20"/>
+          <property name="hibernate.c3p0.timeout"
+                    value="300"/>
+          <property name="hibernate.c3p0.max_statements"
+                    value="50"/>
+          <property name="hibernate.c3p0.idle_test_period"
+                    value="3000"/>
+           -->
+
+          <property name="hibernate.dialect"
+                    value="org.hibernate.dialect.Oracle10gDialect"/>
+
+           <!-- Put the EntityManagerFactory into JNDI so we can use it manually in tests -->
+           <property name="jboss.entity.manager.factory.jndi.name"
+                     value="java:/EntityManagerFactories/caveatEmptorEMF"/>
+
+           <!-- Create the database schema when this test.persistence unit is deployed, drop
+                it (clean the database) when it is undeployed
+           -->
+           <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
+
+      </properties>
+   </persistence-unit>
+
+</persistence>


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/conf/META-INF/persistence.xml
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/conf/default.persistence.properties
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/conf/default.persistence.properties	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/conf/default.persistence.properties	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,2 @@
+hibernate.transaction.manager_lookup_class=org.hibernate.transaction.JBossTransactionManagerLookup
+hibernate.cache.provider_class=org.hibernate.cache.NoCacheProvider


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/conf/default.persistence.properties
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/conf/ejb3-interceptors-aop.xml
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/conf/ejb3-interceptors-aop.xml	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/conf/ejb3-interceptors-aop.xml	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,360 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE aop PUBLIC
+   "-//JBoss//DTD JBOSS AOP 1.0//EN"
+   "http://www.jboss.org/aop/dtd/jboss-aop_1_0.dtd">
+
+<aop>
+   <interceptor class="org.jboss.aspects.remoting.InvokeRemoteInterceptor" scope="PER_VM"/>
+   <interceptor class="org.jboss.aspects.security.SecurityClientInterceptor" scope="PER_VM"/>
+   <interceptor class="org.jboss.aspects.tx.ClientTxPropagationInterceptor" scope="PER_VM"/>
+   <interceptor class="org.jboss.ejb3.remoting.IsLocalInterceptor" scope="PER_VM"/>
+   <interceptor class="org.jboss.aspects.remoting.ClusterChooserInterceptor" scope="PER_VM"/>
+
+   <interceptor class="org.jboss.aspects.tx.TxPropagationInterceptor" scope="PER_VM"/>
+
+   <stack name="ServiceClientInterceptors">
+      <interceptor-ref name="org.jboss.ejb3.remoting.IsLocalInterceptor"/>
+      <interceptor-ref name="org.jboss.aspects.security.SecurityClientInterceptor"/>
+      <interceptor-ref name="org.jboss.aspects.tx.ClientTxPropagationInterceptor"/>
+      <interceptor-ref name="org.jboss.aspects.remoting.InvokeRemoteInterceptor"/>
+   </stack>
+
+   <stack name="AsynchronousStatelessSessionClientInterceptors">
+      <interceptor-ref name="org.jboss.ejb3.remoting.IsLocalInterceptor"/>
+      <interceptor-ref name="org.jboss.aspects.security.SecurityClientInterceptor"/>
+      <interceptor-ref name="org.jboss.aspects.tx.ClientTxPropagationInterceptor"/>
+      <interceptor-ref name="org.jboss.aspects.remoting.InvokeRemoteInterceptor"/>
+   </stack>
+
+   <stack name="AsynchronousStatefulSessionClientInterceptors">
+      <interceptor-ref name="org.jboss.ejb3.remoting.IsLocalInterceptor"/>
+      <interceptor-ref name="org.jboss.aspects.security.SecurityClientInterceptor"/>
+      <interceptor-ref name="org.jboss.aspects.tx.ClientTxPropagationInterceptor"/>
+      <interceptor-ref name="org.jboss.aspects.remoting.InvokeRemoteInterceptor"/>
+   </stack>
+
+   <stack name="StatelessSessionClientInterceptors">
+      <interceptor-ref name="org.jboss.ejb3.remoting.IsLocalInterceptor"/>
+      <interceptor-ref name="org.jboss.aspects.security.SecurityClientInterceptor"/>
+      <interceptor-ref name="org.jboss.aspects.tx.ClientTxPropagationInterceptor"/>
+      <interceptor-ref name="org.jboss.aspects.remoting.InvokeRemoteInterceptor"/>
+   </stack>
+
+   <stack name="StatefulSessionClientInterceptors">
+      <interceptor-ref name="org.jboss.ejb3.remoting.IsLocalInterceptor"/>
+      <interceptor-ref name="org.jboss.aspects.security.SecurityClientInterceptor"/>
+      <interceptor-ref name="org.jboss.aspects.tx.ClientTxPropagationInterceptor"/>
+      <interceptor-ref name="org.jboss.aspects.remoting.InvokeRemoteInterceptor"/>
+   </stack>
+
+   <stack name="ClusteredStatelessSessionClientInterceptors">
+      <interceptor-ref name="org.jboss.ejb3.remoting.IsLocalInterceptor"/>
+      <interceptor-ref name="org.jboss.aspects.security.SecurityClientInterceptor"/>
+      <interceptor-ref name="org.jboss.aspects.tx.ClientTxPropagationInterceptor"/>
+      <interceptor-ref name="org.jboss.aspects.remoting.ClusterChooserInterceptor"/>
+      <interceptor-ref name="org.jboss.aspects.remoting.InvokeRemoteInterceptor"/>
+   </stack>
+
+   <stack name="ClusteredStatefulSessionClientInterceptors">
+      <interceptor-ref name="org.jboss.ejb3.remoting.IsLocalInterceptor"/>
+      <interceptor-ref name="org.jboss.aspects.security.SecurityClientInterceptor"/>
+      <interceptor-ref name="org.jboss.aspects.tx.ClientTxPropagationInterceptor"/>
+      <interceptor-ref name="org.jboss.aspects.remoting.ClusterChooserInterceptor"/>
+      <interceptor-ref name="org.jboss.aspects.remoting.InvokeRemoteInterceptor"/>
+   </stack>
+
+   <interceptor class="org.jboss.ejb3.asynchronous.AsynchronousInterceptor" scope="PER_CLASS"/>
+   <interceptor class="org.jboss.ejb3.ENCPropagationInterceptor" scope="PER_VM"/>
+   <interceptor name="Basic Authorization" factory="org.jboss.ejb3.security.RoleBasedAuthorizationInterceptorFactory" scope="PER_CLASS"/>
+   <interceptor name="JACC Authorization" factory="org.jboss.ejb3.security.JaccAuthorizationInterceptorFactory" scope="PER_CLASS"/>
+   <interceptor factory="org.jboss.ejb3.security.AuthenticationInterceptorFactory" scope="PER_CLASS"/>
+   <interceptor factory="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory" scope="PER_CLASS"/>
+   <interceptor class="org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor" scope="PER_VM"/>
+   <interceptor class="org.jboss.ejb3.stateless.StatelessInstanceInterceptor" scope="PER_VM"/>
+   <interceptor class="org.jboss.ejb3.stateful.StatefulInstanceInterceptor" scope="PER_VM"/>
+   <interceptor class="org.jboss.ejb3.stateful.SessionSynchronizationInterceptor" scope="PER_VM"/>
+   <interceptor class="org.jboss.ejb3.service.ServiceSingletonInterceptor" scope="PER_VM"/>
+   <interceptor class="org.jboss.ejb3.cache.StatefulReplicationInterceptor" scope="PER_VM"/>
+   <interceptor factory="org.jboss.ejb3.stateful.StatefulRemoveFactory" scope="PER_CLASS_JOINPOINT"/>
+   <interceptor factory="org.jboss.ejb3.tx.TxInterceptorFactory" scope="PER_CLASS_JOINPOINT"/>
+   <interceptor factory="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory" scope="PER_CLASS_JOINPOINT"/>
+   <interceptor factory="org.jboss.ejb3.remoting.ReplicantsManagerInterceptorFactory" scope="PER_CLASS"/>
+   <interceptor class="org.jboss.ejb3.AllowedOperationsInterceptor" scope="PER_VM"/>
+   <interceptor factory="org.jboss.ejb3.mdb.CurrentMessageInjectorInterceptorFactory" scope="PER_CLASS"/>
+   <interceptor class="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor" scope="PER_VM"/>
+
+   <domain name="Stateless Bean">
+      <bind pointcut="execution(public * *->*(..))">
+         <interceptor-ref name="org.jboss.ejb3.asynchronous.AsynchronousInterceptor"/>
+         <interceptor-ref name="org.jboss.ejb3.ENCPropagationInterceptor"/>
+         <interceptor-ref name="org.jboss.ejb3.security.AuthenticationInterceptorFactory"/>
+      </bind>
+      <bind pointcut="execution(public * @org.jboss.annotation.security.SecurityDomain->*(..))">
+         <interceptor-ref name="Basic Authorization"/>
+      </bind>
+      <bind pointcut="execution(public * @javax.annotation.security.RunAs->*(..))">
+         <interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/>
+      </bind>
+      <bind pointcut="execution(public * @org.jboss.annotation.ejb.Clustered->*(..))">
+         <interceptor-ref name="org.jboss.ejb3.remoting.ReplicantsManagerInterceptorFactory"/>
+      </bind>
+      <bind pointcut="execution(public * *->*(..))">
+         <interceptor-ref name="org.jboss.ejb3.stateless.StatelessInstanceInterceptor"/>
+         <interceptor-ref name="org.jboss.aspects.tx.TxPropagationInterceptor"/>
+         <interceptor-ref name="org.jboss.ejb3.tx.TxInterceptorFactory"/>
+         <interceptor-ref name="org.jboss.ejb3.AllowedOperationsInterceptor"/>
+         <interceptor-ref name="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor"/>
+         <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/>
+      </bind>
+      <annotation expr="!class(@org.jboss.annotation.ejb.PoolClass)">
+         @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.ThreadlocalPool.class, maxSize=30, timeout=10000)
+      </annotation>
+   </domain>
+
+   <domain name="JACC Stateless Bean">
+      <bind pointcut="execution(public * *->*(..))">
+         <interceptor-ref name="org.jboss.ejb3.asynchronous.AsynchronousInterceptor"/>
+         <interceptor-ref name="org.jboss.ejb3.ENCPropagationInterceptor"/>
+         <interceptor-ref name="org.jboss.ejb3.security.AuthenticationInterceptorFactory"/>
+      </bind>
+      <bind pointcut="execution(public * @org.jboss.annotation.security.SecurityDomain->*(..))">
+         <interceptor-ref name="JACC Authorization"/>
+      </bind>
+      <bind pointcut="execution(public * @javax.annotation.security.RunAs->*(..))">
+         <interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/>
+      </bind>
+      <bind pointcut="execution(public * @org.jboss.annotation.ejb.Clustered->*(..))">
+         <interceptor-ref name="org.jboss.ejb3.remoting.ReplicantsManagerInterceptorFactory"/>
+      </bind>
+      <bind pointcut="execution(public * *->*(..))">
+         <interceptor-ref name="org.jboss.ejb3.stateless.StatelessInstanceInterceptor"/>
+         <interceptor-ref name="org.jboss.aspects.tx.TxPropagationInterceptor"/>
+         <interceptor-ref name="org.jboss.ejb3.tx.TxInterceptorFactory"/>
+         <interceptor-ref name="org.jboss.ejb3.AllowedOperationsInterceptor"/>
+         <interceptor-ref name="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor"/>
+         <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/>
+      </bind>
+      <annotation expr="!class(@org.jboss.annotation.ejb.PoolClass)">
+         @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.ThreadlocalPool.class, maxSize=30, timeout=10000)
+      </annotation>
+   </domain>
+
+   <domain name="Base Stateful Bean">
+      <bind pointcut="execution(public * *->*(..))">
+         <interceptor-ref name="org.jboss.ejb3.asynchronous.AsynchronousInterceptor"/>
+         <interceptor-ref name="org.jboss.ejb3.ENCPropagationInterceptor"/>
+         <interceptor-ref name="org.jboss.ejb3.security.AuthenticationInterceptorFactory"/>
+      </bind>
+      <bind pointcut="execution(public * @org.jboss.annotation.security.SecurityDomain->*(..))">
+         <interceptor-ref name="Basic Authorization"/>
+      </bind>
+      <bind pointcut="execution(public * @javax.annotation.security.RunAs->*(..))">
+         <interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/>
+      </bind>
+      <bind pointcut="execution(public * @org.jboss.annotation.ejb.Clustered->*(..))">
+         <interceptor-ref name="org.jboss.ejb3.remoting.ReplicantsManagerInterceptorFactory"/>
+      </bind>
+      <bind pointcut="execution(public * *->@javax.ejb.Remove(..))">
+         <interceptor-ref name="org.jboss.ejb3.stateful.StatefulRemoveFactory"/>
+      </bind>
+      <bind pointcut="execution(public * *->*(..))">
+         <interceptor-ref name="org.jboss.ejb3.stateful.StatefulInstanceInterceptor"/>
+         <interceptor-ref name="org.jboss.aspects.tx.TxPropagationInterceptor"/>
+         <interceptor-ref name="org.jboss.ejb3.tx.TxInterceptorFactory"/>
+         <interceptor-ref name="org.jboss.ejb3.AllowedOperationsInterceptor"/>
+      </bind>
+      <bind pointcut="execution(public * $instanceof{javax.ejb.SessionSynchronization}->*(..))">
+         <interceptor-ref name="org.jboss.ejb3.stateful.SessionSynchronizationInterceptor"/>
+      </bind>
+      <bind pointcut="execution(public * *->*(..))">
+         <interceptor-ref name="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor"/>
+         <interceptor-ref name="org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor"/>
+         <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/>
+      </bind>
+
+      <bind pointcut="execution(public * @org.jboss.annotation.ejb.Clustered->*(..)) AND !execution(public * *->@javax.ejb.Remove(..))">
+         <interceptor-ref name="org.jboss.ejb3.cache.StatefulReplicationInterceptor"/>
+      </bind>
+      <annotation expr="!class(@org.jboss.annotation.ejb.PoolClass)">
+         @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.ThreadlocalPool.class, maxSize=30, timeout=10000)
+      </annotation>
+   </domain>
+
+   <domain name="Stateful Bean" extends="Base Stateful Bean" inheritBindings="true">
+      <!-- NON Clustered cache configuration -->
+      <annotation expr="!class(@org.jboss.annotation.ejb.cache.Cache) AND !class(@org.jboss.annotation.ejb.Clustered)">
+         @org.jboss.annotation.ejb.cache.Cache (org.jboss.ejb3.cache.simple.SimpleStatefulCache.class)
+      </annotation>
+      <annotation expr="!class(@org.jboss.annotation.ejb.cache.simple.PersistenceManager) AND !class(@org.jboss.annotation.ejb.Clustered)">
+         @org.jboss.annotation.ejb.cache.simple.PersistenceManager (org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager.class)
+      </annotation>
+      <annotation expr="!class(@org.jboss.annotation.ejb.cache.simple.CacheConfig) AND !class(@org.jboss.annotation.ejb.Clustered)">
+         @org.jboss.annotation.ejb.cache.simple.CacheConfig (maxSize=100000, idleTimeoutSeconds=300)
+      </annotation>
+
+      <!-- Clustered cache configuration -->
+      <annotation expr="!class(@org.jboss.annotation.ejb.cache.Cache) AND class(@org.jboss.annotation.ejb.Clustered)">
+         @org.jboss.annotation.ejb.cache.Cache (org.jboss.ejb3.cache.tree.StatefulTreeCache.class)
+      </annotation>
+      <annotation expr="!class(@org.jboss.annotation.ejb.cache.tree.CacheConfig) AND class(@org.jboss.annotation.ejb.Clustered)">
+         @org.jboss.annotation.ejb.cache.tree.CacheConfig (name="jboss.cache:service=EJB3SFSBClusteredCache", maxSize=100000, idleTimeoutSeconds=300)
+      </annotation>
+   </domain>
+
+   <domain name="JACC Stateful Bean">
+      <bind pointcut="execution(public * *->*(..))">
+         <interceptor-ref name="org.jboss.ejb3.asynchronous.AsynchronousInterceptor"/>
+         <interceptor-ref name="org.jboss.ejb3.ENCPropagationInterceptor"/>
+         <interceptor-ref name="org.jboss.ejb3.security.AuthenticationInterceptorFactory"/>
+      </bind>
+      <bind pointcut="execution(public * @org.jboss.annotation.security.SecurityDomain->*(..))">
+         <interceptor-ref name="JACC Authorization"/>
+      </bind>
+      <bind pointcut="execution(public * @javax.annotation.security.RunAs->*(..))">
+         <interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/>
+      </bind>
+      <bind pointcut="execution(public * @org.jboss.annotation.ejb.Clustered->*(..))">
+         <interceptor-ref name="org.jboss.ejb3.remoting.ReplicantsManagerInterceptorFactory"/>
+      </bind>
+      <bind pointcut="execution(public * *->@javax.ejb.Remove(..))">
+         <interceptor-ref name="org.jboss.ejb3.stateful.StatefulRemoveFactory"/>
+      </bind>
+      <bind pointcut="execution(public * *->*(..))">
+         <interceptor-ref name="org.jboss.ejb3.stateful.StatefulInstanceInterceptor"/>
+         <interceptor-ref name="org.jboss.aspects.tx.TxPropagationInterceptor"/>
+         <interceptor-ref name="org.jboss.ejb3.tx.TxInterceptorFactory"/>
+         <interceptor-ref name="org.jboss.ejb3.AllowedOperationsInterceptor"/>
+      </bind>
+      <bind pointcut="execution(public * $instanceof{javax.ejb.SessionSynchronization}->*(..))">
+         <interceptor-ref name="org.jboss.ejb3.stateful.SessionSynchronizationInterceptor"/>
+      </bind>
+      <bind pointcut="execution(public * *->*(..))">
+         <interceptor-ref name="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor"/>
+         <interceptor-ref name="org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor"/>
+         <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/>
+      </bind>
+
+      <bind pointcut="execution(public * @org.jboss.annotation.ejb.Clustered->*(..)) AND !execution(public * *->@javax.ejb.Remove(..))">
+         <interceptor-ref name="org.jboss.ejb3.cache.StatefulReplicationInterceptor"/>
+      </bind>
+      <annotation expr="!class(@org.jboss.annotation.ejb.PoolClass)">
+         @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.ThreadlocalPool.class, maxSize=30, timeout=10000)
+      </annotation>
+
+      <!-- NON Clustered cache configuration -->
+      <annotation expr="!class(@org.jboss.annotation.ejb.cache.Cache) AND !class(@org.jboss.annotation.ejb.Clustered)">
+         @org.jboss.annotation.ejb.cache.Cache (org.jboss.ejb3.cache.simple.SimpleStatefulCache.class)
+      </annotation>
+      <annotation expr="!class(@org.jboss.annotation.ejb.cache.simple.PersistenceManager) AND !class(@org.jboss.annotation.ejb.Clustered)">
+         @org.jboss.annotation.ejb.cache.simple.PersistenceManager (org.jboss.ejb3.cache.simple.StatefulSessionFilePersistenceManager.class)
+      </annotation>
+      <annotation expr="!class(@org.jboss.annotation.ejb.cache.simple.CacheConfig) AND !class(@org.jboss.annotation.ejb.Clustered)">
+         @org.jboss.annotation.ejb.cache.simple.CacheConfig (maxSize=100000, idleTimeoutSeconds=300)
+      </annotation>
+
+      <!-- Clustered cache configuration -->
+      <annotation expr="!class(@org.jboss.annotation.ejb.cache.Cache) AND class(@org.jboss.annotation.ejb.Clustered)">
+         @org.jboss.annotation.ejb.cache.Cache (org.jboss.ejb3.cache.tree.StatefulTreeCache.class)
+      </annotation>
+      <annotation expr="!class(@org.jboss.annotation.ejb.cache.tree.CacheConfig) AND class(@org.jboss.annotation.ejb.Clustered)">
+         @org.jboss.annotation.ejb.cache.tree.CacheConfig (name="jboss.cache:service=EJB3SFSBClusteredCache", maxSize=100000, idleTimeoutSeconds=300)
+      </annotation>
+   </domain>
+
+   <domain name="Embedded Stateful Bean" extends="Base Stateful Bean" inheritBindings="true">
+      <!-- NON Clustered cache configuration -->
+      <annotation expr="!class(@org.jboss.annotation.ejb.cache.Cache)">
+         @org.jboss.annotation.ejb.cache.Cache (org.jboss.ejb3.cache.NoPassivationCache.class)
+      </annotation>
+
+   </domain>
+
+   <domain name="Message Driven Bean">
+      <bind pointcut="execution(public * @javax.annotation.security.RunAs->*(..))">
+         <interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/>
+      </bind>
+      <bind pointcut="execution(public * *->*(..))">
+         <interceptor-ref name="org.jboss.ejb3.stateless.StatelessInstanceInterceptor"/>
+         <interceptor-ref name="org.jboss.ejb3.tx.TxInterceptorFactory"/>
+         <interceptor-ref name="org.jboss.ejb3.AllowedOperationsInterceptor"/>
+         <interceptor-ref name="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor"/>
+         <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/>
+      </bind>
+      <annotation expr="!class(@org.jboss.annotation.ejb.PoolClass)">
+         @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.StrictMaxPool.class, maxSize=30, timeout=10000)
+      </annotation>
+   </domain>
+   
+   <domain name="Consumer Bean">
+      <bind pointcut="execution(public * @javax.annotation.security.RunAs->*(..))">
+         <interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/>
+      </bind>
+      <bind pointcut="execution(public * *->*(..))">
+         <interceptor-ref name="org.jboss.ejb3.stateless.StatelessInstanceInterceptor"/>
+         <interceptor-ref name="org.jboss.ejb3.tx.TxInterceptorFactory"/>
+         <interceptor-ref name="org.jboss.ejb3.AllowedOperationsInterceptor"/>
+         <interceptor-ref name="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor"/>
+      </bind>
+      <bind pointcut="execution(public * *->*(..)) AND (has(* *->@org.jboss.annotation.ejb.CurrentMessage(..)) OR hasfield(* *->@org.jboss.annotation.ejb.CurrentMessage))">
+         <interceptor-ref name="org.jboss.ejb3.mdb.CurrentMessageInjectorInterceptorFactory"/>
+      </bind>
+      <bind pointcut="execution(public * *->*(..))">
+         <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/>
+      </bind>
+      <annotation expr="!class(@org.jboss.annotation.ejb.PoolClass)">
+         @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.StrictMaxPool.class, maxSize=30, timeout=10000)
+      </annotation>
+   </domain>
+
+   <domain name="Service Bean">
+      <bind pointcut="execution(public * *->*(..))">
+         <interceptor-ref name="org.jboss.ejb3.asynchronous.AsynchronousInterceptor"/>
+         <interceptor-ref name="org.jboss.ejb3.ENCPropagationInterceptor"/>
+      </bind>
+      <bind pointcut="!execution(* *->create()) AND !execution(* *->start()) AND !execution(*->new(..))">
+         <interceptor-ref name="org.jboss.ejb3.security.AuthenticationInterceptorFactory"/>
+      </bind>      
+      <bind pointcut="execution(public * @org.jboss.annotation.security.SecurityDomain->*(..))">
+         <interceptor-ref name="Basic Authorization"/>
+      </bind>
+      <bind pointcut="execution(public * @javax.annotation.security.RunAs->*(..))">
+         <interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/>
+      </bind>
+      <bind pointcut="execution(public * *->*(..))">
+         <interceptor-ref name="org.jboss.aspects.tx.TxPropagationInterceptor"/>
+         <interceptor-ref name="org.jboss.ejb3.tx.TxInterceptorFactory"/>
+         <interceptor-ref name="org.jboss.ejb3.AllowedOperationsInterceptor"/>
+         <interceptor-ref name="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor"/>
+      </bind>
+      <bind pointcut="execution(public * *->*(..)) AND !execution(* *->create()) AND !execution(* *->start())">
+         <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/>
+      </bind>
+   </domain>
+
+   <domain name="JACC Service Bean">
+      <bind pointcut="execution(public * *->*(..))">
+         <interceptor-ref name="org.jboss.ejb3.asynchronous.AsynchronousInterceptor"/>
+         <interceptor-ref name="org.jboss.ejb3.ENCPropagationInterceptor"/>
+      </bind>
+      <bind pointcut="!execution(* *->create()) AND !execution(* *->start()) AND !execution(*->new(..))">
+         <interceptor-ref name="org.jboss.ejb3.security.AuthenticationInterceptorFactory"/>
+      </bind>      
+      <bind pointcut="execution(public * @org.jboss.annotation.security.SecurityDomain->*(..))">
+         <interceptor-ref name="Basic Authorization"/>
+      </bind>
+      <bind pointcut="execution(public * @javax.annotation.security.RunAs->*(..))">
+         <interceptor-ref name="org.jboss.ejb3.security.RunAsSecurityInterceptorFactory"/>
+      </bind>
+      <bind pointcut="execution(public * *->*(..))">
+         <interceptor-ref name="org.jboss.aspects.tx.TxPropagationInterceptor"/>
+         <interceptor-ref name="org.jboss.ejb3.tx.TxInterceptorFactory"/>
+         <interceptor-ref name="org.jboss.ejb3.AllowedOperationsInterceptor"/>
+         <interceptor-ref name="org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor"/>
+      </bind>
+      <bind pointcut="execution(public * *->*(..)) AND !execution(* *->create()) AND !execution(* *->start())">
+         <interceptor-ref name="org.jboss.ejb3.interceptor.EJB3InterceptorsFactory"/>
+      </bind>
+   </domain>
+
+
+</aop>
\ No newline at end of file


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/conf/ejb3-interceptors-aop.xml
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/conf/embedded-jboss-beans.xml
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/conf/embedded-jboss-beans.xml	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/conf/embedded-jboss-beans.xml	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,175 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            xsi:schemaLocation="urn:jboss:bean-deployer bean-deployer_1_0.xsd"
+            xmlns="urn:jboss:bean-deployer:2.0">
+   <bean name="Naming" class="org.jnp.server.SingletonNamingServer"/>
+
+   <bean name="InitialContextProperties" class="java.util.Hashtable">
+      <constructor>
+      <parameter class="java.util.Map">
+            <map keyClass="java.lang.String" valueClass="java.lang.String">
+               <entry>
+                  <key>java.naming.factory.initial</key>
+                  <value>org.jnp.interfaces.LocalOnlyContextFactory</value>
+               </entry>
+               <entry>
+                   <key>java.naming.factory.url.pkgs</key>
+                   <value>org.jboss.naming:org.jnp.interfaces</value>
+               </entry>
+            </map>
+      </parameter>
+      </constructor>
+   </bean>
+
+   <bean name="java:comp/Initializer" class="org.jboss.ejb3.embedded.JavaCompInitializer">
+      <property name="jndiProperties"><inject bean="InitialContextProperties"/></property>
+   </bean>
+
+   <bean name="XidFactory" class="org.jboss.tm.XidFactoryImpl"/>
+
+   <bean name="XidFactoryMBean" class="org.jboss.ejb3.embedded.XidFactoryMBean">
+      <constructor>
+         <parameter class="org.jboss.tm.XidFactoryBase">
+            <inject bean="XidFactory"/>
+         </parameter>
+      </constructor>
+   </bean>
+
+   <bean name="TransactionManagerInitializer" class="org.jboss.tm.TransactionManagerInitializer">
+      <property name="xidFactory"><inject bean="XidFactory"/></property>
+      <property name="initialContextProperties"><inject bean="InitialContextProperties"/></property>
+   </bean>
+
+   <bean name="UserTransaction" class="org.jboss.ejb3.embedded.UserTransactionImpl">
+      <demand>TransactionManagerInitializer</demand>
+   </bean>
+
+   <bean name="UserTransactionBinding" class="org.jboss.ejb3.embedded.JndiBinder">
+      <property name="jndiProperties"><inject bean="InitialContextProperties"/></property>
+      <property name="target"><inject bean="UserTransaction"/></property>
+      <property name="bindTo">UserTransaction</property>
+      <property name="serializable">false</property>
+   </bean>
+
+
+   <bean name="TransactionManager" class="java.lang.Object">
+      <constructor factoryMethod="getTransactionManager">
+         <factory bean="TransactionManagerInitializer"/>
+      </constructor>
+   </bean>
+   <bean name="CachedConnectionManager" class="org.jboss.resource.connectionmanager.CachedConnectionManagerReference">
+      <property name="transactionManager"><inject bean="TransactionManager"/></property>
+   </bean>
+
+   <!--
+      <bean class="org.jboss.jdbc.HypersonicDatabase"
+        name="jboss:service=Hypersonic,database=localDB">
+        <property name="database">localDB</property>
+        <property name="inProcessMode">true</property>
+        <property name="dbDataDir">.</property>
+      </bean>
+   -->
+<!--
+   <bean name="DefaultDSBootstrap" class="org.jboss.resource.adapter.jdbc.local.LocalTxDataSource">
+      <property name="driverClass">org.hsqldb.jdbcDriver</property>
+      <property name="connectionURL">jdbc:hsqldb:.</property>
+      <property name="userName">sa</property>
+      <property name="jndiName">java:/DefaultDS</property>
+      <property name="minSize">0</property>
+      <property name="maxSize">10</property>
+      <property name="blockingTimeout">1000</property>
+      <property name="idleTimeout">100000</property>
+      <property name="transactionManager"><inject bean="TransactionManager"/></property>
+      <property name="cachedConnectionManager"><inject bean="CachedConnectionManager"/></property>
+      <property name="initialContextProperties"><inject bean="InitialContextProperties"/></property>
+   </bean>
+
+   <bean name="DefaultDS" class="java.lang.Object">
+      <constructor factoryMethod="getDatasource">
+         <factory bean="DefaultDSBootstrap"/>
+      </constructor>
+   </bean>
+-->
+    
+   <!--
+   <bean name="TimerServiceFactory" class="org.jboss.ejb3.timerservice.quartz.QuartzTimerServiceFactory">
+      <property name="properties">
+        	org.quartz.jobStore.class=org.quartz.impl.jdbcjobstore.JobStoreCMT
+            org.quartz.jobStore.nonManagedTXDataSource=myDS
+            org.quartz.jobStore.driverDelegateClass=org.quartz.impl.jdbcjobstore.HSQLDBDelegate
+            org.quartz.jobStore.tablePrefix=QRTZ_
+            org.quartz.jobStore.dataSource=myDS
+         
+	        # To get it to work with hypersonic
+	        # FIXME: this doesn't lock the row
+            org.quartz.jobStore.selectWithLockSQL=SELECT * FROM qrtz_locks WHERE lock_name = ?
+         
+        	# from quartz.properties
+            org.quartz.scheduler.instanceName=JBossEJB3QuartzScheduler
+            org.quartz.scheduler.rmi.export=false
+            org.quartz.scheduler.rmi.proxy=false
+            org.quartz.scheduler.wrapJobExecutionInUserTransaction=false
+   
+            org.quartz.threadPool.class=org.quartz.simpl.SimpleThreadPool
+            org.quartz.threadPool.threadCount=10
+            org.quartz.threadPool.threadPriority=5
+            org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread=true
+   
+        	org.quartz.jobStore.misfireThreshold=60000
+      </property>
+      <property name="dataSource">java:/DefaultDS</property>
+      <property name="sqlProperties">
+         CREATE_DB_ON_STARTUP = TRUE
+         
+         CREATE_TABLE_JOB_DETAILS = CREATE TABLE qrtz_job_details(JOB_NAME VARCHAR(80) NOT NULL, JOB_GROUP VARCHAR(80) NOT NULL, \
+            DESCRIPTION VARCHAR(120) NULL, JOB_CLASS_NAME VARCHAR(128) NOT NULL, IS_DURABLE VARCHAR(1) NOT NULL, \
+            IS_VOLATILE VARCHAR(1) NOT NULL, IS_STATEFUL VARCHAR(1) NOT NULL, REQUESTS_RECOVERY VARCHAR(1) NOT NULL, \
+            JOB_DATA BINARY NULL, PRIMARY KEY (JOB_NAME,JOB_GROUP))
+         CREATE_TABLE_JOB_LISTENERS = CREATE TABLE qrtz_job_listeners(JOB_NAME VARCHAR(80) NOT NULL, JOB_GROUP VARCHAR(80) NOT NULL, \
+            JOB_LISTENER VARCHAR(80) NOT NULL, PRIMARY KEY (JOB_NAME,JOB_GROUP,JOB_LISTENER), FOREIGN KEY (JOB_NAME,JOB_GROUP) \
+            REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP))
+         CREATE_TABLE_TRIGGERS = CREATE TABLE qrtz_triggers(TRIGGER_NAME VARCHAR(80) NOT NULL, TRIGGER_GROUP VARCHAR(80) NOT NULL, \
+            JOB_NAME VARCHAR(80) NOT NULL, JOB_GROUP VARCHAR(80) NOT NULL, IS_VOLATILE VARCHAR(1) NOT NULL, DESCRIPTION VARCHAR(120) NULL, \
+            NEXT_FIRE_TIME NUMERIC(13) NULL, PREV_FIRE_TIME NUMERIC(13) NULL, TRIGGER_STATE VARCHAR(16) NOT NULL, \
+            TRIGGER_TYPE VARCHAR(8) NOT NULL, START_TIME NUMERIC(13) NOT NULL, END_TIME NUMERIC(13) NULL, CALENDAR_NAME VARCHAR(80) NULL, \
+            MISFIRE_INSTR NUMERIC(2) NULL, JOB_DATA BINARY NULL, PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP), FOREIGN KEY (JOB_NAME,JOB_GROUP) \
+            REFERENCES QRTZ_JOB_DETAILS(JOB_NAME,JOB_GROUP))
+         CREATE_TABLE_SIMPLE_TRIGGERS = CREATE TABLE qrtz_simple_triggers(TRIGGER_NAME VARCHAR(80) NOT NULL, \
+            TRIGGER_GROUP VARCHAR(80) NOT NULL, REPEAT_COUNT NUMERIC(7) NOT NULL, REPEAT_INTERVAL NUMERIC(12) NOT NULL, \
+            TIMES_TRIGGERED NUMERIC(7) NOT NULL, PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP), FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP) \
+            REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP))
+         CREATE_TABLE_CRON_TRIGGERS = CREATE TABLE qrtz_cron_triggers(TRIGGER_NAME VARCHAR(80) NOT NULL, \
+            TRIGGER_GROUP VARCHAR(80) NOT NULL, CRON_EXPRESSION VARCHAR(80) NOT NULL, TIME_ZONE_ID VARCHAR(80), \
+            PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP), FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP) \
+            REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP))
+         CREATE_TABLE_BLOB_TRIGGERS = CREATE TABLE qrtz_blob_triggers(TRIGGER_NAME VARCHAR(80) NOT NULL, \
+            TRIGGER_GROUP VARCHAR(80) NOT NULL, BLOB_DATA BINARY NULL, PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP), \
+            FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP) REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP))
+         CREATE_TABLE_TRIGGER_LISTENERS = CREATE TABLE qrtz_trigger_listeners(TRIGGER_NAME VARCHAR(80) NOT NULL, \
+            TRIGGER_GROUP VARCHAR(80) NOT NULL, TRIGGER_LISTENER VARCHAR(80) NOT NULL, \
+            PRIMARY KEY (TRIGGER_NAME,TRIGGER_GROUP,TRIGGER_LISTENER), FOREIGN KEY (TRIGGER_NAME,TRIGGER_GROUP) \
+            REFERENCES QRTZ_TRIGGERS(TRIGGER_NAME,TRIGGER_GROUP))
+         CREATE_TABLE_CALENDARS = CREATE TABLE qrtz_calendars(CALENDAR_NAME VARCHAR(80) NOT NULL, CALENDAR BINARY NOT NULL, \
+            PRIMARY KEY (CALENDAR_NAME))
+         CREATE_TABLE_PAUSED_TRIGGER_GRPS = CREATE TABLE qrtz_paused_trigger_grps(TRIGGER_GROUP VARCHAR(80) NOT NULL, \
+            PRIMARY KEY (TRIGGER_GROUP))
+         CREATE_TABLE_FIRED_TRIGGERS = CREATE TABLE qrtz_fired_triggers(ENTRY_ID VARCHAR(95) NOT NULL, TRIGGER_NAME VARCHAR(80) NOT NULL, \
+            TRIGGER_GROUP VARCHAR(80) NOT NULL, IS_VOLATILE VARCHAR(1) NOT NULL, INSTANCE_NAME VARCHAR(80) NOT NULL, \
+            FIRED_TIME NUMERIC(13) NOT NULL, STATE VARCHAR(16) NOT NULL, JOB_NAME VARCHAR(80) NULL, JOB_GROUP VARCHAR(80) NULL, \
+            IS_STATEFUL VARCHAR(1) NULL, REQUESTS_RECOVERY VARCHAR(1) NULL, PRIMARY KEY (ENTRY_ID))
+         CREATE_TABLE_SCHEDULER_STATE = CREATE TABLE qrtz_scheduler_state(INSTANCE_NAME VARCHAR(80) NOT NULL, \
+            LAST_CHECKIN_TIME NUMERIC(13) NOT NULL, CHECKIN_INTERVAL NUMERIC(13) NOT NULL, RECOVERER VARCHAR(80) NULL, \
+            PRIMARY KEY (INSTANCE_NAME))
+         CREATE_TABLE_LOCKS = CREATE TABLE qrtz_locks(LOCK_NAME VARCHAR(40) NOT NULL, PRIMARY KEY (LOCK_NAME))
+         INSERT_TRIGGER_ACCESS = INSERT INTO qrtz_locks values('TRIGGER_ACCESS')
+         INSERT_JOB_ACCESS = INSERT INTO qrtz_locks values('JOB_ACCESS')
+         INSERT_CALENDAR_ACCESS = INSERT INTO qrtz_locks values('CALENDAR_ACCESS')
+         INSERT_STATE_ACCESS = INSERT INTO qrtz_locks values('STATE_ACCESS')
+         INSERT_MISFIRE_ACCESS = INSERT INTO qrtz_locks values('MISFIRE_ACCESS')
+      </property>
+   </bean>
+
+   -->
+   
+</deployment>
\ No newline at end of file


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/conf/embedded-jboss-beans.xml
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/conf/jndi.properties
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/conf/jndi.properties	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/conf/jndi.properties	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,2 @@
+java.naming.factory.initial org.jnp.interfaces.LocalOnlyContextFactory
+java.naming.factory.url.pkgs org.jboss.naming:org.jnp.interfaces


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/conf/jndi.properties
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/conf/log4j.properties
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/conf/log4j.properties	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/conf/log4j.properties	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,21 @@
+# 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=WARN, 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


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/conf/log4j.properties
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/testsuite-integration-ejb3.xml
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/testsuite-integration-ejb3.xml	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/etc/testsuite-integration-ejb3.xml	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,43 @@
+<!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"/>
+
+    <!-- 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"/>
+    
+    <!-- Database dataset location for DBUnit -->
+    <parameter name="basedata_location" value="auction/test/basedata.xml"/>
+    
+    <!-- Database dataset factory for DBUnit -->
+    <parameter name="datatype_factory" value="org.dbunit.ext.hsqldb.HsqldbDataTypeFactory"/>
+    
+    <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/caveatemptor-jpa-061211/src/etc/testsuite-integration-ejb3.xml
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/BillingDetailsDAO.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/BillingDetailsDAO.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/BillingDetailsDAO.java	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,20 @@
+package auction.dao;
+
+import auction.model.*;
+
+import java.util.*;
+
+/**
+ * Business DAO operations related to the <tt>BillingDetails</tt> entity.
+ * <p>
+ * @see auction.model.BillingDetails
+ * @see auction.model.CreditCard
+ * @see auction.model.BankAccount
+ *
+ * @author Christian Bauer
+ */
+public interface BillingDetailsDAO extends GenericDAO<BillingDetails, Long> {
+
+    public List<BillingDetails> findConcrete(Class concreteClass);
+
+}


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/BillingDetailsDAO.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/CategoryDAO.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/CategoryDAO.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/CategoryDAO.java	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,19 @@
+package auction.dao;
+
+
+import auction.model.Category;
+
+import java.util.List;
+
+/**
+ * Business DAO operations related to the <tt>Category</tt> entity.
+ *
+ * @see auction.model.Category
+ *
+ * @author Christian Bauer
+ */
+public interface CategoryDAO extends GenericDAO<Category, Long> {
+
+    public List<Category> findAll(boolean onlyRootCategories);
+
+}


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/CategoryDAO.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/GenericDAO.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/GenericDAO.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/GenericDAO.java	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,30 @@
+package auction.dao;
+
+import java.util.List;
+import java.io.Serializable;
+
+/**
+ * An interface shared by all business data access objects.
+ * <p>
+ * All CRUD (create, read, update, delete) basic data access operations are
+ * isolated in this interface and shared accross all DAO implementations.
+ * The current design is for a state-management oriented persistence layer
+ * (for example, there is no UDPATE statement function) that provides
+ * automatic transactional dirty checking of business objects in persistent
+ * state.
+ *
+ * @author Christian Bauer
+ */
+public interface GenericDAO<T, ID extends Serializable> {
+
+    T findById(ID id, boolean lock);
+
+    List<T> findAll();
+
+    List<T> findByExample(T exampleInstance, String... excludeProperty);
+
+    T makePersistent(T entity);
+
+    void makeTransient(T entity);
+
+}


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/GenericDAO.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/ItemDAO.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/ItemDAO.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/ItemDAO.java	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,26 @@
+package auction.dao;
+
+import auction.model.Item;
+import auction.model.Bid;
+
+
+/**
+ * Business DAO operations related to the <tt>Item</tt> entity.
+ * <p>
+ * Note the usage of the constants for named query declaration. That way,
+ * naming of queries is centralized and checked at compile time. Of course,
+ * this can be broken by externalizing queries into XML metadata, but it
+ * is type-safe for queries declared in annotations. See the entity class
+ * source for an example.
+ *
+ * @see auction.model.Item
+ *
+ * @author Christian Bauer
+ */
+public interface ItemDAO extends GenericDAO<Item, Long> {
+
+    Bid getMaxBid(Item item);
+    Bid getMinBid(Item item);
+    public Item fetchWithBids(Item item);
+
+}


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/ItemDAO.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/UserDAO.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/UserDAO.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/UserDAO.java	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,13 @@
+package auction.dao;
+
+import auction.model.User;
+
+
+/**
+ * Business DAO operations related to the <tt>User</tt> entity.
+ *
+ * @see auction.model.User
+ *
+ * @author Christian Bauer
+ */
+public interface UserDAO extends GenericDAO<User, Long> { }


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/UserDAO.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/ejb3/BillingDetailsDAOBean.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/ejb3/BillingDetailsDAOBean.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/ejb3/BillingDetailsDAOBean.java	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,26 @@
+package auction.dao.ejb3;
+
+import auction.dao.BillingDetailsDAO;
+import auction.model.BillingDetails;
+
+import javax.ejb.*;
+import java.util.*;
+
+/**
+ * EJB3-specific implementation of the <tt>CategoryDAO</tt> non-CRUD data access object.
+ *
+ * @author Christian Bauer
+ */
+
+ at Stateless
+ at TransactionAttribute(TransactionAttributeType.REQUIRED)
+public class BillingDetailsDAOBean
+        extends     GenericEJB3DAO<BillingDetails, Long>
+        implements  BillingDetailsDAO {
+
+    @SuppressWarnings("unchecked")
+    public List<BillingDetails> findConcrete(Class concreteClass) {
+        return getEntityManager()
+                .createQuery("select c from " + concreteClass.getName() + " c").getResultList();
+    }
+}


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/ejb3/BillingDetailsDAOBean.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/ejb3/CategoryDAOBean.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/ejb3/CategoryDAOBean.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/ejb3/CategoryDAOBean.java	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,30 @@
+package auction.dao.ejb3;
+
+import auction.dao.CategoryDAO;
+import auction.model.Category;
+
+import javax.ejb.*;
+import java.util.List;
+
+/**
+ * EJB 3.0 implementation of the <tt>CategoryDAO</tt> non-CRUD data access object.
+ *
+ * @author Christian Bauer
+ */
+ at Stateless
+ at TransactionAttribute(TransactionAttributeType.REQUIRED)
+public class CategoryDAOBean
+        extends     GenericEJB3DAO<Category, Long>
+        implements  CategoryDAO {
+
+    @SuppressWarnings("unchecked")
+    public List<Category> findAll(boolean onlyRootCategories) {
+        if (onlyRootCategories)
+            return getEntityManager().createQuery("select c from "+ getEntityBeanType().getName() + " c" +
+                                                  " where c.parentCategory is null").getResultList();
+            // Or bind ourself to a Hibernate extension and use findByCriteria(Criterion...) from superclass?
+        else
+            return findAll();
+    } 
+
+}


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/ejb3/CategoryDAOBean.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/ejb3/GenericEJB3DAO.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/ejb3/GenericEJB3DAO.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/ejb3/GenericEJB3DAO.java	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,118 @@
+package auction.dao.ejb3;
+
+import javax.persistence.*;
+import java.util.*;
+import java.io.Serializable;
+import java.lang.reflect.ParameterizedType;
+
+import auction.dao.GenericDAO;
+
+/**
+ * Implements the generic CRUD data access operations using Java Persistence APIs.
+ * <p>
+ * To write a DAO, subclass and parameterize this class with your entity.
+ * Of course, assuming that you have a traditional 1:1 appraoch for
+ * Entity:DAO design. This is actually an implementation that uses some
+ * extensions for Java Persistence from Hibernate - you can see how the
+ * packages for the extensions are not imported, but named inline.
+ *
+ * @author Christian Bauer
+ */
+public abstract class GenericEJB3DAO<T,ID extends Serializable>
+        implements GenericDAO<T, ID> {
+
+    final private Class<T> entityBeanType;
+
+    protected EntityManager em;
+
+    public GenericEJB3DAO() {
+        this.entityBeanType = (Class<T>) ((ParameterizedType) getClass().getSuperclass()
+                                .getGenericSuperclass()).getActualTypeArguments()[0];
+    }
+
+    // If this DAO is wired in as a Seam component, Seam injects the right persistence context
+    // if a method on this DAO is called. If the caller is a conversational stateful component,
+    // the persistence context will be scoped to the conversation, not to the method call.
+    // You can call this method and set the EntityManager manually, in an integration test.
+    /*
+    @PersistenceContext
+    public void setEntityManager(EntityManager em) {
+        this.em = em;
+    }
+   */
+    protected EntityManager getEntityManager() {
+        if (em == null)
+            throw new IllegalStateException("EntityManager has not been set on DAO before usage");
+        return em;
+    }
+
+    public Class<T> getEntityBeanType() {
+        return entityBeanType;
+    }
+
+    public T findById(ID id, boolean lock) {
+        final T entity;
+        if (lock) {
+            entity = getEntityManager().find(getEntityBeanType(), id);
+            em.lock(entity, javax.persistence.LockModeType.WRITE);
+        } else {
+            entity = getEntityManager().find(getEntityBeanType(), id);
+        }
+        return entity;
+    }
+
+    @SuppressWarnings("unchecked")
+    public List<T> findAll() {
+        return getEntityManager().createQuery("from " + getEntityBeanType().getName() ).getResultList();
+    }
+
+
+    @SuppressWarnings("unchecked")
+    public List<T> findByExample(T exampleInstance, String... excludeProperty) {
+        // Using Hibernate, more difficult with EntityManager and EJB-QL
+        org.hibernate.Criteria crit = ((org.hibernate.ejb.HibernateEntityManager)getEntityManager())
+                            .getSession()
+                            .createCriteria(getEntityBeanType());
+        org.hibernate.criterion.Example example =
+                org.hibernate.criterion.Example.create(exampleInstance);
+        for (String exclude : excludeProperty) {
+            example.excludeProperty(exclude);
+        }
+        crit.add(example);
+        return crit.list();
+    }
+
+    public T makePersistent(T entity) {
+        return getEntityManager().merge(entity);
+    }
+
+    public void makeTransient(T entity) {
+        getEntityManager().remove(entity);
+    }
+
+    public void flush() {
+        getEntityManager().flush();
+    }
+
+    public void clear() {
+        getEntityManager().clear();
+    }
+
+    /**
+     * Use this inside subclasses as a convenience method.
+     */
+    @SuppressWarnings("unchecked")
+    protected List<T> findByCriteria(org.hibernate.criterion.Criterion... criterion) {
+        // Using Hibernate, more difficult with EntityManager and EJB-QL
+        org.hibernate.Session session =
+                ((org.hibernate.ejb.HibernateEntityManager)getEntityManager()).getSession();
+        org.hibernate.Criteria crit
+                = session.createCriteria(getEntityBeanType());
+        for (org.hibernate.criterion.Criterion c : criterion) {
+            crit.add(c);
+        }
+        return crit.list();
+   }
+
+}
+


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/ejb3/GenericEJB3DAO.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/ejb3/ItemDAOBean.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/ejb3/ItemDAOBean.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/ejb3/ItemDAOBean.java	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,49 @@
+package auction.dao.ejb3;
+
+import auction.model.Bid;
+import auction.model.Item;
+import auction.dao.ItemDAO;
+
+import javax.ejb.*;
+
+import java.util.List;
+
+/**
+ * EJB3-specific implementation of the <tt>ItemDAO</tt> non-CRUD data access object.
+ *
+ * @author Christian Bauer
+ */
+ at Stateless
+ at TransactionAttribute(TransactionAttributeType.REQUIRED)
+public class ItemDAOBean extends GenericEJB3DAO<Item, Long> implements ItemDAO {
+
+    public Bid getMaxBid(Item item) {
+        // TODO: em.getSingleResult() doesn't return null but throws an exception, how inconvenient
+        Bid currentMaxBid = null;
+        List result = getEntityManager()
+                            .createNamedQuery("Item-getMaxBid")
+                             .setParameter("itemId", item.getId())
+                             .getResultList();
+        if (result.size() > 0) currentMaxBid = (Bid)result.get(0);
+        return currentMaxBid;
+    }
+
+    public Bid getMinBid(Item item) {
+        // TODO: em.getSingleResult() doesn't return null but throws an exception, how inconvenient
+        Bid currentMinBid = null;
+        List result = getEntityManager()
+                             .createNamedQuery("Item-getMinBid")
+                             .setParameter("itemId", item.getId())
+                             .getResultList();
+        if (result.size() > 0) currentMinBid = (Bid)result.get(0);
+        return currentMinBid;
+    }
+
+    public Item fetchWithBids(Item item) {
+        return (Item) getEntityManager()
+                .createQuery("select i from Item i left join fetch i.bids where i = :item")
+                 .setParameter("item", item)
+                 .getSingleResult();
+    }
+
+}


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/ejb3/ItemDAOBean.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/ejb3/UserDAOBean.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/ejb3/UserDAOBean.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/ejb3/UserDAOBean.java	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,16 @@
+package auction.dao.ejb3;
+
+
+import auction.model.User;
+import auction.dao.UserDAO;
+
+import javax.ejb.*;
+
+/**
+ * EJB3-specific implementation of the <tt>UserDataAccess</tt> non-CRUD data access object.
+ *
+ * @author Christian Bauer
+ */
+ at Stateless
+ at TransactionAttribute(TransactionAttributeType.REQUIRED)
+public class UserDAOBean extends GenericEJB3DAO<User, Long> implements UserDAO { }


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/dao/ejb3/UserDAOBean.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/exceptions/BusinessException.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/exceptions/BusinessException.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/exceptions/BusinessException.java	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,26 @@
+package auction.exceptions;
+
+/**
+ * This exception is used to mark business rule violations.
+ *
+ * @author Christian Bauer
+ */
+public class BusinessException
+	extends RuntimeException {
+
+	public static final String ERROR_MSG = "business_error_msg";
+
+	public BusinessException() {}
+
+	public BusinessException(String message) {
+		super(message);
+	}
+
+	public BusinessException(String message, Throwable cause) {
+		super(message, cause);
+	}
+
+	public BusinessException(Throwable cause) {
+		super(cause);
+	}
+}


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/exceptions/BusinessException.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/exceptions/PermissionException.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/exceptions/PermissionException.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/exceptions/PermissionException.java	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,24 @@
+package auction.exceptions;
+
+/**
+ * This exception is used to mark access violations.
+ *
+ * @author Christian Bauer
+ */
+public class PermissionException
+	extends RuntimeException {
+
+	public PermissionException() {}
+
+	public PermissionException(String message) {
+		super(message);
+	}
+
+	public PermissionException(String message, Throwable cause) {
+		super(message, cause);
+	}
+
+	public PermissionException(Throwable cause) {
+		super(cause);
+	}
+}


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/exceptions/PermissionException.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/Address.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/Address.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/Address.java	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,86 @@
+package auction.model;
+
+import javax.persistence.Embeddable;
+import javax.persistence.Column;
+import java.io.Serializable;
+
+/**
+ * The address of a User.
+ *
+ * An instance of this class is always associated with only
+ * one <tt>User</tt> and depends on that parent objects lifecycle,
+ * it is a component. Of course, other entity classes can also
+ * embed addresses.
+ *
+ * @see User
+ * @author Christian Bauer
+ */
+ at Embeddable
+public class Address implements Serializable {
+
+    @Column(length = 255, nullable = false)
+	private String street;
+
+    @Column(length = 16, nullable = false)
+	private String zipcode;
+
+    @Column(length = 255, nullable = false)
+	private String city;
+
+	/**
+	 * No-arg constructor for JavaBean tools
+	 */
+	public Address() {}
+
+	/**
+	 * Full constructor
+	 */
+	public Address(String street, String zipcode, String city) {
+		this.street = street;
+		this.zipcode = zipcode;
+		this.city = city;
+	}
+
+	// ********************** Accessor Methods ********************** //
+
+	public String getStreet() { return street; }
+	public void setStreet(String street) { this.street = street; }
+
+	public String getZipcode() { return zipcode; }
+	public void setZipcode(String zipcode) { this.zipcode = zipcode; }
+
+	public String getCity() { return city; }
+	public void setCity(String city) { this.city = city; }
+
+	// ********************** Common Methods ********************** //
+
+	public boolean equals(Object o) {
+		if (this == o) return true;
+		if (!(o instanceof Address)) return false;
+
+		final Address address = (Address) o;
+
+		if (!city.equals(address.city)) return false;
+		if (!street.equals(address.street)) return false;
+		if (!zipcode.equals(address.zipcode)) return false;
+
+		return true;
+	}
+
+	public int hashCode() {
+		int result;
+		result = street.hashCode();
+		result = 29 * result + zipcode.hashCode();
+		result = 29 * result + city.hashCode();
+		return result;
+	}
+
+	public String toString() {
+		return  "Street: '" + getStreet() + "', " +
+				"Zipcode: '" + getZipcode() + "', " +
+				"City: '" + getCity() + "'";
+	}
+
+	// ********************** Business Methods ********************** //
+
+}


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/Address.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/AddressEntity.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/AddressEntity.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/AddressEntity.java	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,112 @@
+package auction.model;
+
+import javax.persistence.*;
+import java.io.Serializable;
+
+
+/**
+ * The address of a User.
+ *
+ * This entity class supports shared references, e.g. the
+ * same instance can be referenced by a User (shippingAddress)
+ * and by a Shipment (deliveryAddress).
+ *
+ * @see User
+ * @see Shipment
+ * @author Christian Bauer
+ */
+ at org.hibernate.annotations.GenericGenerator(
+    name = "userAddressSharedPKGenerator",
+    strategy ="foreign",
+    parameters = @org.hibernate.annotations.Parameter(name = "property", value = "user")
+)
+
+ at Entity
+ at Table(name = "ADDRESS")
+public class AddressEntity implements Serializable {
+
+    @Id @GeneratedValue(generator = "userAddressSharedPKGenerator")
+    @Column(name = "ADDRESS_ID")
+    // TODO: This is ignored: @org.hibernate.annotations.ForeignKey(name = "FK_ADDRESS_USERS_SHARED_PK")
+    private Long id = null;
+
+    @Version
+    @Column(name = "OBJ_VERSION")
+    private int version = 0;
+
+    @Column(name = "STREET", length = 255, nullable = false)
+    private String street;
+
+    @Column(name = "ZIPCODE", length = 16, nullable = false)
+    private String zipcode;
+
+    @Column(name = "CITY", length = 255, nullable = false)
+    private String city;
+
+    @OneToOne(optional = false, fetch = FetchType.LAZY)
+    @PrimaryKeyJoinColumn
+    private User user;
+
+    /**
+     * No-arg constructor for JavaBean tools
+     */
+    public AddressEntity() {}
+
+    /**
+     * Full constructor
+     */
+    public AddressEntity(String street, String zipcode, String city) {
+        this.street = street;
+        this.zipcode = zipcode;
+        this.city = city;
+    }
+
+    // ********************** Accessor Methods ********************** //
+
+    public Long getId() { return id; }
+    public void setId(Long id) { this.id = id; }
+    public int getVersion() { return version; }
+
+    public String getStreet() { return street; }
+    public void setStreet(String street) { this.street = street; }
+
+    public String getZipcode() { return zipcode; }
+    public void setZipcode(String zipcode) { this.zipcode = zipcode; }
+
+    public String getCity() { return city; }
+    public void setCity(String city) { this.city = city; }
+
+    public User getUser() { return user; }
+    public void setUser(User user) { this.user = user; }
+
+    // ********************** Common Methods ********************** //
+
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof AddressEntity)) return false;
+
+        final AddressEntity address = (AddressEntity) o;
+
+        if (!city.equals(address.city)) return false;
+        if (!street.equals(address.street)) return false;
+        return zipcode.equals(address.zipcode);
+
+    }
+
+    public int hashCode() {
+        int result;
+        result = street.hashCode();
+        result = 29 * result + zipcode.hashCode();
+        result = 29 * result + city.hashCode();
+        return result;
+    }
+
+    public String toString() {
+        return  "Street: '" + getStreet() + "', " +
+                "Zipcode: '" + getZipcode() + "', " +
+                "City: '" + getCity() + "'";
+    }
+
+    // ********************** Business Methods ********************** //
+
+}


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/AddressEntity.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/Auditable.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/Auditable.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/Auditable.java	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,11 @@
+package auction.model;
+
+/**
+ * A marker interface for auditable persistent domain classes.
+ *
+ * @author Christian Bauer
+ */
+public interface Auditable {
+
+	public Long getId();
+}


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/Auditable.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/BankAccount.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/BankAccount.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/BankAccount.java	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,71 @@
+package auction.model;
+
+import javax.persistence.Entity;
+import javax.persistence.DiscriminatorValue;
+import javax.persistence.Column;
+
+/**
+ * This billing strategy uses a simple bank account.
+ *
+ * @author Christian Bauer
+ */
+ at Entity
+ at DiscriminatorValue("BA")
+public class BankAccount extends BillingDetails {
+
+    @Column(name = "BA_ACCOUNT", nullable = true, length = 16)
+    private String account;
+
+    @Column(name = "BA_BANKNAME", nullable = true, length = 255)
+    private String bankname;
+
+    @Column(name = "BA_SWIFT", nullable = true, length = 15)
+    private String swift;
+
+    /**
+     * No-arg constructor for JavaBean tools
+     */
+    public BankAccount() { super(); }
+
+    /**
+     * Full constructor.
+     *
+     * @param owner
+     * @param user
+     * @param account
+     * @param bankname
+     * @param swift
+     */
+    public BankAccount(String owner, User user, String account, String bankname, String swift) {
+        super(owner, user);
+        this.account = account;
+        this.bankname = bankname;
+        this.swift = swift;
+    }
+
+    // ********************** Accessor Methods ********************** //
+
+    public String getAccount() { return account; }
+    public void setAccount(String account) { this.account = account; }
+
+    public String getBankname() { return bankname; }
+    public void setBankname(String bankname) { this.bankname = bankname; }
+
+    public String getSwift() { return swift; }
+    public void setSwift(String swift) { this.swift = swift; }
+
+    // ********************** Common Methods ********************** //
+
+    public String toString() {
+        return  "BankAccount ('" + getId() + "'), " +
+                "Account: '" + getAccount() + "'";
+    }
+
+    // ********************** Business Methods ********************** //
+
+    public boolean isValid() {
+        // TODO: Validate bank account syntax.
+        return true;
+    }
+
+}


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/BankAccount.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/Bid.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/Bid.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/Bid.java	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,142 @@
+package auction.model;
+
+import javax.persistence.*;
+
+import org.hibernate.annotations.GenericGenerator;
+import org.hibernate.annotations.Parameter;
+
+import java.io.Serializable;
+import java.util.Date;
+
+
+/**
+ * An immutable class representing one bid.
+ * <p>
+ * If the "successful" property is used in a legacy situation
+ * (see book chapter 8), it is no longer an immutable class with
+ * consequences for second-level caching.
+ * <p>
+ * Note: This legacy mapping isn't currently possible with annotations.
+ *
+ * @see Item
+ * @see User
+ * @author Christian Bauer
+ */
+ at Entity
+ at Table(name = "BID")
+ at org.hibernate.annotations.Entity(mutable = false)
+public class Bid implements Serializable, Comparable {
+
+    @Id 
+    @GeneratedValue (generator="bid_seq")
+    @GenericGenerator(
+          name="bid_seq"
+          , strategy="org.hibernate.id.enhanced.SequenceStyleGenerator"
+          , parameters=
+             { @Parameter(name="sequence_name", value="bid_seq")
+             , @Parameter(name="initial_value", value="1000")})
+    @Column(name = "BID_ID")
+    private Long id = null;
+
+    @org.hibernate.annotations.Type(type = "monetary_amount_usd")
+    @org.hibernate.annotations.Columns( columns = {
+			@Column( name="BID_AMOUNT", length = 2, updatable = false),
+			@Column( name="BID_AMOUNT_CURRENCY", length = 3, updatable = false)
+        }
+	)
+    private MonetaryAmount amount;
+
+    @ManyToOne
+    @JoinColumn(name = "ITEM_ID", nullable = false, updatable = false, insertable = false)
+    @org.hibernate.annotations.ForeignKey(name="FK_ITEM_ID")
+	private Item item;
+
+    @ManyToOne
+    @JoinColumn(name = "BIDDER_ID", nullable = false, updatable = false)
+    @org.hibernate.annotations.ForeignKey(name="FK_BIDDER_ID")
+    private User bidder;
+
+    @Temporal(TemporalType.TIMESTAMP)
+    @Column(name="CREATED", nullable = false, updatable = false)
+	private Date created = new Date();
+
+    // TODO: This can't be mapped in annotations, there is no <properties> grouping
+    @Transient
+    private boolean successful = false;
+
+    /**
+	 * No-arg constructor for JavaBean tools
+	 */
+	public Bid() {}
+
+	/**
+	 * Full constructor
+	 *
+	 * @param amount
+	 * @param item
+	 * @param bidder
+	 */
+
+	public Bid(MonetaryAmount amount, Item item, User bidder) {
+		this.amount = amount;
+		this.item = item;
+		this.bidder = bidder;
+	}
+
+	// ********************** Accessor Methods ********************** //
+
+	public Long getId() { return id; }
+
+	public MonetaryAmount getAmount() { return amount; }
+
+	public Item getItem() { return item; }
+
+	public User getBidder() { return bidder; }
+
+	public Date getCreated() { return created; }
+
+    public boolean isSuccessful() { return successful; }
+    public void setSuccessful(boolean successful) { this.successful = successful; }
+
+    // ********************** Common Methods ********************** //
+
+	public boolean equals(Object o) {
+		if (this == o) return true;
+		if (!(o instanceof Bid)) return false;
+
+		final Bid bid = (Bid) o;
+
+        if (! getItem().getId().equals(bid.getItem().getId())) return false;
+        if (! (created.getTime() == bid.created.getTime()) ) return false;
+
+        if (!amount.equals(bid.amount)) return false;
+
+		return true;
+	}
+
+	public int hashCode() {
+		int result;
+		result = amount.hashCode();
+		result = 29 * result + created.hashCode();
+		return result;
+	}
+
+	public String toString() {
+		return  "Bid ('" + getId() + "'), " +
+				"Created: '" + getCreated() + "' " +
+				"Amount: '" + getAmount() + "'";
+	}
+
+	public int compareTo(Object o) {
+		if (o instanceof Bid) {
+            // Don't compare Date objects! Use the time in milliseconds!
+            return Long.valueOf(this.getCreated().getTime()).compareTo(
+                    Long.valueOf( ((Bid)o).getCreated().getTime())
+                   );
+		}
+		return 0;
+	}
+
+	// ********************** Business Methods ********************** //
+
+}
\ No newline at end of file


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/Bid.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/BillingDetails.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/BillingDetails.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/BillingDetails.java	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,140 @@
+package auction.model;
+
+import java.io.Serializable;
+import java.util.Date;
+
+import javax.persistence.Column;
+import javax.persistence.DiscriminatorColumn;
+import javax.persistence.DiscriminatorType;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.Inheritance;
+import javax.persistence.InheritanceType;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+import javax.persistence.Temporal;
+import javax.persistence.TemporalType;
+import javax.persistence.Version;
+
+import org.hibernate.annotations.GenericGenerator;
+import org.hibernate.annotations.Parameter;
+
+/**
+ * This is the abstract superclass for BillingDetails.
+ * <p>
+ * A BillingDetails object is always associated with a single
+ * User and depends on the lifecycle of that user. It represents
+ * one of the billing strategies the User has choosen, usually
+ * one BillingDetails is the default in a collection of many.
+ *
+ * @author Christian Bauer
+ */
+ at Entity
+ at Table(name = "BILLING_DETAILS")
+ at Inheritance(strategy = InheritanceType.SINGLE_TABLE)
+ at DiscriminatorColumn(
+    name = "BILLING_DETAILS_TYPE",
+    discriminatorType = DiscriminatorType.STRING
+)
+public abstract class BillingDetails implements Serializable, Comparable {
+
+    @Id 
+    @GeneratedValue (generator="billingde_seq")
+    @GenericGenerator(
+          name="billingde_seq"
+          , strategy="org.hibernate.id.enhanced.SequenceStyleGenerator"
+          , parameters=
+             { @Parameter(name="sequence_name", value="billingde_seq")
+             , @Parameter(name="initial_value", value="1000")})
+    
+    @Column(name = "BILLING_DETAILS_ID")
+    private Long id = null;
+
+    @Version
+    @Column(name = "OBJ_VERSION")
+    private int version = 0;
+
+    @Column(name = "OWNER", nullable = false)
+    private String owner;
+
+    @ManyToOne(fetch = FetchType.LAZY)
+    @JoinColumn(name = "USER_ID", updatable = false)
+    @org.hibernate.annotations.ForeignKey(name = "FK_USER_ID")
+    private User user;
+
+    @Temporal(TemporalType.TIMESTAMP)
+    @Column(name="CREATED", nullable = false, updatable = false)
+	private Date created = new Date();
+
+	/**
+	 * No-arg constructor for JavaBean tools
+	 */
+	public BillingDetails() {}
+
+
+    /**
+     * Full constructor
+     */
+    protected BillingDetails(String owner, User user) {
+        this.owner = owner;
+        this.user = user;
+    }
+
+    // ********************** Accessor Methods ********************** //
+
+    public Long getId() { return id; }
+    public int getVersion() { return version; }
+
+    public String getOwner() { return owner; }
+    public void setOwner(String owner) { this.owner = owner; }
+
+    public User getUser() { return user; }
+
+	public Date getCreated() { return created; }
+
+	// ********************** Common Methods ********************** //
+
+    // TODO: This is not a very good equals() implementation
+    public boolean equals(Object o) {
+		if (this == o) return true;
+		if (!(o instanceof BillingDetails)) return false;
+
+		final BillingDetails billingDetails = (BillingDetails) o;
+
+        if (! (created.getTime() == billingDetails.created.getTime()) ) return false;
+		if (!getOwner().equals(billingDetails.getOwner())) return false;
+
+		return true;
+	}
+
+	public int hashCode() {
+		int result;
+		result = getCreated().hashCode();
+		result = 29 * result + getOwner().hashCode();
+		return result;
+	}
+
+	public int compareTo(Object o) {
+		if (o instanceof BillingDetails)
+            // Don't compare Date objects! Use the time in milliseconds!
+            return Long.valueOf(this.getCreated().getTime()).compareTo(
+                    Long.valueOf( ((BillingDetails)o).getCreated().getTime())
+                   );
+		return 0;
+	}
+
+	// ********************** Business Methods ********************** //
+
+	/**
+	 * Checks if the billing information is correct.
+	 * <p>
+	 * Check algorithm is implemented in subclasses.
+	 *
+	 * @return boolean
+	 */
+	public abstract boolean isValid();
+
+}


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/BillingDetails.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/CategorizedItem.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/CategorizedItem.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/CategorizedItem.java	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,149 @@
+package auction.model;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * A single item in a single category, with additional information.
+ * <p>
+ * This is really a very special mapping. The CategorizedItem class
+ * represents a join table. The ER model for this is really
+ * a many-to-many association, but instead of two entities and two
+ * collections, we mapped this as two one-to-many associations between
+ * three entities. One of the motivation for this are the additional
+ * attributes on the association table (not only two FKs): username
+ * and creation date.
+ * <p>
+ * To create a new link between a Category and an Item, instantiate
+ * an object of this class using the right constructor. Note that
+ * the Category and Item have to have an identifier value, they have
+ * to be either in persistent or detached state. Transient Category
+ * and Item instances don't work.
+ *
+ * @see Category
+ * @see Item
+ * @author Christian Bauer
+ */
+ at Entity
+ at org.hibernate.annotations.Entity(mutable = false)
+ at Table(name = "CATEGORIZED_ITEM")
+public class CategorizedItem implements Serializable, Comparable {
+
+    /**
+     * Emedded composite identifier class that represents the
+     * primary key columns of the many-to-many join table.
+     */
+    @Embeddable
+    public static class Id implements Serializable {
+        @Column(name = "CATEGORY_ID")
+		private Long categoryId;
+        @Column(name = "ITEM_ID")
+		private Long itemId;
+
+        public Id() {}
+
+        public Id(Long categoryId, Long itemId) {
+			this.categoryId = categoryId;
+			this.itemId = itemId;
+		}
+
+		public boolean equals(Object o) {
+			if (o instanceof Id) {
+				Id that = (Id)o;
+				return this.categoryId.equals(that.categoryId) &&
+					   this.itemId.equals(that.itemId);
+			} else {
+				return false;
+			}
+		}
+
+		public int hashCode() {
+			return categoryId.hashCode() + itemId.hashCode();
+		}
+	}
+
+    @EmbeddedId
+	private Id id;
+
+    @Column(name = "ADDED_BY_USER", nullable = false, length = 16)
+	private String username; // This could also be a many-to-one association to User
+
+    @Temporal(TemporalType.TIMESTAMP)
+    @Column(name = "ADDED_ON")
+	private Date dateAdded = new Date();
+
+    @ManyToOne(fetch = FetchType.LAZY)
+    @JoinColumn(name="ITEM_ID", insertable = false, updatable = false)
+    @org.hibernate.annotations.ForeignKey(name = "FK_CATEGORIZED_ITEM_ITEM_ID")
+    private Item item;
+
+    @ManyToOne(fetch = FetchType.LAZY)
+    @JoinColumn(name="CATEGORY_ID", insertable = false, updatable = false)
+    @org.hibernate.annotations.ForeignKey(name = "FK_CATZED_ITM_CAT_ID")
+    private Category category;
+
+	/**
+	 * No-arg constructor for JavaBean tools
+	 */
+    public CategorizedItem() {}
+
+	/**
+	 * Full constructor, the Category and Item instances have to have an
+     * identifier value, they have to be in detached or persistent state.
+     * This constructor takes care of the bidirectional relationship by
+     * adding the new instance to the collections on either side of the
+     * many-to-many association (added to the collections).
+	 */
+	public CategorizedItem(String username, Category category, Item item) {
+		this.username = username;
+
+		this.category = category;
+		this.item = item;
+
+		// Set primary key
+        this.id = new Id(category.getId(), item.getId());
+
+		// Guarantee referential integrity
+		category.getCategorizedItems().add(this);
+		item.getCategorizedItems().add(this);
+	}
+
+	// ********************** Accessor Methods ********************** //
+
+	public Id getId() { return id; }
+
+	public String getUsername() { return username; }
+	public Date getDateAdded() { return dateAdded; }
+
+	public Category getCategory() { return category; }
+	public Item getItem() { return item; }
+
+	// ********************** Common Methods ********************** //
+
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+        final CategorizedItem that = (CategorizedItem) o;
+        return id.equals(that.id);
+    }
+
+    public int hashCode() {
+        return id.hashCode();
+    }
+
+    public int compareTo(Object o) {
+		// CategorizedItems are sorted by date
+		if (o instanceof CategorizedItem)
+			return getDateAdded().compareTo( ((CategorizedItem)o).getDateAdded() );
+		return 0;
+	}
+
+	public String toString() {
+		return  "Added by: '" + getUsername() + "', " +
+				"On Date: '" + getDateAdded();
+	}
+
+	// ********************** Business Methods ********************** //
+
+}
\ No newline at end of file


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/CategorizedItem.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/CategorizedItemComponent.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/CategorizedItemComponent.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/CategorizedItemComponent.java	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,105 @@
+package auction.model;
+
+import javax.persistence.*;
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * A single item in a single category, with additional information.
+ * <p>
+ * This is really a very special mapping. The CategorizedItemComponent
+ * class represents a join table. The ER model for this is really
+ * a many-to-many association, but instead of two entities and two
+ * collections, we mapped this as a single collection (in Category)
+ * of composite elements, instances of this class. This simplifies
+ * the lifecycle of the association. Navigation is however only
+ * possible from Category -> CategorizedItemComponent -> Item, not
+ * in the other direction.
+ *
+ * @see Category
+ * @see Item
+ * @author Christian Bauer
+ */
+ at Embeddable
+public class CategorizedItemComponent implements Serializable, Comparable {
+
+    @Column(name = "ADDED_BY_USER", nullable = false, updatable = false, length = 16)
+    private String username; // This could also be a many-to-one association to User
+
+    @Temporal(TemporalType.TIMESTAMP)
+    @Column(name = "ADDED_ON", nullable = false, updatable = false)
+    private Date dateAdded = new Date();
+
+    @ManyToOne
+    @JoinColumn(name = "ITEM_ID", nullable = false, updatable = false)
+    @org.hibernate.annotations.ForeignKey(name = "FK_CAT_ITM_COMP_ITEM_ID")
+    private Item item;
+
+    @org.hibernate.annotations.Parent
+    private Category category;
+
+	/**
+	 * No-arg constructor for JavaBean tools
+	 */
+    CategorizedItemComponent() {}
+
+	/**
+	 * Full constructor
+	 */
+	public CategorizedItemComponent(String username, Category category, Item item) {
+		this.username = username;
+		this.category = category;
+		this.item = item;
+	}
+
+	// ********************** Accessor Methods ********************** //
+
+    public String getUsername() { return username; }
+
+    public Date getDateAdded() { return dateAdded; }
+
+    public Item getItem() { return item; }
+
+    public Category getCategory() { return category; }
+    public void setCategory(Category category) { this.category = category; } // TODO: Hibernate requires this?
+
+    // ********************** Common Methods ********************** //
+
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+
+        final CategorizedItemComponent that = (CategorizedItemComponent) o;
+
+        if (!category.equals(that.category)) return false;
+        if (!dateAdded.equals(that.dateAdded)) return false;
+        if (!item.equals(that.item)) return false;
+        if (!username.equals(that.username)) return false;
+
+        return true;
+    }
+
+    public int hashCode() {
+        int result;
+        result = username.hashCode();
+        result = 29 * result + dateAdded.hashCode();
+        result = 29 * result + item.hashCode();
+        result = 29 * result + category.hashCode();
+        return result;
+    }
+
+    public int compareTo(Object o) {
+		// CategorizedItems are sorted by date
+		if (o instanceof CategorizedItemComponent)
+			return getDateAdded().compareTo( ((CategorizedItemComponent)o).getDateAdded() );
+		return 0;
+	}
+
+	public String toString() {
+		return  "Added by: '" + getUsername() + "', " +
+				"On Date: '" + getDateAdded();
+	}
+
+	// ********************** Business Methods ********************** //
+
+}
\ No newline at end of file


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/CategorizedItemComponent.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/Category.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/Category.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/Category.java	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,261 @@
+package auction.model;
+
+import javax.persistence.*;
+
+import org.hibernate.annotations.GenericGenerator;
+import org.hibernate.annotations.Parameter;
+
+import java.io.Serializable;
+import java.util.*;
+
+/**
+ * The CaveatEmptor Category can have child categories and each has items.
+ * <p>
+ * Categories can be nested, this is expressed as a bidirectional one-to-many
+ * relationship that references parent and child categories.
+ * <p>
+ * Each Category can have many items (and an item can be in many categories). This
+ * is a many-to-many relationship. There are four strategies how you can map it.
+ * <p>
+ * First, the collection <tt>items</tt> is a true many-to-many association, with
+ * collections on both sides. There are no additional columns in the underlying
+ * many-to-many join table.
+ * <p>
+ * Second, the collection <tt>categorizedItems</tt> is a one-to-many association
+ * to an entity class <tt>CategorizedItem</tt> that represents the link. The
+ * <tt>Item</tt> class has the same collection mapped, to make it bidirectional.
+ * This intermediate class represents additional columns on the many-to-many
+ * join table, such as the user who added the item to the category, and the date
+ * of the addition.
+ * <p>
+ * Third, the collection <tt>categorizedItemComponents</tt> is a collection of
+ * value typed elements, of value type <tt>CategorizedItemComponent</tt>. This
+ * simplifies management of the link (no intermediate entity class) but allows
+ * only unidirectional navigation. The <tt>Item</tt> class does not know anything
+ * about this collection or the components - no shared references.
+ * <p>
+ * Finally, the map <tt>itemsAndUser</tt> represents the many-to-many association
+ * with a ternary relationship using a hash map. This map has item objects as keys,
+ * and user objects as values. The underlying many-to-many join table has three
+ * columns, <tt>CATEGORY_ID</tt>, <tt>ITEM_ID</tt>, and <tt>ADDED_BY_USER_ID</tt>.
+ * This strategy allows you to map an additional column (the user foreign key) of
+ * a many-to-many join table without writing an intermediate entity or component
+ * class.
+ *
+ * @see Item
+ * @see CategorizedItem
+ * @see CategorizedItemComponent
+ * @author Christian Bauer
+ */
+ at Entity
+ at Table(
+   name = "CATEGORY",
+   uniqueConstraints =
+    @UniqueConstraint(columnNames = {"CATEGORY_NAME", "PARENT_CATEGORY_ID"})
+    // If you want a constraint name in the schema, use <database-object> in XML instead
+)
+public class Category implements Serializable, Comparable {
+
+    @Id
+    @GeneratedValue (generator="category_seq")
+    @GenericGenerator(
+          name="category_seq"
+          , strategy="org.hibernate.id.enhanced.SequenceStyleGenerator"
+          , parameters=
+             { @Parameter(name="sequence_name", value="category_seq")
+             , @Parameter(name="initial_value", value="1000")})
+
+    @Column(name = "CATEGORY_ID")
+    private Long id = null;
+
+    @Version
+    @Column(name = "OBJ_VERSION")
+    private int version = 0;
+
+    @Column(name = "CATEGORY_NAME", length = 255, nullable = false)
+    private String name;
+
+    @OneToMany(mappedBy = "parentCategory", cascade = {CascadeType.PERSIST, CascadeType.MERGE})
+    @org.hibernate.annotations.OrderBy(clause = "CATEGORY_NAME asc")
+    private List<Category> childCategories = new ArrayList<Category>(); // A bag with SQL ORDER BY
+
+    @ManyToOne(fetch = FetchType.LAZY)
+    @JoinColumn(name = "PARENT_CATEGORY_ID", nullable = true)
+    @org.hibernate.annotations.ForeignKey(name = "FK_CATEGORY_PARENT_ID")
+    private Category parentCategory;
+
+    @ManyToMany
+    @JoinTable(
+        name = "CATEGORY_ITEM",
+        joinColumns =        @JoinColumn(name = "CATEGORY_ID"),
+        inverseJoinColumns = @JoinColumn(name = "ITEM_ID")
+    )
+    @org.hibernate.annotations.IndexColumn(name = "DISPLAY_POSITION")
+    @org.hibernate.annotations.ForeignKey(
+        name        = "FK_CATEGORY_ITEM_CATEGORY_ID",
+        inverseName = "FK_CATEGORY_ITEM_ITEM_ID"
+    )
+    @org.hibernate.annotations.Filter(
+        name = "limitItemsByUserRank",
+        condition = ":currentUserRank >= (select u.RANK from USERS u where u.USER_ID = SELLER_ID)"
+    )
+    private List<Item> items = new ArrayList<Item>();
+
+    @OneToMany(cascade = CascadeType.ALL, mappedBy = "category")
+    @org.hibernate.annotations.Cascade(value = org.hibernate.annotations.CascadeType.DELETE_ORPHAN)
+    @org.hibernate.annotations.Fetch(org.hibernate.annotations.FetchMode.SUBSELECT)
+    private Set<CategorizedItem> categorizedItems = new HashSet<CategorizedItem>();
+
+    @org.hibernate.annotations.CollectionOfElements
+    @JoinTable(
+        name = "CATEGORIZED_ITEM_COMPONENTS",
+        joinColumns = @JoinColumn(name = "CATEGORY_ID")
+    )
+    @org.hibernate.annotations.ForeignKey(name = "FK_CAT_ITEM_COMP_CAT_ID")
+    private Set<CategorizedItemComponent> categorizedItemComponents = new HashSet<CategorizedItemComponent>();
+
+    @ManyToMany
+    @org.hibernate.annotations.MapKeyManyToMany(
+        joinColumns = @JoinColumn(name = "ITEM_ID")
+    )
+    @JoinTable(
+        name = "CATEGORY_ITEMS_BY_USER",
+        joinColumns = @JoinColumn(name = "CATEGORY_ID"),
+        inverseJoinColumns = @JoinColumn(name = "USER_ID")
+    )
+    @org.hibernate.annotations.ForeignKey(
+        name = "FK_CAT_ITMS_BY_USR_CAT_ID",
+        inverseName = "FK_CAT_ITMS_BY_USR_USER_ID"
+        // TODO: Can't declare the foreign key constraint name for ITEM_ID...
+    )
+    private Map<Item,User> itemsAndUser = new HashMap<Item,User>();
+
+    @Temporal(TemporalType.TIMESTAMP)
+    @Column(name="CREATED", nullable = false, updatable = false)
+    private Date created = new Date();
+
+    /**
+     * No-arg constructor for JavaBean tools
+     */
+    public Category() {}
+
+    /**
+     * Full constructor
+     */
+    public Category(String name,
+                    List<Category> childCategories,
+                    Category parentCategory,
+                    List<Item> items,
+                    Set<CategorizedItem> categorizedItems,
+                    Set<CategorizedItemComponent> categorizedItemComponents,
+                    Map<Item, User> itemsAndUser) {
+        this.name = name;
+        this.childCategories = childCategories;
+        this.parentCategory = parentCategory;
+        this.items = items;
+        this.categorizedItems = categorizedItems;
+        this.categorizedItemComponents = categorizedItemComponents;
+        this.itemsAndUser = itemsAndUser;
+    }
+
+    /**
+     * Simple constructors
+     */
+    public Category(String name) {
+        this.name = name;
+    }
+
+    public Category(String name, Category parentCategory) {
+        this.name = name;
+        this.parentCategory = parentCategory;
+    }
+
+    // ********************** Accessor Methods ********************** //
+
+    public Long getId() { return id; }
+    public int getVersion() { return version; }
+
+    public String getName() { return name; }
+    public void setName(String name) { this.name = name; }
+
+    public List getChildCategories() { return childCategories; }
+    public void addChildCategory(Category childCategory) {
+        if (childCategory == null) throw new IllegalArgumentException("Null child category!");
+        if (childCategory.getParentCategory() != null)
+            childCategory.getParentCategory().getChildCategories().remove(childCategory);
+        childCategory.setParentCategory(parentCategory);
+        childCategories.add(childCategory);
+    }
+    public void removeChildCategory(Category childCategory) {
+        if (childCategory == null) throw new IllegalArgumentException("Null child category!");
+        childCategory.setParentCategory(null);
+        childCategories.remove(childCategory);
+    }
+
+    public Category getParentCategory() { return parentCategory; }
+    private void setParentCategory(Category parentCategory) { this.parentCategory = parentCategory; }
+
+    // Regular many-to-many
+    public List<Item> getItems() { return items; }
+    public void addItem(Item item) {
+        if (item == null) throw new IllegalArgumentException("Null item!");
+        items.add(item);
+        item.getCategories().add(this);
+    }
+    public void removeItem(Item item) {
+        if (item == null) throw new IllegalArgumentException("Null item!");
+        items.remove(item);
+        item.getCategories().remove(this);
+    }
+
+    // Many-to-many with additional columns on join table, intermediate entity class
+    // To create a link, instantiate a CategorizedItem with the right constructor
+    // To remove a link, use getCategorizedItems().remove()
+    public Set<CategorizedItem> getCategorizedItems() { return categorizedItems; }
+
+    // Many-to-many with additional columns on join table, intermediate component class
+    public Set<CategorizedItemComponent> getCategorizedItemComponents() { return categorizedItemComponents; }
+
+    // Many-to-many with additional columns on join table, ternary hash map representation
+    public Map<Item, User> getItemsAndUser() { return itemsAndUser; }
+
+    public Date getCreated() { return created; }
+
+    // ********************** Common Methods ********************** //
+
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (o == null || getClass() != o.getClass()) return false;
+
+        final Category category = (Category) o;
+
+        if (!created.equals(category.created)) return false;
+        if (!name.equals(category.name)) return false;
+        return !(parentCategory != null ?
+                !parentCategory.equals(category.parentCategory) :
+                category.parentCategory != null);
+
+    }
+
+    public int hashCode() {
+        int result;
+        result = name.hashCode();
+        result = 29 * result + (parentCategory != null ? parentCategory.hashCode() : 0);
+        result = 29 * result + created.hashCode();
+        return result;
+    }
+
+    public int compareTo(Object o) {
+        if (o instanceof Category) {
+            return this.getName().compareTo( ((Category)o).getName() );
+        }
+        return 0;
+    }
+
+    public String toString() {
+        return  "(" + getId() + ") Name: '" + getName();
+    }
+
+    // ********************** Business Methods ********************** //
+
+}


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/Category.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/Comment.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/Comment.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/Comment.java	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,140 @@
+package auction.model;
+
+import javax.persistence.*;
+
+import org.hibernate.annotations.GenericGenerator;
+import org.hibernate.annotations.Parameter;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * An immutable class representing a comment from users.
+ * <p>
+ * Comments are always made in the context of an auction, that
+ * is, a comment has a reference to an Item. The comment has
+ * a free text field and a rating (using a typesafe enumeration).
+ *
+ * @see Item
+ * @see User
+ * @see Rating
+ * @author Christian Bauer
+ */
+ at Entity
+ at Table(name = "COMMENT_T")
+public class Comment implements Serializable, Comparable {
+
+    @Id
+    @GeneratedValue (generator="comment_seq")
+    @GenericGenerator(
+          name="comment_seq"
+          , strategy="org.hibernate.id.enhanced.SequenceStyleGenerator"
+          , parameters=
+             { @Parameter(name="sequence_name", value="comment_seq")
+             , @Parameter(name="initial_value", value="1000")})
+             
+    @Column(name = "COMMENT_ID")
+    private Long id = null;
+
+    @Version
+    @Column(name = "OBJ_VERSION")
+    private int version = 0;
+
+    @Enumerated(EnumType.STRING)
+    @Column(name = "RATING", nullable = false, updatable = false)
+	private Rating rating;
+
+    @Column(name = "COMMENT_TEXT", length = 4000, nullable = true)
+	private String text;
+
+    @ManyToOne(fetch = FetchType.EAGER)
+    @JoinColumn(name = "FROM_USER_ID", nullable = false, updatable = false)
+    @org.hibernate.annotations.ForeignKey(name = "FK_FROM_USER_ID")
+    private User fromUser;
+
+    @ManyToOne(fetch = FetchType.EAGER)
+    @JoinColumn(name = "ABOUT_ITEM_ID", nullable = false, updatable = false)
+    @org.hibernate.annotations.ForeignKey(name = "FK_ABOUT_ITEM_ID")
+	private Item item;
+
+    @Temporal(TemporalType.TIMESTAMP)
+    @Column(name="CREATED", nullable = false, updatable = false)
+	private Date created = new Date();
+
+	/**
+	 * No-arg constructor for JavaBean tools
+	 */
+	public Comment() {}
+
+	/**
+	 * Full constructor
+	 *
+	 * @param rating
+	 * @param text
+	 * @param fromUser
+	 * @param item
+	 */
+	public Comment(Rating rating, String text, User fromUser, Item item) {
+		this.rating = rating;
+		this.text = text;
+		this.fromUser = fromUser;
+		this.item = item;
+	}
+
+	// ********************** Accessor Methods ********************** //
+
+	public Long getId() { return id; }
+    public int getVersion() { return version; }
+
+	public Rating getRating() { return rating; }
+
+	public String getText() { return text; }
+	public void setText(String text) { this.text = text; }
+
+	public User getFromUser() { return fromUser; }
+
+	public Item getItem() { return item; }
+
+	public Date getCreated() { return created; }
+
+	// ********************** Common Methods ********************** //
+
+	public boolean equals(Object o) {
+		if (this == o) return true;
+		if (!(o instanceof Comment)) return false;
+
+		final Comment comment = (Comment) o;
+
+        if (! (created.getTime() == comment.created.getTime()) ) return false;
+		if (!rating.equals(comment.rating)) return false;
+		if (text != null ? !text.equals(comment.text) : comment.text != null) return false;
+
+		return true;
+	}
+
+	public int hashCode() {
+		int result;
+		result = rating.hashCode();
+		result = 29 * result + (text != null ? text.hashCode() : 0);
+		result = 29 * result + created.hashCode();
+		return result;
+	}
+
+	public String toString() {
+		return "Comment ('" + getId() + "'), " +
+				"Rating: '" + getRating() + "'";
+	}
+
+	public int compareTo(Object o) {
+		if (o instanceof Comment) {
+            // Don't compare Date objects! Use the time in milliseconds!
+            return Long.valueOf(this.getCreated().getTime()).compareTo(
+                    Long.valueOf( ((Comment)o).getCreated().getTime())
+                   );
+		}
+		return 0;
+	}
+
+	// ********************** Business Methods ********************** //
+
+}


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/Comment.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/CreditCard.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/CreditCard.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/CreditCard.java	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,83 @@
+package auction.model;
+
+import javax.persistence.*;
+
+/**
+ * This billing strategy can handle various credit cards.
+ * <p>
+ * The type of credit card is handled with a typesafe
+ * enumeration, <tt>CreditCardType</tt>.
+ *
+ * @see CreditCardType
+ * @author Christian Bauer
+ */
+ at Entity
+ at DiscriminatorValue("CC")
+ at SecondaryTable(
+    name = "CREDIT_CARD",
+    pkJoinColumns = @PrimaryKeyJoinColumn(name = "CREDIT_CARD_ID")
+)
+// TODO: Can't name foreign key constraint for PK join columns
+public class CreditCard extends BillingDetails {
+
+    @Enumerated(EnumType.STRING)
+    @Column(table = "CREDIT_CARD", name = "CC_TYPE", nullable = false)
+    private CreditCardType type;
+
+    @Column(table = "CREDIT_CARD", name = "CC_NUMBER", nullable = false, updatable = false, length = 16)
+    private String number;
+
+    @Column(table = "CREDIT_CARD", name = "CC_EXP_MONTH", nullable = false, updatable = false, length = 2)
+    private String expMonth;
+
+    @Column(table = "CREDIT_CARD", name = "CC_EXP_YEAR", nullable = false, updatable = false, length = 4)
+    private String expYear;
+
+    /**
+     * No-arg constructor for JavaBean tools
+     */
+    public CreditCard() { super(); }
+
+    /**
+     * Full constructor.
+     *
+     * @param owner
+     * @param user
+     * @param type
+     * @param expMonth
+     * @param expYear
+     */
+    public CreditCard(String owner, User user, String number, CreditCardType type,
+                      String expMonth, String expYear) {
+        super(owner, user);
+        this.type = type;
+        this.number = number;
+        this.expMonth = expMonth;
+        this.expYear = expYear;
+    }
+
+    // ********************** Accessor Methods ********************** //
+
+    public CreditCardType getType() { return type; }
+
+    public String getNumber() { return number; }
+
+    public String getExpMonth() { return expMonth; }
+
+    public String getExpYear() { return expYear; }
+
+    // ********************** Common Methods ********************** //
+
+    public String toString() {
+        return  "CreditCard ('" + getId() + "'), " +
+                "Type: '" + getType() + "'";
+    }
+
+    // ********************** Business Methods ********************** //
+
+    public boolean isValid() {
+        // Use the type to validate the CreditCard details.
+        return getType().isValid(this);
+    }
+
+}


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/CreditCard.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/CreditCardType.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/CreditCardType.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/CreditCardType.java	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,31 @@
+package auction.model;
+
+/**
+ * A simple enumeration.
+ *
+ * @author Christian Bauer
+ */
+public enum CreditCardType {
+
+	MASTERCARD("Mastercard"),
+    VISA("Visa"),
+    AMEX("American Express");
+
+    private final String debugName;
+
+	private CreditCardType(String debugName) {
+		this.debugName = debugName;
+	}
+
+	public String toString() {
+	    return debugName;
+	}
+
+	// ********************** Business Methods ********************** //
+
+	public boolean isValid(CreditCard cc) {
+		// TODO: Implement syntactical validation of credit card information.
+		return true;
+	}
+
+}
\ No newline at end of file


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/CreditCardType.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/Item.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/Item.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/Item.java	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,429 @@
+package auction.model;
+
+import auction.exceptions.*;
+
+import javax.persistence.*;
+
+import org.hibernate.annotations.GenericGenerator;
+import org.hibernate.annotations.Parameter;
+
+import java.io.Serializable;
+import java.util.*;
+
+/**
+ * An item for auction.
+ *
+ * @author Christian Bauer
+ */
+ at NamedQueries({
+    @NamedQuery(
+        name = "Item-getMinBid",
+        query = "select b from Bid b where b.amount.value = (select min(b.amount.value) from Bid b where b.item.id = :itemid)"
+    ),
+    @NamedQuery(
+        name = "Item-getMaxBid",
+        query = "select b from Bid b where b.amount.value = (select max(b.amount.value) from Bid b where b.item.id = :itemid)"
+    ),
+    @NamedQuery(
+     name = "findItemsByDescription",
+     query = "select i from Item i where i.description like :desc)",
+     hints = {
+      @QueryHint(name = "org.hibernate.comment", value = "My Comment"),
+      @QueryHint(name = "org.hibernate.fetchSize", value = "50"),
+      @QueryHint(name = "org.hibernate.flushMode", value = "never"),
+      @QueryHint(name = "org.hibernate.readOnly", value = "true"),
+      @QueryHint(name = "org.hibernate.timeout", value = "60")
+     })
+})
+/*
+ at NamedNativeQueries({
+    @NamedNativeQuery(
+     name = "findItemsByDescriptionWithSQL",
+     query = "select i.NAME, i.PRICE ... from ITEM i where i.DESC = :desc",
+     resultClass = auction.model.Item.class
+    )
+})
+*/
+
+ at Entity
+ at Table(name = "ITEM")
+ at org.hibernate.annotations.Filter(
+    name = "limitItemsByUserRank",
+    condition=":currentUserRank >= " +
+              "(select u.RANK from USER u" +
+              " where u.USER_ID = SELLER_ID)"
+)
+ at org.hibernate.annotations.Check(
+    constraints = "START_DATE < END_DATE"
+)
+ at org.hibernate.annotations.Table(
+    appliesTo = "ITEM",
+    indexes =
+      @org.hibernate.annotations.Index(
+        name = "IDX_INITIAL_PRICE",
+        columnNames = { "INITIAL_PRICE", "INITIAL_PRICE_CURRENCY" }
+      )
+)
+public class Item implements Serializable, Comparable, Auditable {
+
+    private static final String COLLECTION_ID_GENERATOR = "identity";
+
+    @Id
+    @GeneratedValue (generator="item_seq")
+    @GenericGenerator(
+          name="item_seq"
+          , strategy="org.hibernate.id.enhanced.SequenceStyleGenerator"
+          , parameters=
+             { @Parameter(name="sequence_name", value="item_seq")
+             , @Parameter(name="initial_value", value="1000")})
+
+    @Column(name = "ITEM_ID")
+    private Long id = null;
+
+    @Version
+    @Column(name = "OBJ_VERSION")
+    private int version = 0;
+
+    @Column(name = "ITEM_NAME", length = 255, nullable = false, updatable = false)
+    private String name;
+
+    @ManyToOne(fetch = FetchType.LAZY)
+    @JoinColumn(name="SELLER_ID", nullable = false, updatable = false)
+    @org.hibernate.annotations.ForeignKey(name = "FK_SELLER_ID")
+    private User seller;
+
+    @ManyToOne(fetch = FetchType.LAZY)
+    @JoinTable(
+        name = "ITEM_BUYER",
+        joinColumns = @JoinColumn(name = "ITEM_ID"),
+        inverseJoinColumns = @JoinColumn(name = "USER_ID")
+    )
+    // TODO: Foreign key name for ITEM_ID is ignored
+    @org.hibernate.annotations.ForeignKey(
+        name = "FK_ITEM_BUYER_USER_ID",
+        inverseName = "FK_ITEM_BUYER_ITEM_ID"
+    )
+    private User buyer;
+
+    @Column(name = "DESCRIPTION", length = 4000, nullable = false)
+    private String description;
+
+    @org.hibernate.annotations.Type(type = "monetary_amount_usd")
+    @org.hibernate.annotations.Columns(columns = {
+        @Column( name="INITIAL_PRICE", nullable = false, length = 2),
+        @Column( name="INITIAL_PRICE_CURRENCY", nullable = false, length = 3)
+    })
+    private MonetaryAmount initialPrice;
+
+    @org.hibernate.annotations.Type(type = "monetary_amount_usd")
+    @org.hibernate.annotations.Columns(columns = {
+        @Column( name="RESERVE_PRICE", nullable = false, length = 2),
+        @Column( name="RESERVE_PRICE_CURRENCY", nullable = false, length = 3)
+    })
+    private MonetaryAmount reservePrice;
+
+    @Temporal(TemporalType.TIMESTAMP)
+    @Column(name = "START_DATE", nullable = false, updatable = false)
+    private Date startDate;
+
+    @Temporal(TemporalType.TIMESTAMP)
+    @Column(name = "END_DATE", nullable = false, updatable = false)
+    @org.hibernate.annotations.Index(name = "IDX_END_DATE")
+    private Date endDate;
+
+    @Enumerated(EnumType.STRING)
+    @Column(name = "ITEM_STATE", nullable = false)
+    private ItemState state;
+
+    @ManyToOne(fetch = FetchType.LAZY)
+    @JoinColumn(name = "APPROVED_BY_USER_ID", nullable = true)
+    @org.hibernate.annotations.ForeignKey(name = "FK_APPROVED_BY_USER_ID")
+    private User approvedBy;
+
+    @Temporal(TemporalType.TIMESTAMP)
+    @Column(name = "APPROVAL_DATETIME", nullable = true)
+    private Date approvalDatetime;
+
+    @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
+    @JoinColumn(name = "ITEM_ID", nullable = false)
+    @org.hibernate.annotations.IndexColumn(name = "BID_POSITION")
+    @org.hibernate.annotations.BatchSize(size = 10)
+    private List<Bid> bids = new ArrayList<Bid>();
+
+    @ManyToOne(fetch = FetchType.LAZY)
+    @JoinColumn(name = "SUCCESSFUL_BID_ID", nullable = true)
+    @org.hibernate.annotations.ForeignKey(name = "FK_SUCCESSFUL_BID_ID")
+    private Bid successfulBid;
+
+    @MapKey(name="id")
+    @OneToMany(mappedBy = "item")
+    private Map<Long,Bid> bidsByIdentifier = new HashMap<Long,Bid>(); // Not very useful
+
+    @ManyToMany(mappedBy = "items")
+    private Set<Category> categories = new HashSet<Category>();
+
+    @OneToMany(cascade = CascadeType.ALL, mappedBy = "item")
+    @org.hibernate.annotations.Cascade(org.hibernate.annotations.CascadeType.DELETE_ORPHAN)
+    private Set<CategorizedItem> categorizedItems = new HashSet<CategorizedItem>();
+
+    @org.hibernate.annotations.CollectionOfElements
+    
+    @org.hibernate.annotations.CollectionId(
+        columns = @Column(name = "ITEM_IMAGE_ID"),
+        type = @org.hibernate.annotations.Type(type = "long"),
+        generator = "item_image_seq"
+    )
+    
+    @GenericGenerator(
+          name="item_image_seq"
+          , strategy="org.hibernate.id.enhanced.SequenceStyleGenerator"
+          , parameters=
+             { @Parameter(name="sequence_name", value="item_image_seq")
+             , @Parameter(name="initial_value", value="1000")})
+    
+    @JoinTable(
+        name = "ITEM_IMAGES",
+        joinColumns = @JoinColumn(name = "ITEM_ID")
+    )
+    @Column(name = "FILENAME")
+    @org.hibernate.annotations.ForeignKey(name = "FK_ITEM_IMAGE_ITEM_ID")
+    private Collection<String> images = new ArrayList<String>();
+
+    @Temporal(TemporalType.TIMESTAMP)
+    @Column(name="CREATED", nullable = false, updatable = false)
+    private Date created = new Date();
+
+    /**
+     * No-arg constructor for JavaBean tools.
+     */
+    public Item() {}
+
+    /**
+     * Full constructor
+     */
+    public Item(String name, User seller, User buyer, String description,
+                MonetaryAmount initialPrice, MonetaryAmount reservePrice, Date startDate, Date endDate,
+                ItemState state, User approvedBy, Date approvalDatetime,
+                List<Bid> bids, Bid successfulBid, Map<Long, Bid> bidsByIdentifier,
+                Set<Category> categories, Set<CategorizedItem> categorizedItems,
+                Collection<String> images) {
+        this.name = name;
+        this.seller = seller;
+        this.buyer = buyer;
+        this.description = description;
+        this.initialPrice = initialPrice;
+        this.reservePrice = reservePrice;
+        this.startDate = startDate;
+        this.endDate = endDate;
+        this.state = state;
+        this.approvedBy = approvedBy;
+        this.approvalDatetime = approvalDatetime;
+        this.bids = bids;
+        this.successfulBid = successfulBid;
+        this.bidsByIdentifier = bidsByIdentifier;
+        this.categories = categories;
+        this.categorizedItems = categorizedItems;
+        this.images = images;
+
+        // Referential integrity
+        seller.getItemsForSale().add(this);
+    }
+
+    /**
+     * Simple constructors
+     */
+    public Item(String name, String description, User seller,
+                MonetaryAmount initialPrice, MonetaryAmount reservePrice,
+                Date startDate, Date endDate) {
+        this.name = name;
+        this.seller = seller;
+        this.description = description;
+        this.initialPrice = initialPrice;
+        this.reservePrice = reservePrice;
+        this.startDate = startDate;
+        this.endDate = endDate;
+        this.state = ItemState.DRAFT;
+
+        // Referential integrity
+        seller.getItemsForSale().add(this);
+    }
+
+    // ********************** Accessor Methods ********************** //
+
+    public Long getId() { return id; }
+    public int getVersion() { return version; }
+
+    public String getName() { return name; }
+
+    public User getSeller() { return seller; }
+
+    public User getBuyer() { return buyer; }
+    public void setBuyer(User buyer) { this.buyer = buyer; }
+
+    public String getDescription() { return description; }
+    public void setDescription(String description) { this.description = description; }
+
+    public MonetaryAmount getInitialPrice() { return initialPrice; }
+
+    public MonetaryAmount getReservePrice() { return reservePrice; }
+
+    public Date getStartDate() { return startDate; }
+
+    public Date getEndDate() { return endDate; }
+
+    public ItemState getState() { return state; }
+
+    public User getApprovedBy() { return approvedBy; }
+    public void setApprovedBy(User approvedBy) { this.approvedBy = approvedBy; }
+
+    public Date getApprovalDatetime() { return approvalDatetime; }
+    public void setApprovalDatetime(Date approvalDatetime) { this.approvalDatetime = approvalDatetime; }
+
+    public List<Bid> getBids() { return bids; }
+    public void addBid(Bid bid) {
+        if (bid == null)
+            throw new IllegalArgumentException("Can't add a null Bid.");
+        this.getBids().add(bid);
+        // Don't have to set the "other" side, a Bid can only be instantiated with a given item
+    }
+
+    public Bid getSuccessfulBid() { return successfulBid; }
+    public void setSuccessfulBid(Bid successfulBid) {
+        // Has to preserve the integrity by using a procedure and loop, bad Java...
+        if (successfulBid != null) {
+            for (Bid bid : getBids())
+                bid.setSuccessful(false);
+            successfulBid.setSuccessful(true);
+            this.successfulBid = successfulBid;
+        }
+    }
+
+    public Map<Long, Bid> getBidsByIdentifier() { return bidsByIdentifier; }
+    public void setBidsByIdentifier(Map<Long, Bid> bidsByIdentifier) { this.bidsByIdentifier = bidsByIdentifier; }
+
+    // Read-only, modify through Category#addItem() and Category at removeItem();
+    public Set<Category> getCategories() { return Collections.unmodifiableSet(categories); }
+
+    // Read-only, to create a link, instantiate a CategorizedItem with the right constructor
+    // To remove a link, use Category.getCategorizedItems().remove()
+    public Set<CategorizedItem> getCategorizedItems() { return categorizedItems; }
+
+    public Collection<String> getImages() { return images; }
+
+    public Date getCreated() { return created; }
+
+    // ********************** Common Methods ********************** //
+
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof Item)) return false;
+
+        final Item item = (Item) o;
+
+        if (! (created.getTime() == item.created.getTime()) ) return false;
+        if (name != null ? !name.equals(item.name) : item.name != null) return false;
+
+        return true;
+    }
+
+    public int hashCode() {
+        int result;
+        result = (name != null ? name.hashCode() : 0);
+        result = 29 * result + created.hashCode();
+        return result;
+    }
+
+    public String toString() {
+        return  "Item ('" + getId() + "'), " +
+                "Name: '" + getName() + "' " +
+                "Initial Price: '" + getInitialPrice()+ "'";
+    }
+
+    public int compareTo(Object o) {
+        if (o instanceof Item) {
+            // Don't compare Date objects! Use the time in milliseconds!
+            return Long.valueOf(this.getCreated().getTime()).compareTo(
+                    Long.valueOf( ((Item)o).getCreated().getTime())
+                   );
+        }
+        return 0;
+    }
+
+    // ********************** Business Methods ********************** //
+
+    /**
+     * Places a bid while checking business constraints.
+     *
+     * This method may throw a BusinessException if one of the requirements
+     * for the bid placement wasn't met, e.g. if the auction already ended.
+     *
+     * @param bidder
+     * @param bidAmount
+     * @param currentMaxBid  the most valuable bid for this item
+     * @param currentMinBid  the least valuable bid for this item
+     * @return
+     * @throws BusinessException
+     */
+    public Bid placeBid(User bidder, MonetaryAmount bidAmount,
+                        Bid currentMaxBid, Bid currentMinBid)
+        throws BusinessException {
+
+        // Check initial price
+        if (initialPrice.compareTo(bidAmount) > 0) {
+            throw new BusinessException("Bid lower than initial price");
+        }
+
+        // Check reserve price
+        if (reservePrice.compareTo(bidAmount) > 0) {
+            throw new BusinessException("Bid lower than reserve price");
+        }
+
+        // Check highest bid (can also be a different Strategy (pattern))
+        if (currentMaxBid != null && currentMaxBid.getAmount().compareTo(bidAmount) > 0) {
+            throw new BusinessException("Bid too low");
+        }
+
+        // Auction is active
+        if ( !this.getState().equals(ItemState.ACTIVE) )
+            throw new BusinessException("Auction is not active yet");
+
+        // Auction still valid
+        if ( this.getEndDate().before( new Date() ) )
+            throw new BusinessException("Can't place new bid, auction already ended");
+
+        // Create new Bid
+        Bid newBid = new Bid(bidAmount, this, bidder);
+
+        // Place bid for this Item
+        this.addBid(newBid);
+
+        return newBid;
+    }
+
+    /**
+     * Anyone can set this item into PENDING state for approval.
+     */
+    public void setPendingForApproval() {
+        state = ItemState.PENDING;
+    }
+
+    /**
+     * Approve this item for auction and set its state to active.
+     *
+     * @param byUser
+     * @throws BusinessException
+     */
+    public void approve(User byUser) throws BusinessException {
+/*
+        if ( !byUser.isAdmin() )
+            throw new PermissionException("Not an administrator");
+*/
+        if ( !state.equals(ItemState.PENDING) )
+            throw new IllegalStateException("Item still in draft");
+
+        state = ItemState.ACTIVE;
+        approvedBy = byUser;
+        approvalDatetime = new Date();
+    }
+
+}


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/Item.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/ItemState.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/ItemState.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/ItemState.java	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,25 @@
+package auction.model;
+
+/**
+ * A simple enumeration.
+ *
+ * @author Christian Bauer
+ */
+public enum ItemState {
+
+    DRAFT('D'), PENDING('P'), ACTIVE('A');
+
+    private final char state;
+
+	private ItemState(char state) {
+		this.state = state;
+	}
+
+    public char value() {
+        return state;
+    }
+
+	public String toString() {
+		return Character.toString(state);
+	}
+}
\ No newline at end of file


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/ItemState.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/MonetaryAmount.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/MonetaryAmount.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/MonetaryAmount.java	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,79 @@
+package auction.model;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Currency;
+
+/**
+ * Represents a monetary amount as value and currency.
+ * <p>
+ * Has some illustrative and non-funtional money conversion magic.
+ * @author Gavin King
+ * @author Christian Bauer
+ */
+public class MonetaryAmount implements Serializable {
+
+	private final BigDecimal value;
+	private final Currency currency;
+
+	public MonetaryAmount(BigDecimal value, Currency currency) {
+		this.value = value;
+		this.currency = currency;
+	}
+
+	public Currency getCurrency() {
+		return currency;
+	}
+
+	public BigDecimal getValue() {
+		return value;
+	}
+
+	// ********************** Common Methods ********************** //
+
+	public boolean equals(Object o) {
+		if (this == o) return true;
+		if (!(o instanceof MonetaryAmount)) return false;
+
+		final MonetaryAmount monetaryAmount = (MonetaryAmount) o;
+
+		if (!currency.equals(monetaryAmount.currency)) return false;
+		if (!value.equals(monetaryAmount.value)) return false;
+
+		return true;
+	}
+
+	public int hashCode() {
+		int result;
+		result = value.hashCode();
+		result = 29 * result + currency.hashCode();
+		return result;
+	}
+
+	public String toString() {
+		return "Value: '" + getValue() + "', " +
+		        "Currency: '" + getCurrency() + "'";
+	}
+
+	public int compareTo(Object o) {
+		if (o instanceof MonetaryAmount) {
+            // TODO: This requires some conversion magic and is therefore not implemented
+			return this.getValue().compareTo(((MonetaryAmount) o).getValue());
+		}
+		return 0;
+	}
+
+	// ********************** Business Methods ********************** //
+
+	public static MonetaryAmount fromString(String amount, String currencyCode) {
+		return new MonetaryAmount(new BigDecimal(amount),
+								  Currency.getInstance(currencyCode));
+	}
+
+	public static MonetaryAmount convert(MonetaryAmount amount,
+										 Currency toConcurrency) {
+		// TODO: This requires some conversion magic and is therefore not implemented
+		return new MonetaryAmount(amount.getValue(), toConcurrency);
+	}
+
+}


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/MonetaryAmount.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/Rating.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/Rating.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/Rating.java	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,5 @@
+package auction.model;
+
+public enum Rating {
+	EXCELLENT, OK, BAD;
+}


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/Rating.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/Shipment.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/Shipment.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/Shipment.java	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,157 @@
+package auction.model;
+
+import javax.persistence.*;
+
+import org.hibernate.annotations.GenericGenerator;
+import org.hibernate.annotations.Parameter;
+
+import java.util.Date;
+
+/**
+ * Escrow base class for CaveatEmptor.
+ *
+ * A particular shipment under supervision, from a seller to a buyer.
+ * <p>
+ * The process (see <tt>ShipmentState</tt>) is supposed to be:
+ * <li>AGREED: Both parties agree on the deal and a Shipment is created
+ * <li>PAYED: The buyer payed the shipment
+ * <li>IN_TRANSIT: The seller sent the shipment
+ * <li>ACCEPTED: The buyer accepted the shipment in the inspection period
+ * <li>COMPLETE: The payment has been transfered to the seller
+ * <p>
+ * The escrow service may be in the context of an auction, or utilized
+ * by all users for deals made outside of CaveatEmptor. Hence, the
+ * auction <tt>Item</tt> reference is optional and may be null.
+ *
+ * @author Christian Bauer
+ */
+ at Entity
+ at Table(name = "SHIPMENT")
+ at SecondaryTable(
+    name = "ITEM_SHIPMENT",
+    pkJoinColumns = @PrimaryKeyJoinColumn(name = "SHIPMENT_ID")
+)
+// TODO: Can't declare foreign key constraint name for PK join column
+public class Shipment {
+
+    @Id
+    @GeneratedValue (generator="shipment_seq")
+    @GenericGenerator(
+          name="shipment_seq"
+          , strategy="org.hibernate.id.enhanced.SequenceStyleGenerator"
+          , parameters=
+             { @Parameter(name="sequence_name", value="shipment_seq")
+             , @Parameter(name="initial_value", value="1000")})
+
+    @Column(name = "SHIPMENT_ID")
+    private Long id = null;
+
+    @Version
+    @Column(name = "OBJ_VERSION")
+    private int version = 0;
+
+    @ManyToOne(fetch = FetchType.EAGER)
+    @JoinColumn(name="DELIVERY_ADDRESS_ID", nullable = false, updatable = false)
+    @org.hibernate.annotations.Fetch(org.hibernate.annotations.FetchMode.JOIN)
+    @org.hibernate.annotations.ForeignKey(name = "FK_SHIP_DEL_ADD_ID")
+    private AddressEntity deliveryAddress;
+
+    @ManyToOne
+    @JoinColumn(table = "ITEM_SHIPMENT", name = "ITEM_ID")
+    @org.hibernate.annotations.ForeignKey(
+        name = "FK_ITEM_SHIPMENT_ITEM_ID",
+        inverseName = "FK_ITEM_SHIPMENT_SHIPMENT_ID"
+    )
+    private Item auction; // Nullable
+
+    @ManyToOne(fetch = FetchType.EAGER)
+    @JoinColumn(name="BUYER_ID", nullable = false, updatable = false)
+    @org.hibernate.annotations.Fetch(org.hibernate.annotations.FetchMode.JOIN)
+    @org.hibernate.annotations.ForeignKey(name = "FK_SHIPMENT_BUYER_ID")
+    private User buyer;
+
+    @ManyToOne(fetch = FetchType.EAGER)
+    @JoinColumn(name="SELLER_ID", nullable = false, updatable = false)
+    @org.hibernate.annotations.Fetch(org.hibernate.annotations.FetchMode.JOIN)
+    @org.hibernate.annotations.ForeignKey(name = "FK_SHIPMENT_SELLER_ID")
+    private User seller;
+
+    @Column(name="INSPECTION_PERIOD_DAYS", nullable = false, updatable = false)
+    private int inspectionPeriodDays;
+
+    @Enumerated(EnumType.STRING)
+    @Column(name = "SHIPMENT_STATE", nullable = false)
+    private ShipmentState state = ShipmentState.AGREED;
+
+    @Temporal(TemporalType.TIMESTAMP)
+    @Column(name="CREATED", nullable = false, updatable = false)
+    private Date created = new Date();
+
+    /**
+     * No-arg constructor for JavaBean tools
+     */
+    public Shipment() {}
+
+    /**
+     * Regular constructor
+     */
+    public Shipment(AddressEntity deliveryAddress, User buyer, User seller, int inspectionPeriodDays) {
+        this.deliveryAddress = deliveryAddress;
+        this.buyer = buyer;
+        this.seller = seller;
+        this.inspectionPeriodDays = inspectionPeriodDays;
+    }
+
+    // ********************** Accessor Methods ********************** //
+
+    public Long getId() { return id; }
+    public int getVersion() { return version; }
+
+    public AddressEntity getDeliveryAddress() { return deliveryAddress; }
+
+    public Item getAuction() { return auction; }
+    public void setAuction(Item auction) { this.auction = auction; }
+
+    public User getSeller() { return seller; }
+
+    public User getBuyer() { return buyer; }
+
+    public int getInspectionPeriodDays() { return inspectionPeriodDays; }
+
+    public ShipmentState getState() { return state; }
+    public void setState(ShipmentState state) { this.state = state; }
+
+    public Date getCreated() { return created; }
+
+    // ********************** Common Methods ********************** //
+
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof Shipment)) return false;
+
+        final Shipment shipment = (Shipment) o;
+
+        if (inspectionPeriodDays != shipment.inspectionPeriodDays) return false;
+        if (!buyer.getId().equals(shipment.buyer.getId())) return false;
+        if (!created.equals(shipment.created)) return false;
+        return seller.getId().equals(shipment.seller.getId());
+
+    }
+
+    public int hashCode() {
+        int result;
+        result = seller.getId().hashCode();
+        result = 29 * result + buyer.getId().hashCode();
+        result = 29 * result + inspectionPeriodDays;
+        result = 29 * result + created.hashCode();
+        return result;
+    }
+
+    public String toString() {
+        return  "Shipment ('" + getId() + "'), " +
+                "State: '" + getState() + "'";
+    }
+
+    // ********************** Business Methods ********************** //
+
+}


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/Shipment.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/ShipmentState.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/ShipmentState.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/ShipmentState.java	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,12 @@
+package auction.model;
+
+/**
+ * A simple enumeration, for the escrow service.
+ *
+ * @author Christian Bauer
+ */
+public enum ShipmentState {
+
+    AGREED, PAYED, IN_TRANSIT, ACCEPTED, COMPLETE
+
+}
\ No newline at end of file


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/ShipmentState.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/User.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/User.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/User.java	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,319 @@
+package auction.model;
+
+import auction.exceptions.BusinessException;
+
+import javax.persistence.*;
+
+import org.hibernate.annotations.GenericGenerator;
+import org.hibernate.annotations.Parameter;
+
+import java.io.Serializable;
+import java.util.*;
+
+/**
+ * A user of the CaveatEmptor auction application.
+ *
+ * @author Christian Bauer
+ */
+ at Entity
+ at Table(name = "USERS")
+ at SecondaryTable(
+    name = "BILLING_ADDRESS",
+    pkJoinColumns = {
+        @PrimaryKeyJoinColumn(name="USER_ID")
+    }
+)
+
+ at org.hibernate.annotations.Entity
+(
+   dynamicUpdate=true
+)
+
+ at NamedQuery(
+      name="findUserById",
+      query="FROM User WHERE id = :identifier"
+      )
+
+ at org.hibernate.annotations.BatchSize(size = 10)
+
+public class User implements Serializable, Comparable {
+
+    @Id 
+    @GeneratedValue (generator="user_seq")
+    @GenericGenerator(
+          name="user_seq"
+          , strategy="org.hibernate.id.enhanced.SequenceStyleGenerator"
+          , parameters=
+             { @Parameter(name="sequence_name", value="user_seq")
+             , @Parameter(name="initial_value", value="1000")})
+    
+    @Column(name = "USER_ID")
+    private Long id = null;
+
+    @Version
+    @Column(name = "OBJ_VERSION")
+    private int version = 0;
+    
+    @Column(name = "FIRSTNAME", length = 255, nullable = false)
+    private String firstname;
+
+    @Column(name = "LASTNAME", nullable = false, columnDefinition="CHAR(255)")
+    private String lastname;
+
+    @Column(name = "USERNAME", length = 18, nullable = false, unique = true)
+    //@org.hibernate.annotations.Check( constraints = "regexp_like(USERNAME,'^[[:alpha:]]+$')" )
+    private String username; // Unique and immutable
+
+    @Column(name = "PASSWD", length = 12, nullable = false)
+    private String password;
+
+    @Column(name = "EMAIL", nullable = false, columnDefinition="CHAR(255)")
+    private String email;
+    
+    @Column(name = "DUFF", nullable = false, columnDefinition="CHAR(255)")
+    private String duff;
+
+    @Column(name = "BEER", nullable = false, columnDefinition="CHAR(255)")
+    private String beer;
+
+    @Column(name = "RANK", nullable = false)
+    private int ranking = 0;
+/*
+    @Column(name = "IS_ADMIN", nullable = false)
+    private boolean admin = false;
+*/
+    @Embedded
+    @AttributeOverrides( {
+        @AttributeOverride(name   = "street",
+                           column = @Column(name="HOME_STREET", length = 255) ),
+        @AttributeOverride(name   = "zipcode",
+                           column = @Column(name="HOME_ZIPCODE", length = 16) ),
+        @AttributeOverride(name   = "city",
+                           column = @Column(name="HOME_CITY", length = 255) )
+        })
+    private Address homeAddress;
+
+    @Embedded
+    @AttributeOverrides( {
+        @AttributeOverride(
+            name   = "street",
+            column = @Column(name="STREET", length = 255,
+                             table = "BILLING_ADDRESS")
+        ),
+        @AttributeOverride(
+            name   = "zipcode",
+            column = @Column(name="ZIPCODE", length = 16,
+                             table = "BILLING_ADDRESS")
+        ),
+        @AttributeOverride(
+            name   = "city",
+            column = @Column(name="CITY", length = 255,
+                             table = "BILLING_ADDRESS")
+        )
+    })
+    // TODO: This is ignored: @org.hibernate.annotations.ForeignKey(name = "FK_BILLING_ADDRESS_ID")
+    private Address billingAddress;
+
+    @OneToOne(cascade = {CascadeType.PERSIST, CascadeType.MERGE})
+    @PrimaryKeyJoinColumn
+    private AddressEntity shippingAddress;
+
+    @OneToMany(cascade = {CascadeType.PERSIST, CascadeType.MERGE}, mappedBy = "user")
+    @org.hibernate.annotations.Cascade(org.hibernate.annotations.CascadeType.DELETE_ORPHAN)
+    private Set<BillingDetails> billingDetails = new HashSet<BillingDetails>();
+
+    @ManyToOne(fetch = FetchType.LAZY)
+    @JoinColumn(name="DEFAULT_BILLING_DETAILS_ID", nullable = true)
+    @org.hibernate.annotations.ForeignKey(name = "FK_DEFAULT_BILLING_DETAILS_ID")
+    private BillingDetails defaultBillingDetails;
+
+    @OneToMany(mappedBy = "seller")
+    private Collection<Item> itemsForSale = new ArrayList<Item>();
+
+    @OneToMany(mappedBy = "buyer")
+    private Set<Item> boughtItems = new HashSet<Item>();
+
+    @Temporal(TemporalType.TIMESTAMP)
+    @Column(name="CREATED", nullable = false, updatable = false)
+    private Date created = new Date();
+
+    /**
+     * No-arg constructor for JavaBean tools
+     */
+    public User() {}
+
+    /**
+     * Full constructor
+     */
+    public User(String firstname, String lastname, String username, String password, String email, int ranking,
+                boolean admin, Address homeAddress, Address billingAddress, AddressEntity shippingAddress,
+                Set<BillingDetails> billingDetails, BillingDetails defaultBillingDetails,
+                Set<Item> itemsForSale, Set<Item> boughtItems) {
+        this.firstname = firstname;
+        this.lastname = lastname;
+        this.username = username;
+        this.password = password;
+        this.email = email;
+        this.ranking = ranking;
+  //      this.admin = admin;
+        this.homeAddress = homeAddress;
+        this.billingAddress = billingAddress;
+        this.shippingAddress = shippingAddress;
+        this.billingDetails = billingDetails;
+        this.defaultBillingDetails = defaultBillingDetails;
+        this.itemsForSale = itemsForSale;
+        this.boughtItems = boughtItems;
+    }
+
+    /**
+     * Simple constructor.
+     */
+    public User(String firstname, String lastname,
+                String username, String password, String email) {
+        this.firstname = firstname;
+        this.lastname = lastname;
+        this.username = username;
+        this.password = password;
+        this.email = email;
+    }
+
+    // ********************** Accessor Methods ********************** //
+
+    public Long getId() { return id; }
+    public int getVersion() { return version; }
+
+    public String getFirstname() { return firstname; }
+    public void setFirstname(String firstname) { this.firstname = firstname; }
+
+    public String getLastname() { return lastname; }
+    public void setLastname(String lastname) { this.lastname = lastname; }
+
+    public String getUsername() { return username; }
+
+    public String getPassword() { return password; }
+    public void setPassword(String password) { this.password = password; }
+
+    public String getEmail() { return email; }
+    public void setEmail(String email) { this.email = email; }
+
+    public int getRanking() { return ranking; }
+    public void setRanking(int ranking) { this.ranking = ranking; }
+/*
+    public boolean isAdmin() { return admin; }
+    public void setAdmin(boolean admin) { this.admin = admin; }
+*/
+    public String getDuff()
+   {
+      return duff;
+   }
+    public void setDuff(String duff)
+   {
+      this.duff = duff;
+   }
+    public String getBeer()
+   {
+      return beer;
+   }
+    public void setBeer(String beer)
+   {
+      this.beer = beer;
+   }
+    public Address getHomeAddress() { return homeAddress; }
+    public void setHomeAddress(Address homeAddress) { this.homeAddress = homeAddress; }
+
+    public Address getBillingAddress() { return billingAddress; }
+    public void setBillingAddress(Address billingAddress) { this.billingAddress = billingAddress; }
+
+    public AddressEntity getShippingAddress() { return shippingAddress; }
+    public void setShippingAddress(AddressEntity shippingAddress) { this.shippingAddress = shippingAddress; }
+
+    public Set getBillingDetails() { return billingDetails; }
+    /**
+      * Adds a <tt>BillingDetails</tt> to the set.
+      * <p>
+      * This method checks if there is only one billing method
+      * in the set, then makes this the default.
+      *
+      * @param billingDetails
+      */
+     public void addBillingDetails(BillingDetails billingDetails) {
+         if (billingDetails == null)
+             throw new IllegalArgumentException("Can't add a null BillingDetails.");
+         this.getBillingDetails().add(billingDetails);
+
+         if (getBillingDetails().size() == 1) {
+             setDefaultBillingDetails(billingDetails);
+         }
+    }
+    /**
+     * Removes a <tt>BillingDetails</tt> from the set.
+     * <p>
+     * This method checks if the removed is the default element,
+     * and will throw a BusinessException if there is more than one
+     * left to chose from. This might actually not be the best way
+     * to handle this situation.
+     *
+     * @param billingDetails
+     * @throws BusinessException
+     */
+    public void removeBillingDetails(BillingDetails billingDetails)
+        throws BusinessException {
+        if (billingDetails == null)
+            throw new IllegalArgumentException("Can't add a null BillingDetails.");
+
+        if (getBillingDetails().size() >= 2) {
+            getBillingDetails().remove(billingDetails);
+            setDefaultBillingDetails((BillingDetails)getBillingDetails().iterator().next());
+        } else {
+            throw new BusinessException("Please set new default BillingDetails first");
+        }
+    }
+
+    public BillingDetails getDefaultBillingDetails() { return defaultBillingDetails; }
+    public void setDefaultBillingDetails(BillingDetails defaultBillingDetails) {
+        this.defaultBillingDetails = defaultBillingDetails;
+    }
+
+    public Collection<Item> getItemsForSale() { return itemsForSale; }
+    public void setItemsForSale(Collection<Item> itemsForSale) { this.itemsForSale = itemsForSale; }
+
+    public Set<Item> getBoughtItems() { return boughtItems; }
+    public void addBoughtItem(Item item) {
+        if (item == null) throw new IllegalArgumentException("Null Item!");
+        item.setBuyer(this);
+        boughtItems.add(item);
+    }
+
+    public Date getCreated() { return created; }
+
+    // ********************** Common Methods ********************** //
+
+    public boolean equals(Object o) {
+        if (this == o) return true;
+        if (!(o instanceof User)) return false;
+        final User user = (User) o;
+        return getUsername().equals(user.getUsername());
+    }
+
+    public int hashCode() {
+        return getUsername().hashCode();
+    }
+
+    public String toString() {
+        return  "User ('" + getId() + "'), " +
+                "Username: '" + getUsername() + "'";
+    }
+
+    public int compareTo(Object o) {
+        if (o instanceof User)
+            // Don't compare Date objects! Use the time in milliseconds!
+            return Long.valueOf(this.getCreated().getTime()).compareTo(
+                    Long.valueOf( ((User)o).getCreated().getTime())
+                   );
+        return 0;
+    }
+
+    // ********************** Business Methods ********************** //
+
+
+}


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/model/User.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/EJB3IntegrationTest.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/EJB3IntegrationTest.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/EJB3IntegrationTest.java	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,171 @@
+package auction.test;
+
+import java.io.File;
+import java.io.InputStream;
+import java.sql.Connection;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import javax.persistence.EntityManagerFactory;
+import javax.transaction.UserTransaction;
+
+import org.dbunit.database.DatabaseConfig;
+import org.dbunit.database.DatabaseDataSourceConnection;
+import org.dbunit.database.IDatabaseConnection;
+import org.dbunit.dataset.ReplacementDataSet;
+import org.dbunit.dataset.datatype.DefaultDataTypeFactory;
+import org.dbunit.dataset.xml.FlatXmlDataSet;
+import org.dbunit.operation.DatabaseOperation;
+import org.jboss.ejb3.embedded.EJB3StandaloneBootstrap;
+import org.testng.annotations.AfterGroups;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.BeforeGroups;
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.Parameters;
+
+public abstract class EJB3IntegrationTest {
+
+    // Configuration options
+   protected String JNDI_DATASOURCE;
+   protected String JNDI_NAME_EMF;
+   protected String JNDI_NAME_USERTX;
+
+    protected InitialContext jndi;
+
+    protected String dataSetLocation;
+    protected List<DatabaseOperation> beforeTestOperations
+            = new ArrayList<DatabaseOperation>();
+    protected List<DatabaseOperation> afterTestOperations
+            = new ArrayList<DatabaseOperation>();
+    
+
+    protected ReplacementDataSet dataSet;
+    protected DefaultDataTypeFactory datatypeFactory;
+
+    @BeforeTest(groups = "integration-persistence")
+    @Parameters({"deploy_beans_xml", "scan_classpath",
+                 "jndi_datasource", "jndi_name_emf", "jndi_name_usertx"})
+    public void startContainer(String deployBeansXml, String scanClasspath,
+                               String jndiDatasource, String jndiNameEMF, String jndiNameUserTx)
+            throws Exception {
+        // Set configuration options from TestNG parameters
+        JNDI_DATASOURCE = jndiDatasource;
+        JNDI_NAME_EMF = jndiNameEMF;
+        JNDI_NAME_USERTX = jndiNameUserTx;
+
+        // Boot the JBoss Microcontainer with EJB3 settings, automatically
+        // loads ejb3-interceptors-aop.xml and embedded-jboss-beans.xml
+        EJB3StandaloneBootstrap.boot(null);
+
+        // Deploy custom stateless beans (datasource, mostly)
+        EJB3StandaloneBootstrap.deployXmlResource(deployBeansXml);
+
+        // Deploy all EJBs found on classpath (slow, scans all)
+        //EJB3StandaloneBootstrap.scanClasspath();
+
+        // Deploy all EJBs found on classpath (fast, scans only build directory)
+        // This is a relative location, matching the substring end of one of java.class.path locations!
+        // Print out System.getProperty("java.class.path") to understand this...
+        EJB3StandaloneBootstrap.scanClasspath(scanClasspath.replace("/", File.separator));
+
+        // Create InitialContext from jndi.properties
+        jndi = new InitialContext();
+    }
+
+    @BeforeClass(groups = "integration-persistence")
+    @Parameters ({ "basedata_location", "datatype_factory"})
+    public void prepareDataSet(String location, String factory) throws Exception {
+       
+        // Check if subclass has prepared everything
+        prepareSettings();
+        if (location == null)
+            throw new RuntimeException(
+                "Test subclass needs to prepare a dataset location"
+            );
+
+        // Load the base dataset file
+        InputStream input =
+                Thread.currentThread().getContextClassLoader()
+                        .getResourceAsStream(location);
+
+        dataSet = new ReplacementDataSet(
+                        new FlatXmlDataSet(input)
+                      );
+        dataSet.addReplacementObject("[NULL]", null);
+        
+        if (null != factory && !"".equals( factory.trim()))
+        {
+           this.datatypeFactory = (DefaultDataTypeFactory)Class.forName(factory).newInstance();           
+        }
+    }
+
+    @BeforeGroups(groups = "integration-persistence")
+    public void beforeTestMethod() throws Exception {
+        prepareSettings();
+        for (DatabaseOperation op : beforeTestOperations ) {
+            op.execute(getConnection(), dataSet);
+        }
+    }
+
+    @AfterGroups(groups = "integration-persistence")
+    public void afterTestMethod() throws Exception {
+        for (DatabaseOperation op : afterTestOperations ) {
+            op.execute(getConnection(), dataSet);
+        }
+    }
+
+    // Convenience for subclasses
+
+    protected UserTransaction getUserTransaction() throws Exception {
+        return (UserTransaction)jndi.lookup(JNDI_NAME_USERTX);
+    }
+
+    protected EntityManagerFactory getEntityManagerFactory() throws Exception{
+        return (EntityManagerFactory)jndi.lookup(JNDI_NAME_EMF);
+    }
+
+    @SuppressWarnings({"unchecked"})
+    protected <T> T lookupLocalBean(Class<T> beanInterface, String beanImpl) {
+        try {
+            return (T)jndi.lookup(beanImpl + "/local");
+        } catch (NamingException ex) {
+            throw new RuntimeException(ex);
+        }
+    }
+
+    // Subclasses can/have to override the following methods
+
+    protected IDatabaseConnection getConnection() throws Exception {
+
+        // Get a JDBC connection from JNDI datasource
+        //Connection con = ((DataSource) jndi.lookup(JNDI_DATASOURCE)).getConnection();
+        IDatabaseConnection dbUnitCon = new DatabaseDataSourceConnection(this.jndi, JNDI_DATASOURCE);
+
+        Connection con = dbUnitCon.getConnection();
+        // Disable foreign key constraint checking
+        // This really depends on the DBMS product... here for HSQL DB
+        /*con.prepareStatement("set referential_integrity FALSE")
+            .execute();
+         */
+        if (null != this.datatypeFactory)
+        {
+           DatabaseConfig config = dbUnitCon.getConfig();
+           config.setProperty  (DatabaseConfig.PROPERTY_DATATYPE_FACTORY, this.datatypeFactory);
+        }
+        
+        return dbUnitCon;
+    }
+
+    /**
+     * Override this in a subclass. It will be called before each test
+     * method. Use it to stack DBUnit <tt>DatabaseOperation</tt>'s with
+     * the <tt>beforeTestOperations</tt> and <tt>afterTestOperations</tt>
+     * lists. You can also modify the <tt>afterTestOperations</tt> list
+     * <i>inside</i> a test method, if you require additional clean up
+     * once the method completes.
+     */
+    protected abstract void prepareSettings();
+
+}


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/EJB3IntegrationTest.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/FixDBUnit.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/FixDBUnit.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/FixDBUnit.java	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,21 @@
+package auction.test;
+
+import org.dbunit.dataset.datatype.*;
+
+import java.sql.Types;
+
+/**
+ * TODO: Direct SQL is lots of fun. This fixes DBUnit with the latest HSQL DB.
+ *
+ * http://www.carbonfive.com/community/archives/2005/07/dbunit_hsql_and.html
+ */
+public class FixDBUnit extends DefaultDataTypeFactory {
+
+   public DataType createDataType(int sqlType, String sqlTypeName)
+     throws DataTypeException {
+      if (sqlType == Types.BOOLEAN) {
+         return DataType.BOOLEAN;
+       }
+      return super.createDataType(sqlType, sqlTypeName);
+    }
+}


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/FixDBUnit.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/TestUtil.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/TestUtil.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/TestUtil.java	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,137 @@
+package auction.test;
+
+import javax.naming.*;
+import java.lang.reflect.Proxy;
+
+/**
+ * Some helper methods for testing.
+ *
+ * @author Christian Bauer
+ */
+public class TestUtil {
+
+    public static String listJNDITree(String namespace) {
+        StringBuffer buffer = new StringBuffer(4096);
+        try {
+            Context context = new InitialContext(); // From jndi.properties
+            if (namespace!= null)
+                context = (Context) context.lookup(namespace);
+            buffer.append("Namespace: " + namespace +"\n");
+            buffer.append("#####################################\n");
+            list(context, " ", buffer, true);
+            buffer.append("#####################################\n");
+        }
+        catch (NamingException e) {
+            buffer.append("Failed to get InitialContext, " + e.toString(true));
+        }
+        return buffer.toString();
+    }
+
+    private static void list(Context ctx, String indent, StringBuffer buffer, boolean verbose) {
+        ClassLoader loader = Thread.currentThread().getContextClassLoader();
+        try {
+            NamingEnumeration ne = ctx.list("");
+            while (ne.hasMore()) {
+                NameClassPair pair = (NameClassPair) ne.next();
+
+                String name = pair.getName();
+                String className = pair.getClassName();
+                boolean recursive = false;
+                boolean isLinkRef = false;
+                boolean isProxy = false;
+                Class c = null;
+                try {
+                    c = loader.loadClass(className);
+
+                    if (Context.class.isAssignableFrom(c))
+                        recursive = true;
+                    if (LinkRef.class.isAssignableFrom(c))
+                        isLinkRef = true;
+
+                    isProxy = Proxy.isProxyClass(c);
+                }
+                catch (ClassNotFoundException cnfe) {
+                    // If this is a $Proxy* class its a proxy
+                    if (className.startsWith("$Proxy")) {
+                        isProxy = true;
+                        // We have to get the class from the binding
+                        try {
+                            Object p = ctx.lookup(name);
+                            c = p.getClass();
+                        }
+                        catch (NamingException e) {
+                            Throwable t = e.getRootCause();
+                            if (t instanceof ClassNotFoundException) {
+                                // Get the class name from the exception msg
+                                String msg = t.getMessage();
+                                if (msg != null) {
+                                    // Reset the class name to the CNFE class
+                                    className = msg;
+                                }
+                            }
+                        }
+                    }
+                }
+
+                buffer.append(indent + " +- " + name);
+
+                // Display reference targets
+                if (isLinkRef) {
+                    // Get the
+                    try {
+                        Object obj = ctx.lookupLink(name);
+
+                        LinkRef link = (LinkRef) obj;
+                        buffer.append("[link -> ");
+                        buffer.append(link.getLinkName());
+                        buffer.append(']');
+                    }
+                    catch (Throwable t) {
+                        buffer.append("invalid]");
+                    }
+                }
+
+                // Display proxy interfaces
+                if (isProxy) {
+                    buffer.append(" (proxy: " + pair.getClassName());
+                    if (c != null) {
+                        Class[] ifaces = c.getInterfaces();
+                        buffer.append(" implements ");
+                        for (int i = 0; i < ifaces.length; i++) {
+                            buffer.append(ifaces[i]);
+                            buffer.append(',');
+                        }
+                        buffer.setCharAt(buffer.length() - 1, ')');
+                    } else {
+                        buffer.append(" implements " + className + ")");
+                    }
+                } else if (verbose) {
+                    buffer.append(" (class: " + pair.getClassName() + ")");
+                }
+
+                buffer.append('\n');
+                if (recursive) {
+                    try {
+                        Object value = ctx.lookup(name);
+                        if (value instanceof Context) {
+                            Context subctx = (Context) value;
+                            list(subctx, indent + " |  ", buffer, verbose);
+                        } else {
+                            buffer.append(indent + " |   NonContext: " + value);
+                            buffer.append('\n');
+                        }
+                    }
+                    catch (Throwable t) {
+                        buffer.append("Failed to lookup: " + name + ", errmsg=" + t.getMessage());
+                        buffer.append('\n');
+                    }
+                }
+            }
+            ne.close();
+        }
+        catch (NamingException ne) {
+            buffer.append("error while listing context " + ctx.toString() + ": " + ne.toString(true));
+        }
+    }
+
+}


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/TestUtil.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/basedata.xml
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/basedata.xml	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/basedata.xml	2010-03-15 10:17:48 UTC (rev 32089)
@@ -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/caveatemptor-jpa-061211/src/java/auction/test/basedata.xml
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/basic/PersistentStateTransitions.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/basic/PersistentStateTransitions.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/basic/PersistentStateTransitions.java	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,166 @@
+package auction.test.basic;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.util.Calendar;
+import java.util.Currency;
+import java.util.GregorianCalendar;
+
+import javax.persistence.ColumnResult;
+import javax.persistence.EntityManager;
+import javax.persistence.SqlResultSetMapping;
+
+import org.dbunit.operation.DatabaseOperation;
+import org.testng.annotations.Test;
+
+import auction.dao.ItemDAO;
+import auction.dao.UserDAO;
+import auction.dao.ejb3.ItemDAOBean;
+import auction.dao.ejb3.UserDAOBean;
+import auction.model.Item;
+import auction.model.MonetaryAmount;
+import auction.model.User;
+import auction.test.EJB3IntegrationTest;
+
+// For validation query in native SQL
+ at SqlResultSetMapping(
+    name = "PriceSellerResult",
+    columns = {
+        @ColumnResult(name = "IP"),
+        @ColumnResult(name = "SID")
+
+    }
+)
+
+public class PersistentStateTransitions extends EJB3IntegrationTest {
+
+    protected void prepareSettings() {
+        beforeTestOperations.add(DatabaseOperation.CLEAN_INSERT);
+    }
+
+    /**
+     * This test doesn't really need the EJB container, it starts a UserTransaction
+     * manually and instantiates DAOs directly. However, the datasource is still
+     * managed by the container. The EntityManagerFactory is also handled by the
+     * container.
+     */
+    @Test(groups = "integration-persistence")
+    public void withoutEJBContainer() throws Exception {
+
+        // Start a unit of work (manually, no container)
+        getUserTransaction().begin();
+        EntityManager em = getEntityManagerFactory().createEntityManager();
+
+        // Prepare the DAOs (manually, no Seam)
+        ItemDAO itemDAO = new ItemDAOBean();
+        //((GenericEJB3DAO) itemDAO).setEntityManager(em);
+
+        UserDAO userDAO = new UserDAOBean();
+//        ((GenericEJB3DAO) userDAO).setEntityManager(em);
+
+        // Prepare a user object
+        User user = userDAO.findById(1l, false);
+
+        // Make a new auction item persistent
+        Calendar startDate = GregorianCalendar.getInstance();
+        Calendar endDate = GregorianCalendar.getInstance();
+        endDate.add(Calendar.DAY_OF_YEAR, 3);
+
+        MonetaryAmount initialPrice =
+            new MonetaryAmount(new BigDecimal(123), Currency.getInstance("USD"));
+        MonetaryAmount reservePrice =
+            new MonetaryAmount(new BigDecimal(333), Currency.getInstance("USD"));
+
+        Item newItem =
+            new Item( "Testitem", "Test Description", user,
+                      initialPrice, reservePrice,
+                      startDate.getTime(), endDate.getTime() );
+
+        // Don't forget to take the return value, this is basically a merge()
+        newItem = itemDAO.makePersistent(newItem);
+
+        // End the unit of work
+        getUserTransaction().commit();
+        em.close();
+
+
+        // Direct SQL query for database state in auto-commit mode
+        em = getEntityManagerFactory().createEntityManager();
+        Object[] result = (Object[])
+                em.createNativeQuery(
+                        "select INITIAL_PRICE as IP," +
+                        "       SELLER_ID as SID from ITEM where ITEM_ID = :itemId")
+                        .setParameter("itemId", newItem.getId())
+                        .getSingleResult();
+        em.close();
+
+
+        // Assert correctness of state
+        assert result[0].getClass() == BigDecimal.class;
+        assert 0 == ((BigDecimal)result[0]).compareTo( ((newItem.getInitialPrice().getValue())));
+        // The SQL resultset mapping returns a BigInteger
+        assert result[1].equals(new BigInteger("1"));
+
+    }
+
+    /**
+     * This test looks up the DAOs as managed EJBs. The DAOs will have the
+     * current persistence context injected automatically, the persistence
+     * context is scoped and bound to the JTA transaction.
+     */
+    @Test(groups = "integration-persistence")
+    public void withEJBContainer() throws Exception {
+
+        // Start a unit of work (manually, no Seam)
+        getUserTransaction().begin();
+
+        // Prepare the DAOs (manually, no Seam)
+        ItemDAO itemDAO = lookupLocalBean(ItemDAO.class, "ItemDAOBean");
+        UserDAO userDAO = lookupLocalBean(UserDAO.class, "UserDAOBean");
+
+        // Prepare a user object
+        User user = userDAO.findById(1l, false);
+
+        // Make a new auction item persistent
+        Calendar startDate = GregorianCalendar.getInstance();
+        Calendar endDate = GregorianCalendar.getInstance();
+        endDate.add(Calendar.DAY_OF_YEAR, 3);
+
+        MonetaryAmount initialPrice =
+            new MonetaryAmount(new BigDecimal(123), Currency.getInstance("USD"));
+        MonetaryAmount reservePrice =
+            new MonetaryAmount(new BigDecimal(333), Currency.getInstance("USD"));
+
+        Item newItem =
+            new Item( "Testitem", "Test Description", user,
+                      initialPrice, reservePrice,
+                      startDate.getTime(), endDate.getTime() );
+
+        // Don't forget to take the return value, this is basically a merge()
+        newItem = itemDAO.makePersistent(newItem);
+
+        // End the unit of work
+        getUserTransaction().commit();
+
+
+        // Direct SQL query for database state in auto-commit mode
+        EntityManager em = getEntityManagerFactory().createEntityManager();
+        Object[] result = (Object[])
+                em.createNativeQuery(
+                        "select INITIAL_PRICE as IP," +
+                        "       SELLER_ID as SID from ITEM where ITEM_ID = :itemId")
+                        .setParameter("itemId", newItem.getId())
+                        .getSingleResult();
+        em.close();
+
+
+        // Assert correctness of state
+        assert result[0].getClass() == BigDecimal.class;
+        assert 0 == ((BigDecimal)result[0]).compareTo( ((newItem.getInitialPrice().getValue())));
+        // The SQL resultset mapping returns a BigInteger
+        assert result[1].equals(new BigInteger("1"));
+
+    }
+   
+
+}


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/basic/PersistentStateTransitions.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/persistence/MonetaryAmountCompositeUserType.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/persistence/MonetaryAmountCompositeUserType.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/persistence/MonetaryAmountCompositeUserType.java	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,114 @@
+package auction.test.persistence;
+
+import org.hibernate.*;
+import org.hibernate.usertype.CompositeUserType;
+import org.hibernate.engine.SessionImplementor;
+import org.hibernate.type.Type;
+import auction.model.MonetaryAmount;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.sql.*;
+import java.util.Currency;
+
+/**
+ * This is a simple Hibernate custom mapping type for MonetaryAmount value types.
+ * <p>
+ * Basically the same as the simple <tt>MonetaryAmountSimpleUserType</tt>, but
+ * implementing the Hibernate <tt>CompositeUserType</tt> interface. This interface
+ * has some additional methods that allow Hibernate to analyze the value type you
+ * are mapping. This is mostly useful for HQL queries: with this custom mapping
+ * type, you can use the "amount" and "currency" sub-components in HQL queries.
+ *
+ * @see MonetaryAmountSimpleUserType
+ * @author Christian Bauer
+ */
+public class MonetaryAmountCompositeUserType
+		implements CompositeUserType {
+
+    public Class returnedClass() { return MonetaryAmount.class; }
+
+    public boolean isMutable() { return false; }
+
+    public Object deepCopy(Object value) {
+        return value;
+    }
+
+    public Serializable disassemble(Object value, SessionImplementor session) {
+        return (Serializable) value;
+    }
+
+    public Object assemble(Serializable cached, SessionImplementor session, Object owner) {
+        return cached;
+    }
+
+    public Object replace(Object original, Object target, SessionImplementor session, Object owner) {
+        return original;
+    }
+
+    public boolean equals(Object x, Object y) {
+        if (x == y) return true;
+        if (x == null || y == null) return false;
+        return x.equals(y);
+    }
+
+    public int hashCode(Object x) {
+        return x.hashCode();
+    }
+
+    public Object nullSafeGet(ResultSet resultSet,
+                              String[] names,
+                              SessionImplementor session,
+                              Object owner)
+            throws SQLException {
+
+        BigDecimal value = resultSet.getBigDecimal( names[0] );
+        if (resultSet.wasNull()) return null;
+        Currency currency =
+            Currency.getInstance(resultSet.getString( names[1] ) );
+        return new MonetaryAmount(value, currency);
+    }
+
+    public void nullSafeSet(PreparedStatement statement,
+                            Object value,
+                            int index,
+                            SessionImplementor session)
+        throws SQLException {
+
+        if (value==null) {
+            statement.setNull(index, Hibernate.BIG_DECIMAL.sqlType());
+            statement.setNull(index+1, Hibernate.CURRENCY.sqlType());
+        } else {
+            MonetaryAmount amount = (MonetaryAmount) value;
+            String currencyCode =
+                        amount.getCurrency().getCurrencyCode();
+            statement.setBigDecimal( index, amount.getValue() );
+            statement.setString( index+1, currencyCode );
+        }
+    }
+
+	public String[] getPropertyNames() {
+		return new String[] { "value", "currency" };
+	}
+
+	public Type[] getPropertyTypes() {
+		return new Type[] { Hibernate.BIG_DECIMAL,
+                            Hibernate.CURRENCY };
+	}
+
+	public Object getPropertyValue(Object component,
+								   int property) {
+        MonetaryAmount monetaryAmount = (MonetaryAmount) component;
+        if (property == 0)
+            return monetaryAmount.getValue();
+        else
+            return monetaryAmount.getCurrency();
+	}
+
+	public void setPropertyValue(Object component,
+								 int property,
+								 Object value) {
+       throw new UnsupportedOperationException("MonetaryAmount is immutable");
+	}
+
+}
\ No newline at end of file


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/persistence/MonetaryAmountCompositeUserType.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/persistence/MonetaryAmountSimpleUserType.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/persistence/MonetaryAmountSimpleUserType.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/persistence/MonetaryAmountSimpleUserType.java	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,85 @@
+package auction.test.persistence;
+
+import org.hibernate.*;
+import org.hibernate.usertype.UserType;
+import auction.model.*;
+
+import java.math.BigDecimal;
+import java.sql.*;
+import java.util.Currency;
+import java.io.Serializable;
+
+/**
+ * This is a simple Hibernate custom mapping type for MonetaryAmount value types.
+ * <p>
+ * Note that this mapping type is for legacy databases that only have a
+ * single numeric column to hold monetary amounts. Every <tt>MonetaryAmount</tt>
+ * will be converted to USD (using some conversion magic of the class itself)
+ * and saved to the database.
+ *
+ * @author Christian Bauer
+ */
+public class MonetaryAmountSimpleUserType
+		implements UserType {
+
+	public int[] sqlTypes() {
+        return new int[]{ Hibernate.BIG_DECIMAL.sqlType() };
+    }
+
+	public Class returnedClass() { return MonetaryAmount.class; }
+
+	public boolean isMutable() { return false; }
+
+	public Object deepCopy(Object value) {
+		return value;
+	}
+
+    public Serializable disassemble(Object value) {
+        return (Serializable) value;
+    }
+
+    public Object assemble(Serializable cached, Object owner) {
+        return cached;
+    }
+
+    public Object replace(Object original, Object target, Object owner) {
+        return original;
+    }
+
+    public boolean equals(Object x, Object y) {
+        if (x == y) return true;
+        if (x == null || y == null) return false;
+        return x.equals(y);
+    }
+
+    public int hashCode(Object x) {
+        return x.hashCode();
+    }
+
+	public Object nullSafeGet(ResultSet resultSet,
+							  String[] names,
+							  Object owner)
+			throws HibernateException, SQLException {
+
+		BigDecimal valueInUSD = resultSet.getBigDecimal(names[0]);
+        if (resultSet.wasNull()) return null;
+		Currency userCurrency = Currency.getInstance("USD");
+		return new MonetaryAmount(valueInUSD, userCurrency);
+	}
+
+	public void nullSafeSet(PreparedStatement statement,
+							Object value,
+							int index)
+			throws HibernateException, SQLException {
+
+		if (value == null) {
+			statement.setNull(index, Hibernate.BIG_DECIMAL.sqlType());
+		} else {
+			MonetaryAmount anyCurrency = (MonetaryAmount)value;
+			MonetaryAmount amountInUSD =
+			  MonetaryAmount.convert( anyCurrency,
+									  Currency.getInstance("USD") );
+			statement.setBigDecimal(index, amountInUSD.getValue());
+		}
+	}
+}


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/persistence/MonetaryAmountSimpleUserType.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/persistence/MonetaryAmountType.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/persistence/MonetaryAmountType.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/persistence/MonetaryAmountType.java	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,59 @@
+package auction.test.persistence;
+
+import org.hibernate.usertype.*;
+import auction.model.MonetaryAmount;
+import org.hibernate.*;
+import org.hibernate.engine.SessionImplementor;
+
+import java.util.*;
+import java.sql.*;
+import java.math.BigDecimal;
+
+/**
+ * This type adds parameterizable currency conversion to the normal composite user type,
+ * that is, you can set the target currency for the conversion (for the value saved and
+ * loaded from the database) to any ISO code in your mapping, depending on the
+ * situation/property to map. It maps a two-attribute component to two database columns.
+ *
+ * @see MonetaryAmountSimpleUserType
+ * @author Christian Bauer
+ */public class MonetaryAmountType extends MonetaryAmountCompositeUserType implements ParameterizedType {
+
+	// The amount
+	private Currency convertTo;
+
+	public void setParameterValues(Properties parameters) {
+		this.convertTo = Currency.getInstance(parameters.getProperty("convertTo"));
+	}
+
+	public Object nullSafeGet(ResultSet resultSet,
+							  String[] names,
+							  SessionImplementor session,
+							  Object owner)
+			throws HibernateException, SQLException {
+
+		if (resultSet.wasNull()) return null;
+		BigDecimal value = resultSet.getBigDecimal( names[0] );
+        // When loading, take the currency from the database
+		Currency currency = Currency.getInstance(resultSet.getString( names[1] ) );
+        return new MonetaryAmount(value, currency);
+	}
+
+	public void nullSafeSet(PreparedStatement statement,
+							Object value,
+							int index,
+							SessionImplementor session)
+			throws HibernateException, SQLException {
+
+		if (value==null) {
+		    statement.setNull(index, Types.NUMERIC);
+		} else {
+		    MonetaryAmount amount = (MonetaryAmount) value;
+            // When saving, convert to target currency
+		    MonetaryAmount dbAmount = MonetaryAmount.convert(amount, convertTo);
+		    statement.setBigDecimal( index, dbAmount.getValue() );
+            statement.setString( index+1, convertTo.getCurrencyCode());
+		}
+	}
+	
+}
\ No newline at end of file


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/persistence/MonetaryAmountType.java
___________________________________________________________________
Name: svn:executable
   + *

Added: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/persistence/package-info.java
===================================================================
--- labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/persistence/package-info.java	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/persistence/package-info.java	2010-03-15 10:17:48 UTC (rev 32089)
@@ -0,0 +1,26 @@
+ at org.hibernate.annotations.TypeDefs({
+    @org.hibernate.annotations.TypeDef(
+        name="monetary_amount_usd",
+        typeClass = MonetaryAmountType.class,
+        parameters = { @org.hibernate.annotations.Parameter(name="convertTo", value="USD") }
+    ),
+    @org.hibernate.annotations.TypeDef(
+        name="monetary_amount_eur",
+        typeClass = MonetaryAmountType.class,
+        parameters = { @org.hibernate.annotations.Parameter(name="convertTo", value="EUR") }
+    )
+})
+
+ at org.hibernate.annotations.FilterDefs({
+    @org.hibernate.annotations.FilterDef(
+        name="limitItemsByUserRank",
+        parameters = {
+            @org.hibernate.annotations.ParamDef(
+                name = "currentUserRank", type = "int"
+            )
+        }
+    )
+})
+
+
+package auction.test.persistence;


Property changes on: labs/jbosstm/workspace/whitingjr/caveatemptor-jpa-061211/src/java/auction/test/persistence/package-info.java
___________________________________________________________________
Name: svn:executable
   + *



More information about the jboss-svn-commits mailing list