Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Open18 from Seam in Action chapter 11

  • Loading branch information...
commit d67ccd6791a91845674478a96bb8e44c08acad37 1 parent b983b77
@LightGuard LightGuard authored
Showing with 7,472 additions and 0 deletions.
  1. +2 −0  open18_seam2/build-dev.properties
  2. +4 −0 open18_seam2/build-prod.properties
  3. +4 −0 open18_seam2/build.properties
  4. +345 −0 open18_seam2/build.xml
  5. +14 −0 open18_seam2/chapter-developments.txt
  6. BIN  open18_seam2/databases/open18-db/h2.2.log.db
  7. BIN  open18_seam2/databases/open18-db/h2.data.db
  8. BIN  open18_seam2/databases/open18-db/h2.index.db
  9. +17 −0 open18_seam2/deployed-jars.list
  10. BIN  open18_seam2/etc/facility-logos/beartrapdunes.gif
  11. BIN  open18_seam2/etc/facility-logos/beechtree.jpg
  12. BIN  open18_seam2/etc/facility-logos/carolinaclub.jpg
  13. BIN  open18_seam2/etc/facility-logos/grayhawk.jpg
  14. BIN  open18_seam2/etc/facility-logos/hawktree.gif
  15. BIN  open18_seam2/etc/facility-logos/hellspoint.gif
  16. BIN  open18_seam2/etc/facility-logos/oceanpines.jpg
  17. BIN  open18_seam2/etc/facility-logos/oldworks.png
  18. BIN  open18_seam2/etc/facility-logos/patuxentgreens.jpg
  19. BIN  open18_seam2/etc/facility-logos/pineneedles.gif
  20. BIN  open18_seam2/etc/facility-logos/renditions.jpg
  21. BIN  open18_seam2/etc/facility-logos/restonnational.gif
  22. BIN  open18_seam2/etc/facility-logos/thepointe.gif
  23. BIN  open18_seam2/etc/facility-logos/thetimbersattroy.jpg
  24. BIN  open18_seam2/etc/facility-logos/whitetail.jpg
  25. BIN  open18_seam2/etc/feed-icons/feed-icon-chic.png
  26. BIN  open18_seam2/etc/feed-icons/feed-icon-classic.png
  27. BIN  open18_seam2/etc/feed-icons/feed-icon-countryclub.png
  28. BIN  open18_seam2/etc/feed-icons/feed-icon-eco.png
  29. BIN  open18_seam2/etc/feed-icons/feed-icon-modern.png
  30. BIN  open18_seam2/etc/feed-icons/feed-icon-ocean.png
  31. BIN  open18_seam2/etc/feed-icons/feed-icon-passion.png
  32. BIN  open18_seam2/etc/feed-icons/feed-icon-sky.png
  33. BIN  open18_seam2/etc/feed-icons/feed-icon.png
  34. +363 −0 open18_seam2/etc/glassfish-deployment/build.xml
  35. +140 −0 open18_seam2/etc/glassfish-deployment/glassfish-readme.txt
  36. +121 −0 open18_seam2/etc/glassfish-deployment/glassfish.build.xml
  37. BIN  open18_seam2/etc/golfer-avatars/bogey-small.png
  38. BIN  open18_seam2/etc/golfer-avatars/bogey.png
  39. BIN  open18_seam2/etc/golfer-avatars/drop.png
  40. BIN  open18_seam2/etc/golfer-avatars/eaglegirl-small.png
  41. BIN  open18_seam2/etc/golfer-avatars/eaglegirl.png
  42. BIN  open18_seam2/etc/golfer-avatars/golfer-large.png
  43. BIN  open18_seam2/etc/golfer-avatars/golfer-silhouette-large.png
  44. BIN  open18_seam2/etc/golfer-avatars/golfer-silhouette-medium.png
  45. BIN  open18_seam2/etc/golfer-avatars/golfer-silhouette-small.png
  46. BIN  open18_seam2/etc/golfer-avatars/golfer-small.png
  47. BIN  open18_seam2/etc/golfer-avatars/golfer.png
  48. BIN  open18_seam2/etc/golfer-avatars/hackit-small.png
  49. BIN  open18_seam2/etc/golfer-avatars/hazard-small.png
  50. BIN  open18_seam2/etc/golfer-avatars/hazard.png
  51. BIN  open18_seam2/etc/golfer-avatars/mulligan-small.png
  52. BIN  open18_seam2/etc/golfer-avatars/mulligan.png
  53. BIN  open18_seam2/etc/golfer-avatars/tux-small.png
  54. BIN  open18_seam2/etc/golfer-avatars/tux.png
  55. BIN  open18_seam2/etc/golfer-avatars/twoputt-small.png
  56. BIN  open18_seam2/etc/golfer-avatars/twoputt.png
  57. +64 −0 open18_seam2/etc/ivy-configuration/ivy.build.xml
  58. +21 −0 open18_seam2/etc/ivy-configuration/ivy.settings.xml
  59. +127 −0 open18_seam2/etc/ivy-configuration/ivy.xml
  60. +61 −0 open18_seam2/etc/jboss-as-conf/jboss-log4j.xml
  61. +54 −0 open18_seam2/etc/jboss-as-conf/run.conf
  62. +19 −0 open18_seam2/etc/jboss-as-conf/run.sh.patch
  63. BIN  open18_seam2/etc/mime-icons/pdf-icon.png
  64. BIN  open18_seam2/etc/mime-icons/rtf-icon.png
  65. BIN  open18_seam2/etc/open18-logo.png
  66. +135 −0 open18_seam2/etc/reveng/open18-seam-gen.reveng.xml
  67. BIN  open18_seam2/etc/schema/open18-db-initial-empty.zip
  68. BIN  open18_seam2/etc/schema/open18-db-initial-seeded.zip
  69. +28 −0 open18_seam2/etc/schema/open18-incremental-ch04.sql
  70. +98 −0 open18_seam2/etc/schema/open18-initial-schema.sql
  71. +2,440 −0 open18_seam2/etc/schema/open18-seed-data.sql
  72. +9 −0 open18_seam2/etc/schema/open18-trivia-seed-data.sql
  73. +3 −0  open18_seam2/etc/theme-resources/emeraldTown.skin.properties
  74. BIN  open18_seam2/etc/theme-resources/favicon.ico
  75. +90 −0 open18_seam2/etc/theme-resources/styles.xcss
  76. +63 −0 open18_seam2/etc/theme-resources/themeviewer.xhtml
  77. +8 −0 open18_seam2/etc/ui-templates/skel.page.xml
  78. +26 −0 open18_seam2/etc/ui-templates/skel.xhtml
  79. +10 −0 open18_seam2/hibernate-console.properties
  80. BIN  open18_seam2/lib/activation.jar
  81. BIN  open18_seam2/lib/ant-antlr.jar
  82. BIN  open18_seam2/lib/ant-contrib.jar
  83. BIN  open18_seam2/lib/ant-launcher.jar
  84. BIN  open18_seam2/lib/ant-nodeps.jar
  85. BIN  open18_seam2/lib/ant.jar
  86. BIN  open18_seam2/lib/antlr-runtime.jar
  87. BIN  open18_seam2/lib/antlr.jar
  88. BIN  open18_seam2/lib/backport-util-concurrent.jar
  89. BIN  open18_seam2/lib/blazeds-common.jar
  90. BIN  open18_seam2/lib/blazeds-core.jar
  91. BIN  open18_seam2/lib/blazeds-proxy.jar
  92. BIN  open18_seam2/lib/blazeds-remoting.jar
  93. BIN  open18_seam2/lib/bsh.jar
  94. BIN  open18_seam2/lib/cglib-nodep.jar
  95. BIN  open18_seam2/lib/commons-beanutils.jar
  96. BIN  open18_seam2/lib/commons-codec.jar
  97. BIN  open18_seam2/lib/commons-collections.jar
  98. BIN  open18_seam2/lib/commons-digester.jar
  99. BIN  open18_seam2/lib/commons-httpclient.jar
  100. BIN  open18_seam2/lib/commons-io.jar
  101. BIN  open18_seam2/lib/commons-lang.jar
  102. BIN  open18_seam2/lib/commons-logging.jar
  103. BIN  open18_seam2/lib/concurrent.jar
  104. BIN  open18_seam2/lib/core.jar
  105. BIN  open18_seam2/lib/dbunit.jar
  106. BIN  open18_seam2/lib/dom4j.jar
  107. BIN  open18_seam2/lib/drools-api.jar
  108. BIN  open18_seam2/lib/drools-compiler.jar
  109. BIN  open18_seam2/lib/drools-core.jar
  110. BIN  open18_seam2/lib/drools-decisiontables.jar
  111. BIN  open18_seam2/lib/drools-templates.jar
  112. BIN  open18_seam2/lib/ehcache.jar
  113. BIN  open18_seam2/lib/ejb-api.jar
  114. BIN  open18_seam2/lib/ejb3-persistence.jar
  115. BIN  open18_seam2/lib/el-api.jar
  116. BIN  open18_seam2/lib/emma.jar
  117. BIN  open18_seam2/lib/gen/ant.jar
  118. BIN  open18_seam2/lib/gen/bsh.jar
  119. BIN  open18_seam2/lib/gen/common.jar
  120. BIN  open18_seam2/lib/gen/darkX.jar
  121. BIN  open18_seam2/lib/gen/freemarker.jar
  122. BIN  open18_seam2/lib/gen/glassX.jar
  123. BIN  open18_seam2/lib/gen/hibernate-tools.jar
  124. BIN  open18_seam2/lib/gen/jboss-seam-gen.jar
  125. BIN  open18_seam2/lib/gen/jtidy.jar
  126. BIN  open18_seam2/lib/gen/laguna.jar
  127. BIN  open18_seam2/lib/gen/runtime.jar
  128. BIN  open18_seam2/lib/gen/src/jboss-seam-gen-sources.jar
  129. BIN  open18_seam2/lib/gen/text.jar
  130. BIN  open18_seam2/lib/groovy-all.jar
  131. BIN  open18_seam2/lib/guice.jar
  132. BIN  open18_seam2/lib/gwt-servlet.jar
  133. BIN  open18_seam2/lib/h2.jar
  134. BIN  open18_seam2/lib/hibernate-annotations.jar
  135. BIN  open18_seam2/lib/hibernate-commons-annotations.jar
  136. BIN  open18_seam2/lib/hibernate-core.jar
  137. BIN  open18_seam2/lib/hibernate-entitymanager.jar
  138. BIN  open18_seam2/lib/hibernate-search.jar
  139. BIN  open18_seam2/lib/hibernate-validator.jar
  140. BIN  open18_seam2/lib/hsqldb.jar
  141. BIN  open18_seam2/lib/htmlparser.jar
  142. BIN  open18_seam2/lib/httpclient.jar
  143. BIN  open18_seam2/lib/httpcore.jar
  144. BIN  open18_seam2/lib/interop/jboss-seam-jul.jar
  145. BIN  open18_seam2/lib/interop/jboss-seam-wls-compatible.jar
  146. BIN  open18_seam2/lib/interop/src/jboss-seam-jul-sources.jar
  147. BIN  open18_seam2/lib/interop/src/jboss-seam-wls-compatible-sources.jar
  148. BIN  open18_seam2/lib/itext-rtf.jar
  149. BIN  open18_seam2/lib/itext.jar
  150. BIN  open18_seam2/lib/janino.jar
  151. BIN  open18_seam2/lib/javassist.jar
  152. BIN  open18_seam2/lib/jaxb-api.jar
  153. BIN  open18_seam2/lib/jaxrs-api.jar
  154. BIN  open18_seam2/lib/jaxws-api.jar
  155. BIN  open18_seam2/lib/jboss-cache.jar
  156. BIN  open18_seam2/lib/jboss-common-core.jar
  157. BIN  open18_seam2/lib/jboss-deployers-client-spi.jar
  158. BIN  open18_seam2/lib/jboss-deployers-core-spi.jar
  159. BIN  open18_seam2/lib/jboss-el.jar
  160. BIN  open18_seam2/lib/jboss-embedded-api.jar
  161. BIN  open18_seam2/lib/jboss-jmx.jar
  162. BIN  open18_seam2/lib/jboss-logging-spi.jar
  163. BIN  open18_seam2/lib/jboss-seam-debug.jar
  164. BIN  open18_seam2/lib/jboss-seam-excel.jar
  165. BIN  open18_seam2/lib/jboss-seam-flex.jar
  166. BIN  open18_seam2/lib/jboss-seam-ioc.jar
  167. BIN  open18_seam2/lib/jboss-seam-jul.jar
  168. BIN  open18_seam2/lib/jboss-seam-mail.jar
  169. BIN  open18_seam2/lib/jboss-seam-pdf.jar
  170. BIN  open18_seam2/lib/jboss-seam-remoting.jar
  171. BIN  open18_seam2/lib/jboss-seam-resteasy.jar
  172. BIN  open18_seam2/lib/jboss-seam-rss.jar
  173. BIN  open18_seam2/lib/jboss-seam-ui.jar
  174. BIN  open18_seam2/lib/jboss-seam-wicket-ant.jar
  175. BIN  open18_seam2/lib/jboss-seam-wicket.jar
  176. BIN  open18_seam2/lib/jboss-seam.jar
  177. BIN  open18_seam2/lib/jboss-system.jar
  178. BIN  open18_seam2/lib/jboss-vfs.jar
  179. BIN  open18_seam2/lib/jbosscache-core.jar
  180. BIN  open18_seam2/lib/jbpm-jpdl.jar
  181. BIN  open18_seam2/lib/jcip-annotations.jar
  182. BIN  open18_seam2/lib/jcl-over-slf4j.jar
  183. BIN  open18_seam2/lib/jcommon.jar
  184. BIN  open18_seam2/lib/jettison.jar
  185. BIN  open18_seam2/lib/jfreechart.jar
  186. BIN  open18_seam2/lib/jgroups.jar
  187. BIN  open18_seam2/lib/jms.jar
  188. BIN  open18_seam2/lib/joda-time.jar
  189. BIN  open18_seam2/lib/jsf-api.jar
  190. BIN  open18_seam2/lib/jsf-facelets.jar
  191. BIN  open18_seam2/lib/jsf-impl.jar
  192. BIN  open18_seam2/lib/jsp-api.jar
  193. BIN  open18_seam2/lib/jsr181-api.jar
  194. BIN  open18_seam2/lib/jsr250-api.jar
  195. BIN  open18_seam2/lib/jta.jar
  196. BIN  open18_seam2/lib/junit.jar
  197. BIN  open18_seam2/lib/jxl.jar
  198. BIN  open18_seam2/lib/log4j.jar
  199. BIN  open18_seam2/lib/lucene-core.jar
  200. BIN  open18_seam2/lib/mail.jar
  201. BIN  open18_seam2/lib/meldware-mailapi.jar
  202. BIN  open18_seam2/lib/meldware-mailjmx.jar
  203. BIN  open18_seam2/lib/metawidget-backend.jar
  204. BIN  open18_seam2/lib/metawidget-frontend.jar
  205. BIN  open18_seam2/lib/metawidget.jar
  206. BIN  open18_seam2/lib/mvel2.jar
  207. BIN  open18_seam2/lib/openid4java.jar
  208. BIN  open18_seam2/lib/openxri-client.jar
  209. BIN  open18_seam2/lib/openxri-syntax.jar
  210. BIN  open18_seam2/lib/persistence-api.jar
  211. BIN  open18_seam2/lib/portlet-api.jar
  212. BIN  open18_seam2/lib/quartz.jar
  213. BIN  open18_seam2/lib/resteasy-atom-provider.jar
  214. BIN  open18_seam2/lib/resteasy-jaxb-provider.jar
  215. BIN  open18_seam2/lib/resteasy-jaxrs.jar
  216. BIN  open18_seam2/lib/resteasy-jettison-provider.jar
  217. BIN  open18_seam2/lib/richfaces-api.jar
  218. BIN  open18_seam2/lib/richfaces-impl.jar
  219. BIN  open18_seam2/lib/richfaces-ui.jar
  220. BIN  open18_seam2/lib/saaj-api.jar
  221. BIN  open18_seam2/lib/servlet-api.jar
  222. BIN  open18_seam2/lib/slf4j-api.jar
  223. BIN  open18_seam2/lib/slf4j-log4j12.jar
  224. BIN  open18_seam2/lib/spring.jar
  225. BIN  open18_seam2/lib/src/jboss-seam-debug-sources.jar
  226. BIN  open18_seam2/lib/src/jboss-seam-excel-sources.jar
  227. BIN  open18_seam2/lib/src/jboss-seam-flex-sources.jar
  228. BIN  open18_seam2/lib/src/jboss-seam-ioc-sources.jar
  229. BIN  open18_seam2/lib/src/jboss-seam-mail-sources.jar
  230. BIN  open18_seam2/lib/src/jboss-seam-pdf-sources.jar
  231. BIN  open18_seam2/lib/src/jboss-seam-remoting-sources.jar
  232. BIN  open18_seam2/lib/src/jboss-seam-resteasy-sources.jar
  233. BIN  open18_seam2/lib/src/jboss-seam-rss-sources.jar
  234. BIN  open18_seam2/lib/src/jboss-seam-sources.jar
  235. BIN  open18_seam2/lib/src/jboss-seam-ui-sources.jar
  236. BIN  open18_seam2/lib/src/jboss-seam-wicket-ant-sources.jar
  237. BIN  open18_seam2/lib/src/jboss-seam-wicket-sources.jar
  238. BIN  open18_seam2/lib/stax-api.jar
  239. BIN  open18_seam2/lib/test/hibernate-all.jar
  240. BIN  open18_seam2/lib/test/jboss-embedded-all.jar
  241. BIN  open18_seam2/lib/test/thirdparty-all.jar
  242. BIN  open18_seam2/lib/testng-jdk15.jar
  243. BIN  open18_seam2/lib/urlrewritefilter.jar
  244. BIN  open18_seam2/lib/wicket-datetime.jar
  245. BIN  open18_seam2/lib/wicket-extensions.jar
  246. BIN  open18_seam2/lib/wicket-ioc.jar
  247. BIN  open18_seam2/lib/wicket.jar
  248. BIN  open18_seam2/lib/xml-apis.jar
  249. BIN  open18_seam2/lib/xpp3_min.jar
  250. BIN  open18_seam2/lib/xstream.jar
  251. BIN  open18_seam2/lib/yarfraw.jar
  252. +14 −0 open18_seam2/resources/META-INF/orm.xml
  253. +24 −0 open18_seam2/resources/META-INF/persistence-dev-war.xml
  254. +22 −0 open18_seam2/resources/META-INF/persistence-prod-war.xml
  255. +19 −0 open18_seam2/resources/META-INF/persistence-test-war.xml
  256. +271 −0 open18_seam2/resources/WEB-INF/components.xml
  257. +19 −0 open18_seam2/resources/WEB-INF/faces-config.xml
  258. +12 −0 open18_seam2/resources/WEB-INF/jboss-web.xml
  259. +162 −0 open18_seam2/resources/WEB-INF/pages.xml
  260. +58 −0 open18_seam2/resources/WEB-INF/urlrewrite.xml
  261. +118 −0 open18_seam2/resources/WEB-INF/web.xml
  262. +4 −0 open18_seam2/resources/components.properties
  263. +99 −0 open18_seam2/resources/courseWizard-pageflow.jpdl.xml
  264. +3 −0  open18_seam2/resources/emeraldTown.skin.properties
  265. +19 −0 open18_seam2/resources/glassfish-datasource.xml
  266. 0  open18_seam2/resources/import-dev.sql
  267. 0  open18_seam2/resources/import-prod.sql
  268. +2 −0  open18_seam2/resources/import-test.sql
  269. +15 −0 open18_seam2/resources/messages.properties
  270. +88 −0 open18_seam2/resources/messages_bg.properties
  271. +88 −0 open18_seam2/resources/messages_de.properties
  272. +90 −0 open18_seam2/resources/messages_en.properties
  273. +98 −0 open18_seam2/resources/messages_fr.properties
  274. +90 −0 open18_seam2/resources/messages_tr.properties
  275. +27 −0 open18_seam2/resources/open18-dev-ds.xml
  276. +27 −0 open18_seam2/resources/open18-prod-ds.xml
  277. +93 −0 open18_seam2/resources/org/jboss/seam/ui/richfaces/styles.xcss
  278. +135 −0 open18_seam2/resources/seam-gen.reveng.xml
  279. 0  open18_seam2/resources/seam.properties
  280. +218 −0 open18_seam2/resources/security.drl
  281. +22 −0 open18_seam2/seam-gen.properties
  282. +11 −0 open18_seam2/src/action/org/open18/ProfileNotFoundException.java
  283. +60 −0 open18_seam2/src/action/org/open18/action/AuthenticationManager.java
  284. +75 −0 open18_seam2/src/action/org/open18/action/CourseComparison.java
  285. +137 −0 open18_seam2/src/action/org/open18/action/CourseHome.java
  286. +51 −0 open18_seam2/src/action/org/open18/action/CourseList.java
  287. +244 −0 open18_seam2/src/action/org/open18/action/CourseWizard.java
  288. +98 −0 open18_seam2/src/action/org/open18/action/FacilityHome.java
  289. +67 −0 open18_seam2/src/action/org/open18/action/FacilityList.java
  290. +51 −0 open18_seam2/src/action/org/open18/action/GolferHome.java
  291. +14 −0 open18_seam2/src/action/org/open18/action/GolferList.java
  292. +53 −0 open18_seam2/src/action/org/open18/action/HoleHome.java
  293. +35 −0 open18_seam2/src/action/org/open18/action/HoleList.java
  294. +110 −0 open18_seam2/src/action/org/open18/action/LabProfileAction.java
  295. +16 −0 open18_seam2/src/action/org/open18/action/MultiRoundAction.groovy
  296. +57 −0 open18_seam2/src/action/org/open18/action/NewGolfersList.java
  297. +77 −0 open18_seam2/src/action/org/open18/action/ProfileAction.java
  298. +95 −0 open18_seam2/src/action/org/open18/action/RegisterAction.java
  299. +23 −0 open18_seam2/src/action/org/open18/action/RegistrationBookKeeper.java
  300. +95 −0 open18_seam2/src/action/org/open18/action/RoundHome.java
Sorry, we could not display the entire diff because too many files (408) changed.
View
2  open18_seam2/build-dev.properties
@@ -0,0 +1,2 @@
+debug=true
+action.dir=WEB-INF/dev
View
4 open18_seam2/build-prod.properties
@@ -0,0 +1,4 @@
+debug=false
+
+
+
View
4 open18_seam2/build.properties
@@ -0,0 +1,4 @@
+#jboss.home = set this
+seam.version=2.2.2.Final
+jboss-as.version=5.1.0
+sourceforge.mirror=transact.dl.sourceforge.net
View
345 open18_seam2/build.xml
@@ -0,0 +1,345 @@
+<?xml version="1.0"?>
+
+<project name="open18" default="deploy" basedir=".">
+
+ <!-- Give user a chance to override without editing this file or typing -D -->
+ <property file="${basedir}/build.local.properties" /> <!-- dallen: root directory of seaminaction example code -->
+ <property file="${basedir}/build.properties" />
+
+ <property name="profile" value="dev" />
+ <property file="build-${profile}.properties" />
+
+ <!-- set global properties for this build -->
+ <property name="project.name" value="open18"/>
+ <property name="dist.dir" value="dist" />
+ <property name="src.model.dir" value="src/model" />
+ <property name="src.action.dir" value="src/action" />
+ <property name="src.test.dir" value="src/test" />
+ <property name="lib.dir" value="lib" />
+ <property name="war.dir" value="exploded-archives/${project.name}" /> <!-- dallen: GlassFish cannot accommodate .war suffix, so it has been removed -->
+ <property name="classes.model.dir" value="${war.dir}/WEB-INF/classes" />
+ <property name="action.dir" value="WEB-INF/classes" />
+ <property name="classes.action.dir" value="${war.dir}/${action.dir}" />
+ <property name="test.dir" value="test-build" />
+ <property name="bootstrap.dir" value="${basedir}/bootstrap" />
+ <property name="deploy.dir" value="${jboss.home}/server/default/deploy" />
+ <property name="war.deploy.dir" value="${deploy.dir}/${project.name}.war" />
+ <property name="testng.jar" value="${basedir}/lib/testng.jar" />
+ <property name="javac.debug" value="true" />
+ <property name="javac.deprecation" value="false" />
+ <property name="debug" value="false" />
+
+ <fileset id="lib" dir="${lib.dir}">
+ <include name="*.jar" />
+ </fileset>
+
+ <path id="build.classpath">
+ <fileset refid="lib" />
+ </path>
+
+ <target name="init" description="Initialize the build">
+
+ <taskdef name ="groovyc"
+ classname ="org.codehaus.groovy.ant.Groovyc"
+ classpathref="build.classpath"/> <!-- really only the groovy jar is necessary -->
+
+ <mkdir dir="${classes.model.dir}" />
+ <mkdir dir="${classes.action.dir}" />
+ <mkdir dir="${dist.dir}" />
+ <!-- if a .groovy file is in model or action, set groovy.present -->
+ <available property="groovy.present" value="true" file="" searchparents="true">
+ <filepath>
+ <fileset dir="${src.action.dir}">
+ <include name="**/*.groovy"/>
+ </fileset>
+ </filepath>
+ </available>
+ <condition property="groovy.dynamic" value="true">
+ <and>
+ <isset property="groovy.present"/>
+ <istrue value="${debug}"/>
+ </and>
+ </condition>
+ <condition property="groovy.static" value="true">
+ <and>
+ <isset property="groovy.present"/>
+ <isfalse value="${debug}"/>
+ </and>
+ </condition>
+ </target>
+
+ <target name="compilemodel" depends="init,groovy.compilemodel"
+ description="Compile the Java source code"
+ unless="eclipse.running">
+ <javac classpathref="build.classpath"
+ destdir="${classes.model.dir}"
+ debug="${javac.debug}"
+ deprecation="${javac.deprecation}"
+ nowarn="on">
+ <src path="${src.model.dir}" />
+ </javac>
+ </target>
+
+ <target name="groovy.compilemodel" if="groovy.present">
+ <!-- model is always compiled -->
+ <groovyc classpathref="build.classpath"
+ destdir="${classes.model.dir}"
+ srcdir="${src.model.dir}" >
+ </groovyc>
+ </target>
+
+ <target name="compileactions" depends="init,groovy.compileactions,groovy.copyactions"
+ description="Compile the Java source code"
+ unless="eclipse.running">
+ <javac classpathref="build.classpath"
+ destdir="${classes.action.dir}"
+ debug="${javac.debug}"
+ deprecation="${javac.deprecation}"
+ nowarn="on">
+ <classpath path="${classes.model.dir}"/>
+ <src path="${src.action.dir}" />
+ </javac>
+ </target>
+
+ <target name="groovy.compileactions" if="groovy.static">
+ <path id="groovy.action.classpath">
+ <path refid="build.classpath"/>
+ <dirset dir="${classes.model.dir}"/>
+ </path>
+ <groovyc classpathref="groovy.action.classpath"
+ destdir="${classes.action.dir}"
+ srcdir="${src.action.dir}" >
+ </groovyc>
+ </target>
+
+ <target name="groovy.copyactions" if="groovy.dynamic">
+ <!-- copy the action groovy files into action if not compiled -->
+ <copy todir="${classes.action.dir}">
+ <fileset dir="${src.action.dir}">
+ <include name="**/*.groovy"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="copyclasses" depends="init,groovy.copyactions"
+ description="Copy the classes that were compiled by eclipse"
+ if="eclipse.running">
+ <!-- TODO check how the groovy eclipse plugin works, does it compile? -->
+ <copy todir="${classes.model.dir}">
+ <fileset dir="classes/model">
+ <include name="**/*.class"/>
+ </fileset>
+ </copy>
+ <copy todir="${classes.action.dir}">
+ <fileset dir="classes/action">
+ <include name="**/*.class"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="war" depends="compilemodel,compileactions,copyclasses"
+ description="Build the distribution .war file">
+
+ <copy todir="${war.dir}/WEB-INF/classes">
+ <fileset dir="${basedir}/resources">
+ <include name="seam.properties" />
+ <include name="*.drl" />
+ </fileset>
+ </copy>
+
+ <copy tofile="${war.dir}/WEB-INF/classes/META-INF/persistence.xml"
+ file="${basedir}/resources/META-INF/persistence-${profile}-war.xml"
+ overwrite="true"/>
+
+ <copy tofile="${war.dir}/WEB-INF/classes/import.sql"
+ file="${basedir}/resources/import-${profile}.sql"
+ overwrite="true"/>
+
+ <copy todir="${war.dir}">
+ <fileset dir="${basedir}/view" />
+ </copy>
+
+ <copy todir="${war.dir}/WEB-INF">
+ <fileset dir="${basedir}/resources/WEB-INF">
+ <include name="*.*"/>
+ <include name="classes/**/*.*"/>
+ <exclude name="classes/**/*.class"/>
+ <exclude name="classes/**/*.groovy"/>
+ </fileset>
+ <filterset>
+ <filter token="debug" value="${debug}" />
+ <filter token="jndiPattern" value="${project.name}/#{ejbName}/local"/>
+ </filterset>
+ </copy>
+
+ <copy todir="${war.dir}/WEB-INF">
+ <fileset dir="${basedir}/resources/WEB-INF">
+ <include name="lib/*.*"/>
+ <include name="classes/**/*.class"/>
+ </fileset>
+ </copy>
+
+ <copy todir="${war.dir}/WEB-INF/lib">
+ <fileset dir="${lib.dir}">
+ <includesfile name="deployed-jars.list"/>
+ <exclude name="jboss-seam-gen.jar"/>
+ <include name="groovy-*.jar" if="groovy.present"/>
+ </fileset>
+ </copy>
+
+ <copy todir="${war.dir}/WEB-INF/classes"> <!-- dallen: RichFaces dynamic styles -->
+ <fileset dir="${basedir}/resources">
+ <include name="**/*.xcss"/>
+ </fileset>
+ </copy>
+
+ <copy todir="${war.dir}/WEB-INF/classes">
+ <fileset dir="${basedir}/resources">
+ <include name="messages*.properties"/>
+ <include name="*.skin.properties"/> <!-- dallen: RichFaces skins -->
+ </fileset>
+ </copy>
+
+ <copy todir="${war.dir}/WEB-INF/classes">
+ <fileset dir="${basedir}/resources">
+ <include name="*jpdl.xml" />
+ <include name="*hibernate.cfg.xml" />
+ <include name="jbpm.cfg.xml" />
+ <include name="META-INF/orm.xml" /> <!-- dallen: XML-based JPA configuration -->
+ </fileset>
+ </copy>
+
+ </target>
+
+ <target name="archive" depends="war"
+ description="Package the archives">
+ <jar jarfile="${dist.dir}/${project.name}.war" basedir="${war.dir}"/>
+ </target>
+
+ <target name="datasource">
+ <fail unless="jboss.home">jboss.home not set</fail>
+ <copy todir="${deploy.dir}">
+ <fileset dir="${basedir}/resources">
+ <include name="${project.name}-${profile}-ds.xml" />
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="explode" depends="war,datasource"
+ description="Deploy the exploded archive">
+ <fail unless="jboss.home">jboss.home not set</fail>
+
+ <mkdir dir="${war.deploy.dir}"/>
+ <copy todir="${war.deploy.dir}">
+ <fileset dir="${war.dir}"/>
+ </copy>
+ </target>
+
+ <target name="unexplode" description="Undeploy the exploded archive">
+ <delete failonerror="no">
+ <fileset dir="${war.deploy.dir}">
+ <exclude name="**/*.jar"/>
+ </fileset>
+ </delete>
+ <delete file="${deploy.dir}/${project.name}-${profile}-ds.xml" failonerror="no"/>
+ <delete dir="${war.deploy.dir}" failonerror="no"/>
+ </target>
+
+ <target name="restart" depends="explode" description="Restart the exploded archive">
+ <touch file="${war.deploy.dir}/WEB-INF/web.xml"/>
+ </target>
+
+ <target name="deploy" depends="archive,datasource" description="Deploy to JBoss AS">
+ <fail unless="jboss.home">jboss.home not set</fail>
+ <copy todir="${deploy.dir}" file="${dist.dir}/${project.name}.war" />
+ </target>
+
+ <target name="undeploy" description="Undeploy the example from JBoss">
+ <delete file="${deploy.dir}/${project.name}.war" />
+ <delete file="${deploy.dir}/${project.name}-dev-ds.xml" />
+ <delete file="${deploy.dir}/${project.name}-prod-ds.xml" />
+ </target>
+
+ <target name="clean" description="Cleans up the build directory">
+ <delete dir="${dist.dir}"/>
+ <delete dir="${war.dir}"/>
+ <delete dir="${basedir}/test-report"/>
+ <delete dir="${basedir}/test-output"/>
+ <delete failonerror="no" includeemptydirs="true">
+ <fileset dir="${test.dir}">
+ <exclude name="**/*.class" if="eclipse.running"/>
+ </fileset>
+ </delete>
+ </target>
+
+ <target name="compiletest" unless="eclipse.running" description="Compile the Java source code for the tests">
+ <mkdir dir="${test.dir}"/>
+ <javac classpathref="build.classpath"
+ destdir="${test.dir}"
+ debug="${javac.debug}"
+ deprecation="${javac.deprecation}"
+ nowarn="on">
+ <src path="${src.action.dir}" />
+ <src path="${src.model.dir}" />
+ <src path="${src.test.dir}" />
+ </javac>
+ </target>
+
+ <target name="copytestclasses" if="eclipse.running" description="Copy classes compiled by eclipse to the test dir">
+ <mkdir dir="${test.dir}"/>
+ <copy todir="${test.dir}">
+ <fileset dir="classes/model">
+ <include name="**/*.class"/>
+ </fileset>
+ </copy>
+ <copy todir="${test.dir}">
+ <fileset dir="classes/action">
+ <include name="**/*.class"/>
+ </fileset>
+ </copy>
+ <copy todir="${test.dir}">
+ <fileset dir="classes/test">
+ <include name="**/*.class"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="buildtest" depends="compiletest,copytestclasses" description="Build the tests">
+ <copy todir="${test.dir}">
+ <fileset dir="${basedir}/resources">
+ <exclude name="META-INF/persistence*.xml"/>
+ <exclude name="import*.sql"/>
+ <exclude name="${project.name}-*-ds.xml"/>
+ </fileset>
+ <fileset dir="${basedir}/view"/> <!-- dallen: added view directory since tests are page-oriented -->
+ </copy>
+ <copy tofile="${test.dir}/META-INF/persistence.xml"
+ file="${basedir}/resources/META-INF/persistence-test-war.xml"
+ overwrite="true"/>
+ <copy tofile="${test.dir}/import.sql"
+ file="${basedir}/resources/import-test.sql"
+ overwrite="true"/>
+ <copy todir="${test.dir}" flatten="true">
+ <fileset dir="${src.test.dir}">
+ <include name="**/*Test.xml" />
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="test" depends="buildtest" description="Run the tests">
+ <taskdef resource="testngtasks" classpath="${testng.jar}" />
+ <path id="test.path">
+ <path path="${test.dir}" />
+ <fileset dir="${lib.dir}/test">
+ <include name="*.jar"/>
+ </fileset>
+ <path path="${bootstrap.dir}" />
+ <path refid="build.classpath" />
+ </path>
+ <testng outputdir="${basedir}/test-report">
+ <classpath refid="test.path" />
+ <xmlfileset dir="${test.dir}" includes="*Test.xml" />
+ </testng>
+ </target>
+
+</project>
View
14 open18_seam2/chapter-developments.txt
@@ -0,0 +1,14 @@
+Seam in Action: Chapter 11
+--------------------------
+This file details developments made to the application source code during this
+chapter. Please note that the enhancements described here my go beyond what is
+covered in the book.
+
+TODO:
+ - backport fix for preserving course search in conversation
+
+open18:
+ - add @Name("golfer") and @Role(name = "currentGolfer", scope = ScopeType.SESSION) to the Golfer entity
+ - changed all checks for currentGolfer to s:hasRole('golfer')
+ - added encoding and saltPhrase to PasswordManager
+ - prepares for Identity Management in Seam 2.1, which uses base64 rather than hex and allows for the use of a salt
View
BIN  open18_seam2/databases/open18-db/h2.2.log.db
Binary file not shown
View
BIN  open18_seam2/databases/open18-db/h2.data.db
Binary file not shown
View
BIN  open18_seam2/databases/open18-db/h2.index.db
Binary file not shown
View
17 open18_seam2/deployed-jars.list
@@ -0,0 +1,17 @@
+antlr-runtime.jar
+commons-beanutils.jar
+commons-digester.jar
+core.jar
+drools-compiler.jar
+drools-core.jar
+janino.jar
+jboss-el.jar
+jboss-seam.jar
+jboss-seam-*.jar
+jbpm-jpdl.jar
+jsf-facelets.jar
+mvel14.jar
+richfaces-api.jar
+richfaces-impl.jar
+richfaces-ui.jar
+urlrewritefilter.jar
View
BIN  open18_seam2/etc/facility-logos/beartrapdunes.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  open18_seam2/etc/facility-logos/beechtree.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  open18_seam2/etc/facility-logos/carolinaclub.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  open18_seam2/etc/facility-logos/grayhawk.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  open18_seam2/etc/facility-logos/hawktree.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  open18_seam2/etc/facility-logos/hellspoint.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  open18_seam2/etc/facility-logos/oceanpines.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  open18_seam2/etc/facility-logos/oldworks.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  open18_seam2/etc/facility-logos/patuxentgreens.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  open18_seam2/etc/facility-logos/pineneedles.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  open18_seam2/etc/facility-logos/renditions.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  open18_seam2/etc/facility-logos/restonnational.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  open18_seam2/etc/facility-logos/thepointe.gif
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  open18_seam2/etc/facility-logos/thetimbersattroy.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  open18_seam2/etc/facility-logos/whitetail.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  open18_seam2/etc/feed-icons/feed-icon-chic.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  open18_seam2/etc/feed-icons/feed-icon-classic.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  open18_seam2/etc/feed-icons/feed-icon-countryclub.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  open18_seam2/etc/feed-icons/feed-icon-eco.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  open18_seam2/etc/feed-icons/feed-icon-modern.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  open18_seam2/etc/feed-icons/feed-icon-ocean.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  open18_seam2/etc/feed-icons/feed-icon-passion.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  open18_seam2/etc/feed-icons/feed-icon-sky.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  open18_seam2/etc/feed-icons/feed-icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
363 open18_seam2/etc/glassfish-deployment/build.xml
@@ -0,0 +1,363 @@
+<?xml version="1.0"?>
+
+<project name="open18" default="deploy" basedir=".">
+
+ <!-- Give user a chance to override without editing this file or typing -D -->
+ <property file="../../../${basedir}/build.properties" /> <!-- dallen: root directory of seaminaction example code -->
+ <property file="${basedir}/build.properties" />
+
+ <property name="profile" value="dev" />
+ <property file="build-${profile}.properties" />
+
+ <!-- set global properties for this build -->
+ <property name="project.name" value="open18"/>
+ <property name="dist.dir" value="dist" />
+ <property name="src.model.dir" value="src/model" />
+ <property name="src.action.dir" value="src/action" />
+ <property name="src.test.dir" value="src/test" />
+ <property name="lib.dir" value="lib" />
+ <property name="war.dir" value="exploded-archives/${project.name}.war" />
+ <property name="classes.model.dir" value="${war.dir}/WEB-INF/classes" />
+ <property name="action.dir" value="WEB-INF/classes" />
+ <property name="classes.action.dir" value="${war.dir}/${action.dir}" />
+ <property name="test.dir" value="test-build" />
+ <property name="bootstrap.dir" value="${basedir}/bootstrap" />
+ <property name="deploy.dir" value="${jboss.home}/server/default/deploy" />
+ <property name="war.deploy.dir" value="${deploy.dir}/${project.name}.war" />
+ <property name="testng.jar" value="${basedir}/lib/testng.jar" />
+ <property name="javac.debug" value="true" />
+ <property name="javac.deprecation" value="false" />
+ <property name="debug" value="false" />
+
+ <import file="${basedir}/glassfish.build.xml"/>
+
+ <fileset id="lib" dir="${lib.dir}">
+ <include name="*.jar" />
+ </fileset>
+
+ <path id="build.classpath">
+ <fileset refid="lib" />
+ </path>
+
+ <target name="init" description="Initialize the build">
+
+ <taskdef name ="groovyc"
+ classname ="org.codehaus.groovy.ant.Groovyc"
+ classpathref="build.classpath"/> <!-- really only the groovy jar is necessary -->
+
+ <mkdir dir="${classes.model.dir}" />
+ <mkdir dir="${classes.action.dir}" />
+ <mkdir dir="${dist.dir}" />
+ <!-- if a .groovy file is in model or action, set groovy.present -->
+ <available property="groovy.present" value="true" file="" searchparents="true">
+ <filepath>
+ <fileset dir="${src.action.dir}">
+ <include name="**/*.groovy"/>
+ </fileset>
+ </filepath>
+ </available>
+ <condition property="groovy.dynamic" value="true">
+ <and>
+ <isset property="groovy.present"/>
+ <istrue value="${debug}"/>
+ </and>
+ </condition>
+ <condition property="groovy.static" value="true">
+ <and>
+ <isset property="groovy.present"/>
+ <isfalse value="${debug}"/>
+ </and>
+ </condition>
+ </target>
+
+ <target name="compilemodel" depends="init,groovy.compilemodel"
+ description="Compile the Java source code"
+ unless="eclipse.running">
+ <javac classpathref="build.classpath"
+ destdir="${classes.model.dir}"
+ debug="${javac.debug}"
+ deprecation="${javac.deprecation}"
+ nowarn="on">
+ <src path="${src.model.dir}" />
+ </javac>
+ </target>
+
+ <target name="groovy.compilemodel" if="groovy.present">
+ <!-- model is always compiled -->
+ <groovyc classpathref="build.classpath"
+ destdir="${classes.model.dir}"
+ srcdir="${src.model.dir}" >
+ </groovyc>
+ </target>
+
+ <target name="compileactions" depends="init,groovy.compileactions,groovy.copyactions"
+ description="Compile the Java source code"
+ unless="eclipse.running">
+ <javac classpathref="build.classpath"
+ destdir="${classes.action.dir}"
+ debug="${javac.debug}"
+ deprecation="${javac.deprecation}"
+ nowarn="on">
+ <classpath path="${classes.model.dir}"/>
+ <src path="${src.action.dir}" />
+ </javac>
+ </target>
+
+ <target name="groovy.compileactions" if="groovy.static">
+ <path id="groovy.action.classpath">
+ <path refid="build.classpath"/>
+ <dirset dir="${classes.model.dir}"/>
+ </path>
+ <groovyc classpathref="groovy.action.classpath"
+ destdir="${classes.action.dir}"
+ srcdir="${src.action.dir}" >
+ </groovyc>
+ </target>
+
+ <target name="groovy.copyactions" if="groovy.dynamic">
+ <!-- copy the action groovy files into action if not compiled -->
+ <copy todir="${classes.action.dir}">
+ <fileset dir="${src.action.dir}">
+ <include name="**/*.groovy"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="copyclasses" depends="init,groovy.copyactions"
+ description="Copy the classes that were compiled by eclipse"
+ if="eclipse.running">
+ <!-- TODO check how the groovy eclipse plugin works, does it compile? -->
+ <copy todir="${classes.model.dir}">
+ <fileset dir="classes/model">
+ <include name="**/*.class"/>
+ </fileset>
+ </copy>
+ <copy todir="${classes.action.dir}">
+ <fileset dir="classes/action">
+ <include name="**/*.class"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="war" depends="compilemodel,compileactions,copyclasses"
+ description="Build the distribution .war file">
+ <property name="seam_bootstrap_pu" value="true"/>
+ <property name="seam_emf" value="#{${project.name}EntityManagerFactory}"/>
+ <property name="pu_jndi_name" value=""/>
+ <property name="transaction_manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
+ <property name="show_sql" value="true"/>
+
+ <copy todir="${war.dir}/WEB-INF/classes">
+ <fileset dir="${basedir}/resources">
+ <include name="seam.properties" />
+ <include name="*.drl" />
+ </fileset>
+ </copy>
+
+ <copy tofile="${war.dir}/WEB-INF/classes/META-INF/persistence.xml"
+ file="${basedir}/resources/META-INF/persistence-${profile}-war.xml"
+ overwrite="true">
+ <filterset>
+ <filter token="transaction_manager_lookup_class" value="${transaction_manager_lookup_class}" />
+ <filter token="show_sql" value="${show_sql}" />
+ </filterset>
+ </copy>
+
+ <copy tofile="${war.dir}/WEB-INF/classes/import.sql"
+ file="${basedir}/resources/import-${profile}.sql"
+ overwrite="true"/>
+
+ <copy todir="${war.dir}">
+ <fileset dir="${basedir}/view" />
+ </copy>
+
+ <copy todir="${war.dir}/WEB-INF">
+ <fileset dir="${basedir}/resources/WEB-INF">
+ <include name="*.*"/>
+ <include name="classes/**/*.*"/>
+ <exclude name="classes/**/*.class"/>
+ <exclude name="classes/**/*.groovy"/>
+ </fileset>
+ <filterset>
+ <filter token="debug" value="${debug}" />
+ <filter token="jndiPattern" value="${project.name}/#{ejbName}/local"/>
+ <filter token="seam_bootstrap_pu" value="${seam_bootstrap_pu}" />
+ <filter token="seam_emf" value="${seam_emf}" />
+ <filter token="pu_jndi_name" value="${pu_jndi_name}" />
+ </filterset>
+ </copy>
+
+ <copy todir="${war.dir}/WEB-INF">
+ <fileset dir="${basedir}/resources/WEB-INF">
+ <include name="lib/*.*"/>
+ <include name="classes/**/*.class"/>
+ </fileset>
+ </copy>
+
+ <copy todir="${war.dir}/WEB-INF/lib">
+ <fileset dir="${lib.dir}">
+ <includesfile name="deployed-jars.list"/>
+ <exclude name="jboss-seam-gen.jar"/>
+ <include name="groovy-*.jar" if="groovy.present"/>
+ </fileset>
+ </copy>
+
+ <copy todir="${war.dir}/WEB-INF/classes"> <!-- dallen: RichFaces dynamic styles -->
+ <fileset dir="${basedir}/resources">
+ <include name="**/*.xcss"/>
+ </fileset>
+ </copy>
+
+ <copy todir="${war.dir}/WEB-INF/classes">
+ <fileset dir="${basedir}/resources">
+ <include name="messages*.properties"/>
+ <include name="*.skin.properties"/> <!-- dallen: RichFaces skins -->
+ <include name="*_theme.properties"/> <!-- dallen: Seam themes -->
+ </fileset>
+ </copy>
+
+ <copy todir="${war.dir}/WEB-INF/classes">
+ <fileset dir="${basedir}/resources">
+ <include name="*jpdl.xml" />
+ <include name="*hibernate.cfg.xml" />
+ </fileset>
+ </copy>
+
+ </target>
+
+ <target name="archive" depends="war"
+ description="Package the archives">
+ <jar jarfile="${dist.dir}/${project.name}.war" basedir="${war.dir}"/>
+ </target>
+
+ <target name="datasource">
+ <fail unless="jboss.home">jboss.home not set</fail>
+ <copy todir="${deploy.dir}">
+ <fileset dir="${basedir}/resources">
+ <include name="${project.name}-${profile}-ds.xml" />
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="explode" depends="war,datasource"
+ description="Deploy the exploded archive">
+ <fail unless="jboss.home">jboss.home not set</fail>
+
+ <mkdir dir="${war.deploy.dir}"/>
+ <copy todir="${war.deploy.dir}">
+ <fileset dir="${war.dir}"/>
+ </copy>
+ </target>
+
+ <target name="unexplode" description="Undeploy the exploded archive">
+ <delete failonerror="no">
+ <fileset dir="${war.deploy.dir}">
+ <exclude name="**/*.jar"/>
+ </fileset>
+ </delete>
+ <delete file="${deploy.dir}/${project.name}-${profile}-ds.xml" failonerror="no"/>
+ <delete dir="${war.deploy.dir}" failonerror="no"/>
+ </target>
+
+ <target name="restart" depends="explode" description="Restart the exploded archive">
+ <touch file="${war.deploy.dir}/WEB-INF/web.xml"/>
+ </target>
+
+ <target name="reexplode" depends="unexplode,clean,explode" description="Redeploy the exploded archive"/>
+
+ <target name="deploy" depends="archive,datasource" description="Deploy to JBoss AS">
+ <fail unless="jboss.home">jboss.home not set</fail>
+ <copy todir="${deploy.dir}" file="${dist.dir}/${project.name}.war" />
+ </target>
+
+ <target name="undeploy" description="Undeploy the example from JBoss">
+ <delete file="${deploy.dir}/${project.name}.war" />
+ <delete file="${deploy.dir}/${project.name}-dev-ds.xml" />
+ <delete file="${deploy.dir}/${project.name}-prod-ds.xml" />
+ </target>
+
+ <target name="redeploy" depends="undeploy,clean,deploy" description="Redeploy the packaged archive"/>
+
+ <target name="clean" description="Cleans up the build directory">
+ <delete dir="${dist.dir}"/>
+ <delete dir="${war.dir}"/>
+ <delete dir="${basedir}/test-report"/>
+ <delete dir="${basedir}/test-output"/>
+ <delete failonerror="no" includeemptydirs="true">
+ <fileset dir="${test.dir}">
+ <exclude name="**/*.class" if="eclipse.running"/>
+ </fileset>
+ </delete>
+ </target>
+
+ <target name="compiletest" unless="eclipse.running" description="Compile the Java source code for the tests">
+ <mkdir dir="${test.dir}"/>
+ <javac classpathref="build.classpath"
+ destdir="${test.dir}"
+ debug="${javac.debug}"
+ deprecation="${javac.deprecation}"
+ nowarn="on">
+ <src path="${src.action.dir}" />
+ <src path="${src.model.dir}" />
+ <src path="${src.test.dir}" />
+ </javac>
+ </target>
+
+ <target name="copytestclasses" if="eclipse.running" description="Copy classes compiled by eclipse to the test dir">
+ <mkdir dir="${test.dir}"/>
+ <copy todir="${test.dir}">
+ <fileset dir="classes/model">
+ <include name="**/*.class"/>
+ </fileset>
+ </copy>
+ <copy todir="${test.dir}">
+ <fileset dir="classes/action">
+ <include name="**/*.class"/>
+ </fileset>
+ </copy>
+ <copy todir="${test.dir}">
+ <fileset dir="classes/test">
+ <include name="**/*.class"/>
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="buildtest" depends="compiletest,copytestclasses" description="Build the tests">
+ <copy todir="${test.dir}">
+ <fileset dir="${basedir}/resources">
+ <exclude name="META-INF/persistence*.xml"/>
+ <exclude name="import*.sql"/>
+ <exclude name="${project.name}-*-ds.xml"/>
+ </fileset>
+ <fileset dir="${basedir}/view"/> <!-- dallen: added view directory since tests are page-oriented -->
+ </copy>
+ <copy tofile="${test.dir}/META-INF/persistence.xml"
+ file="${basedir}/resources/META-INF/persistence-test-war.xml"
+ overwrite="true"/>
+ <copy tofile="${test.dir}/import.sql"
+ file="${basedir}/resources/import-test.sql"
+ overwrite="true"/>
+ <copy todir="${test.dir}" flatten="true">
+ <fileset dir="${src.test.dir}">
+ <include name="**/*Test.xml" />
+ </fileset>
+ </copy>
+ </target>
+
+ <target name="test" depends="buildtest" description="Run the tests">
+ <taskdef resource="testngtasks" classpath="${testng.jar}" />
+ <path id="test.path">
+ <path path="${test.dir}" />
+ <fileset dir="${lib.dir}/test">
+ <include name="*.jar"/>
+ </fileset>
+ <path path="${bootstrap.dir}" />
+ <path refid="build.classpath" />
+ </path>
+ <testng outputdir="${basedir}/test-report">
+ <classpath refid="test.path" />
+ <xmlfileset dir="${test.dir}" includes="*Test.xml" />
+ </testng>
+ </target>
+
+</project>
View
140 open18_seam2/etc/glassfish-deployment/glassfish-readme.txt
@@ -0,0 +1,140 @@
+Using seam-gen project on GlassFish
+-----------------------------------
+This document explains how to configure a seam-gen project to simultaneously
+support deployment to JBoss AS and GlassFish. In fact, aside from a handful of
+transparent changes, you don't do anything differently if you are deploying to
+JBoss AS. You just have an additional set of targets for controlling and
+deploying to GlassFish. These instructions pertain to a seam-gen WAR project.
+
+== General Information ==
+
+All of the GlassFish-related commands use the prefix gf-. You use these
+commands exclusively when controlling and deploying to GlassFish. However, the
+semantics of the commands changes a bit. See the Commands section below for
+details.
+
+== Preparation ==
+
+To get started with GlassFish, you must have the GlassFish distribution. The
+deployment has been tested on GlassFish V2. Once the distribution is extracted,
+set the glassfish.home and glassfish.domain properties in build.properties.
+
+glassfish.home=???
+glassfish.domain=???
+
+Don't worry, the build will tell you if they are not set.
+
+Before deploying the project to GlassFish, Hibernate needs to be deployed to
+GlassFish as a JPA provider.
+
+ ant gf-prepare
+
+At this point, you are ready to deploy your project (open18).
+
+== Changes to project ==
+
+GlassFish uses a different JNDI pattern than JBoss AS. (Truthfully, JBoss AS
+uses a strange proprietary prefix that is best to disable for compatibility).
+To prep the pattern so that it works on both servers, there are two steps:
+
+1. Remove the java:/ prefix where JNDI datasource is referenced
+2. Add <use-java-context>false</use-java-context> to each datasource definition
+
+Several changes had to be made to be made to project files that deal with the
+persistence unit accommodate switching between two servers. First, Ant filter
+tokens have been added to the following two files:
+
+ resources/META-INF/persistence-%profile%-war.xml
+ resources/WEB-INF/components.xml
+
+The values for the filter tokens are defined in the Ant build file and are used
+to customize the Java persistence settings and load behavior. Below are the
+default values, which are defined just inside the war target and used in a
+JBoss AS deployment.
+
+ <property name="seam_bootstrap_pu" value="true"/>
+ <property name="seam_emf" value="#{entityManagerFactory}"/>
+ <property name="pu_jndi_name" value=""/>
+ <property name="transaction_manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
+ <property name="show_sql" value="true"/>
+
+For GlassFish, overrides are established in the gf-init target. These overrides
+are as follows:
+
+ <property name="transaction_manager_lookup_class" value="org.hibernate.transaction.SunONETransactionManagerLookup"/>
+ <property name="seam_bootstrap_pu" value="false"/>
+ <property name="seam_emf" value="#{null}"/>
+ <property name="pu_jndi_name" value="java:comp/env/${project.name}/emf"/>
+
+These properties are applied using the Ant <filterset> command in two places.
+First, when copying the persistence unit descriptor inside the war target:
+
+ <copy tofile="${war.dir}/WEB-INF/classes/META-INF/persistence.xml"
+ file="${basedir}/resources/META-INF/persistence-${profile}-war.xml"
+ overwrite="true">
+ <filterset>
+ <filter token="transaction_manager_lookup_class" value="${transaction_manager_lookup_class}"/>
+ <filter token="show_sql" value="${show_sql}"/>
+ </filterset>
+ </copy>
+
+The also need to be appended to the <filterset> used when copying the
+resources/WEB-INF folder, also inside the war target:
+
+ <copy todir="${war.dir}/WEB-INF">
+ <fileset dir="${basedir}/resources/WEB-INF">
+ ...
+ </fileset>
+ <filterset>
+ ...
+ <filter token="seam_bootstrap_pu" value="${seam_bootstrap_pu}"/>
+ <filter token="seam_emf" value="${seam_emf}"/>
+ <filter token="pu_jndi_name" value="${pu_jndi_name}"/>
+ </filterset>
+ </copy>
+
+As you see in the pu_jndi_name property, we are using the standard Java EE
+mechanism to load the persistence unit when deploying to GlassFish. To support
+that, a persistence unit resource reference had to be added to
+resources/WEB-INF/web.xml.
+
+ <persistence-unit-ref>
+ <persistence-unit-ref-name>open18/emf</persistence-unit-ref-name>
+ <persistence-unit-name>open18</persistence-unit-name>
+ </persistence-unit-ref>
+
+The presence of this resource reference does not affect JBoss AS.
+
+== Deployment ==
+
+Deployment followed by hot deploy are two different targets under GlassFish,
+whereas there is only a single target for JBoss AS. First, you need to deploy
+the exploded archive:
+
+ ant gf-explode
+
+Any change you make to a static web resource or Facelets template is picked up
+automatically, there is no need to explode again like with JBoss AS. You do
+need to run a target to hot deploy Java components:
+
+ ant gf-hotdeploy
+
+When you are all done for the day, you can undeploy. In GlassFish, undeploy is
+the same regardless of whether you are running an exploded or packaged archive:
+
+ ant gf-undeploy
+
+That's all folks! Happy coding.
+
+== Command Reference ==
+
+gf-start - Starts GlassFish
+gf-stop - Stops GlassFish
+gf-restart - Restarts GlassFish
+gf-datasource - Registers the datasource and connection pool for the active environment
+gf-explode - Deploys the exploded archive to GlassFish (initial)
+gf-hotdeploy - Hot deploys Java classes and components
+gf-deploy - Deploys the packaged archive to GlassFish
+gf-undeploy - Undeploys the exploded or packaged archive from GlassFish
+gf-prepare - Prepares GlassFish for a seam-gen project deployment (calls gf-deploy-hibernate)
+gf-deploy-hibernate - Deploys Hibernate as a JPA provider to GlassFish
View
121 open18_seam2/etc/glassfish-deployment/glassfish.build.xml
@@ -0,0 +1,121 @@
+<?xml version="1.0"?>
+<project basedir=".">
+ <!-- This file consists of deployment targets for the GlassFish Application Server -->
+ <!-- Import it into your build using <import file="${basedir}/glassfish.build.xml"/> -->
+
+ <macrodef name="asadmin">
+ <attribute name="cmd"/>
+ <attribute name="args" default=""/>
+ <attribute name="log" default="true"/>
+ <element name="pre-conditions" optional="true"/>
+ <sequential>
+ <fail unless="glassfish.home">glassfish.home not set</fail>
+ <pre-conditions/>
+ <exec executable="${glassfish.home}/bin/asadmin">
+ <arg value="@{cmd}"/>
+ <arg line="@{args}"/>
+ <redirector outputproperty="gf.cmd.output" alwayslog="@{log}"/>
+ </exec>
+ </sequential>
+ </macrodef>
+
+ <target name="gf-init" description="Prepare properties for GlassFish">
+ <property name="transaction_manager_lookup_class" value="org.hibernate.transaction.SunONETransactionManagerLookup"/>
+ <property name="seam_bootstrap_pu" value="false"/>
+ <property name="seam_emf" value="#{null}"/>
+ <property name="pu_jndi_name" value="java:comp/env/${project.name}/emf"/>
+ </target>
+
+ <target name="gf-start" description="Starts GlassFish">
+ <asadmin cmd="start-domain" args="${glassfish.domain}">
+ <pre-conditions>
+ <fail unless="glassfish.domain">glassfish.domain not set</fail>
+ </pre-conditions>
+ </asadmin>
+ </target>
+
+ <target name="gf-stop" description="Stops GlassFish">
+ <asadmin cmd="stop-domain" args="${glassfish.domain}">
+ <pre-conditions>
+ <fail unless="glassfish.domain">glassfish.domain not set</fail>
+ </pre-conditions>
+ </asadmin>
+ </target>
+
+ <target name="gf-restart" depends="gf-stop,gf-start" description="Restarts GlassFish"/>
+
+ <target name="gf-check-datasource" description="Check if the datasource is registered with GlassFish">
+ <asadmin cmd="list-jdbc-resources" log="false"/>
+ <condition property="gf.needs.datasource">
+ <not><contains string="${gf.cmd.output}" substring="${project.name}Datasource"/></not>
+ </condition>
+ </target>
+
+ <target name="gf-datasource" depends="gf-check-datasource" if="gf.needs.datasource"
+ description="Register the datasource in GlassFish">
+ <asadmin cmd="add-resources" args="${basedir}/resources/glassfish-resources-${profile}.xml"/>
+ </target>
+
+ <target name="gf-logging" description="Move the log4j configuration for GlassFish into place">
+ <copy tofile="${war.dir}/WEB-INF/classes/log4j.xml" file="${basedir}/resources/glassfish-log4j.xml"/>
+ </target>
+
+ <target name="gf-explode" depends="gf-init,war,gf-logging,gf-datasource"
+ description="Deploy the exploded archive to GlassFish">
+ <asadmin cmd="deploydir" args="--name ${project.name} --contextroot ${project.name} ${war.dir}"/>
+ </target>
+
+ <target name="gf-hotdeploy" depends="gf-init,war"/>
+
+ <target name="gf-deploy" depends="gf-init,archive,gf-logging,gf-datasource"
+ description="Deploy the packaged archive to GlassFish">
+ <asadmin cmd="deploy" args="--name ${project.name} --contextroot ${project.name} ${dist.dir}/${project.name}.war"/>
+ </target>
+
+ <target name="gf-unexplode" depends="gf-undeploy"/>
+
+ <target name="gf-undeploy" description="Undeploy the archive from GlassFish">
+ <asadmin cmd="undeploy" args="${project.name}"/>
+ <asadmin cmd="delete-jdbc-resource" args="${project.name}Datasource"/>
+ <asadmin cmd="delete-jdbc-connection-pool" args="${project.name}Pool"/>
+ <!-- Enable the following two commands if you are using jBPM -->
+ <!--
+ <asadmin cmd="delete-jdbc-resource" args="${project.name}JbpmDatasource"/>
+ <asadmin cmd="delete-jdbc-connection-pool" args="${project.name}JbpmPool"/>
+ -->
+ </target>
+
+ <target name="gf-prepare" depends="gf-deploy-hibernate"
+ description="Prepares GlassFish to run a Seam application"/>
+
+ <target name="gf-deploy-hibernate" description="Deploys Hibernate to be a JPA provider on GlassFish">
+ <fail unless="glassfish.home">glassfish.home not set</fail>
+ <fail unless="glassfish.domain">glassfish.domain not set</fail>
+ <copy todir="${glassfish.home}/domains/${glassfish.domain}/lib/ext">
+ <fileset dir="${basedir}/lib">
+ <include name="antlr.jar"/>
+ <include name="asm.jar"/>
+ <include name="asm-attrs.jar"/>
+ <include name="cglib.jar"/>
+ <include name="commons-collections.jar"/>
+ <include name="commons-logging.jar"/>
+ <include name="concurrent.jar"/>
+ <include name="dom4j.jar"/>
+ <include name="hibernate.jar"/>
+ <include name="hibernate-*.jar"/>
+ <exclude name="hibernate-search.jar"/>
+ <include name="javassist.jar"/>
+ <include name="jboss-common-core.jar"/>
+ <include name="jta.jar"/>
+ <!--
+ log4j is needed for if you have custom logging configuration.
+ PU is loaded by GlassFish and that calls logging -->
+ <include name="log4j.jar"/>
+ <include name="persistence-api.jar"/>
+ <!-- Provide the JDBC driver for your database -->
+ <include name="h2.jar"/>
+ </fileset>
+ </copy>
+ </target>
+
+</project>
View
BIN  open18_seam2/etc/golfer-avatars/bogey-small.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  open18_seam2/etc/golfer-avatars/bogey.png
Diff not rendered
View
BIN  open18_seam2/etc/golfer-avatars/drop.png
Diff not rendered
View
BIN  open18_seam2/etc/golfer-avatars/eaglegirl-small.png
Diff not rendered
View
BIN  open18_seam2/etc/golfer-avatars/eaglegirl.png
Diff not rendered
View
BIN  open18_seam2/etc/golfer-avatars/golfer-large.png
Diff not rendered
View
BIN  open18_seam2/etc/golfer-avatars/golfer-silhouette-large.png
Diff not rendered
View
BIN  open18_seam2/etc/golfer-avatars/golfer-silhouette-medium.png
Diff not rendered
View
BIN  open18_seam2/etc/golfer-avatars/golfer-silhouette-small.png
Diff not rendered
View
BIN  open18_seam2/etc/golfer-avatars/golfer-small.png
Diff not rendered
View
BIN  open18_seam2/etc/golfer-avatars/golfer.png
Diff not rendered
View
BIN  open18_seam2/etc/golfer-avatars/hackit-small.png
Diff not rendered
View
BIN  open18_seam2/etc/golfer-avatars/hazard-small.png
Diff not rendered
View
BIN  open18_seam2/etc/golfer-avatars/hazard.png
Diff not rendered
View
BIN  open18_seam2/etc/golfer-avatars/mulligan-small.png
Diff not rendered
View
BIN  open18_seam2/etc/golfer-avatars/mulligan.png
Diff not rendered
View
BIN  open18_seam2/etc/golfer-avatars/tux-small.png
Diff not rendered
View
BIN  open18_seam2/etc/golfer-avatars/tux.png
Diff not rendered
View
BIN  open18_seam2/etc/golfer-avatars/twoputt-small.png
Diff not rendered
View
BIN  open18_seam2/etc/golfer-avatars/twoputt.png
Diff not rendered
View
64 open18_seam2/etc/ivy-configuration/ivy.build.xml
@@ -0,0 +1,64 @@
+<?xml version="1.0"?>
+<project basedir="." xmlns:ivy="antlib:org.apache.ivy.ant" name="myproject-ivy">
+ <!-- At this point we cannot upgrade to 2.0.0-rc1 because of a bug regarding when the variables are loaded -->
+ <property name="ivy.install.version" value="2.0.0-beta2"/>
+ <property name="ivy.jar.dir" value="${basedir}/build-lib"/>
+ <property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar"/>
+ <property name="ivy.sync" value="false"/>
+ <property name="ivy.use.symlinks" value="false"/>
+ <property name="central.repo" value="http://repo1.maven.org/maven2"/>
+ <property name="jboss.repo" value="http://repository.jboss.org/maven2"/>
+
+ <!-- centralize some key artifact versions -->
+ <property name="seam.version" value="2.0.3.CR1"/>
+ <property name="jsf.version" value="1.2_04-p02"/>
+ <property name="richfaces.version" value="3.2.2.GA"/>
+ <property name="jboss-embedded.version" value="beta3"/>
+
+ <target name="init-ivy">
+ <available property="ivy.installed" value="true" file="${ivy.jar.file}" type="file"/>
+ </target>
+
+ <target name="load-ivy" depends="init-ivy,download-ivy">
+ <path id="ivy.lib.path">
+ <fileset dir="${ivy.jar.dir}" includes="*.jar"/>
+ </path>
+ <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
+ <ivy:settings file="${basedir}/ivy.settings.xml"/>
+ </target>
+
+ <target name="download-ivy" depends="init-ivy" unless="ivy.installed">
+ <mkdir dir="${ivy.jar.dir}"/>
+ <echo message="Installing ivy..."/>
+ <get src="${central.repo}/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar"
+ dest="${ivy.jar.file}"/>
+ </target>
+
+ <target name="inflate-core" depends="load-ivy">
+ <ivy:retrieve pattern="${lib.dir}/[artifact].[ext]" type="jar" sync="${ivy.sync}" symlink="${ivy.use.symlinks}"/>
+ <move file="${lib.dir}/mvel.jar" tofile="${lib.dir}/mvel14.jar" failonerror="false"/>
+ </target>
+
+ <target name="inflate-source" depends="load-ivy">
+ <ivy:retrieve pattern="${lib.dir}/src/[artifact]-[type]s.[ext]" type="source" sync="${ivy.sync}" symlink="${ivy.use.symlinks}"/>
+ </target>
+
+ <target name="inflate-test" depends="load-ivy">
+ <ivy:retrieve pattern="${lib.dir}/test/[artifact].[ext]" type="test-jar" sync="${ivy.sync}" symlink="${ivy.use.symlinks}"/>
+ </target>
+
+ <target name="inflate" depends="inflate-core,inflate-source,inflate-test"/>
+
+ <target name="clean-ivy" depends="load-ivy">
+ <delete includeemptydirs="true" failonerror="false">
+ <fileset dir="${lib.dir}">
+ <include name="**/*"/>
+ </fileset>
+ </delete>
+ <ivy:cleancache/>
+ </target>
+
+ <target name="dependency-report" depends="inflate">
+ <ivy:report todir="${dist.dir}/dependency-report"/>
+ </target>
+</project>
View
21 open18_seam2/etc/ivy-configuration/ivy.settings.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ivysettings>
+ <settings defaultResolver="default"/>
+ <caches artifactPattern="[organisation]/[module]/[type]s/[artifact]-[revision](-[classifier]).[ext]" checkUpToDate="true"/>
+ <resolvers>
+ <filesystem name="local">
+ <ivy pattern="${ivy.cache.dir}/[module]/ivy-[revision].xml"/>
+ <artifact pattern="${ivy.cache.dir}/[module]/[artifact]-[revision](-[classifier]).[ext]"/>
+ </filesystem>
+ <ibiblio name="central" m2compatible="true" usepoms="false" root="${central.repo}" pattern="[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"/>
+ <ibiblio name="jboss" m2compatible="true" usepoms="false" root="${jboss.repo}" pattern="[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]"/>
+ <chain name="default" returnFirst="true">
+ <resolver ref="local"/>
+ <!-- central has to come before jboss because jboss is missing
+ sources for some artifacts and ivy will only get the sources from
+ the same place it got the jar file (doh!) -->
+ <resolver ref="central"/>
+ <resolver ref="jboss"/>
+ </chain>
+ </resolvers>
+</ivysettings>
View
127 open18_seam2/etc/ivy-configuration/ivy.xml
@@ -0,0 +1,127 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ivy-module version="1.0" xmlns:m="http://ant.apache.org/ivy/maven">
+ <info organisation="org.open18" module="open18"/>
+ <configurations>
+ <conf name="default" transitive="false"/>
+ </configurations>
+ <dependencies defaultconf="default">
+ <dependency org="com.h2database" name="h2" rev="1.0.72">
+ <artifact name="h2" type="jar"/>
+ </dependency>
+ <dependency org="com.sun.facelets" name="jsf-facelets" rev="1.1.15.B1">
+ <artifact name="jsf-facelets" type="jar"/>
+ <artifact name="jsf-facelets" type="source" ext="jar" m:classifier="sources"/>
+ </dependency>
+ <dependency org="commons-beanutils" name="commons-beanutils" rev="1.7.0">
+ <artifact name="commons-beanutils" type="jar"/>
+ <artifact name="commons-beanutils" type="source" ext="jar" m:classifier="sources"/>
+ </dependency>
+ <dependency org="commons-digester" name="commons-digester" rev="1.7">
+ <artifact name="commons-digester" type="jar"/>
+ <artifact name="commons-digester" type="source" ext="jar" m:classifier="sources"/>
+ </dependency>
+ <dependency org="janino" name="janino" rev="2.5.10">
+ <artifact name="janino" type="jar"/>
+ </dependency>
+ <dependency org="javax.el" name="el-api" rev="1.0">
+ <artifact name="el-api" type="jar"/>
+ </dependency>
+ <dependency org="javax.faces" name="jsf-api" rev="${jsf.version}">
+ <artifact name="jsf-api" type="jar"/>
+ <artifact name="jsf-api" type="source" ext="jar" m:classifier="sources"/>
+ </dependency>
+ <dependency org="javax.faces" name="jsf-impl" rev="${jsf.version}">
+ <artifact name="jsf-impl" type="jar"/>
+ <artifact name="jsf-impl" type="source" ext="jar" m:classifier="sources"/>
+ </dependency>
+ <dependency org="javax.persistence" name="persistence-api" rev="1.0">
+ <artifact name="persistence-api" type="jar"/>
+ </dependency>
+ <dependency org="javax.servlet" name="servlet-api" rev="2.5">
+ <artifact name="servlet-api" type="jar"/>
+ </dependency>
+ <dependency org="javax.transaction" name="jta" rev="1.0.1B">
+ <artifact name="jta" type="jar"/>
+ </dependency>
+ <dependency org="org.antlr" name="antlr-runtime" rev="3.0">
+ <artifact name="antlr-runtime" type="jar"/>
+ </dependency>
+ <dependency org="org.drools" name="drools-compiler" rev="4.0.7">
+ <artifact name="drools-compiler" type="jar"/>
+ </dependency>
+ <dependency org="org.drools" name="drools-core" rev="4.0.7">
+ <artifact name="drools-core" type="jar"/>
+ </dependency>
+ <dependency org="org.eclipse.jdt" name="core" rev="3.2.3.v_686_R32x">
+ <artifact name="core" type="jar"/>
+ </dependency>
+ <dependency org="org.codehaus.groovy" name="groovy-all" rev="1.5.4">
+ <artifact name="groovy-all" type="jar"/>
+ </dependency>
+ <dependency org="org.hibernate" name="hibernate-validator" rev="3.0.0.GA">
+ <artifact name="hibernate-validator" type="jar"/>
+ </dependency>
+ <dependency org="org.jboss.el" name="jboss-el" rev="1.0_02.CR2">
+ <artifact name="jboss-el" type="jar"/>
+ </dependency>
+ <dependency org="org.jboss.seam" name="jboss-seam" rev="${seam.version}">
+ <artifact name="jboss-seam" type="jar"/>
+ <artifact name="jboss-seam" type="source" ext="jar" m:classifier="sources"/>
+ </dependency>
+ <dependency org="org.jboss.seam" name="jboss-seam-debug" rev="${seam.version}">
+ <artifact name="jboss-seam-debug" type="jar"/>
+ <artifact name="jboss-seam-debug" type="source" ext="jar" m:classifier="sources"/>
+ </dependency>
+ <dependency org="org.jboss.seam" name="jboss-seam-ioc" rev="${seam.version}">
+ <artifact name="jboss-seam-ioc" type="jar"/>
+ <artifact name="jboss-seam-ioc" type="source" ext="jar" m:classifier="sources"/>
+ </dependency>
+ <dependency org="org.jboss.seam" name="jboss-seam-mail" rev="${seam.version}">
+ <artifact name="jboss-seam-mail" type="jar"/>
+ <artifact name="jboss-seam-mail" type="source" ext="jar" m:classifier="sources"/>
+ </dependency>
+ <dependency org="org.jboss.seam" name="jboss-seam-pdf" rev="${seam.version}">
+ <artifact name="jboss-seam-pdf" type="jar"/>
+ <artifact name="jboss-seam-pdf" type="source" ext="jar" m:classifier="sources"/>
+ </dependency>
+ <dependency org="org.jboss.seam" name="jboss-seam-remoting" rev="${seam.version}">
+ <artifact name="jboss-seam-remoting" type="jar"/>
+ <artifact name="jboss-seam-remoting" type="source" ext="jar" m:classifier="sources"/>
+ </dependency>
+ <dependency org="org.jboss.seam" name="jboss-seam-ui" rev="${seam.version}">
+ <artifact name="jboss-seam-ui" type="jar"/>
+ <artifact name="jboss-seam-ui" type="source" ext="jar" m:classifier="sources"/>
+ </dependency>
+ <dependency org="org.jbpm" name="jbpm-jpdl" rev="3.2.2">
+ <artifact name="jbpm-jpdl" type="jar"/>
+ </dependency>
+ <dependency org="org.mvel" name="mvel" rev="1.3.1-java1.4">
+ <artifact name="mvel" type="jar"/>
+ </dependency>
+ <dependency org="org.richfaces.framework" name="richfaces-api" rev="${richfaces.version}">
+ <artifact name="richfaces-api" type="jar"/>
+ <artifact name="richfaces-api" type="source" ext="jar" m:classifier="sources"/>
+ </dependency>
+ <dependency org="org.richfaces.framework" name="richfaces-impl" rev="${richfaces.version}">
+ <artifact name="richfaces-impl" type="jar"/>
+ <artifact name="richfaces-impl" type="source" ext="jar" m:classifier="sources"/>
+ </dependency>
+ <dependency org="org.richfaces.ui" name="richfaces-ui" rev="${richfaces.version}">
+ <artifact name="richfaces-ui" type="jar"/>
+ <artifact name="richfaces-ui" type="source" ext="jar" m:classifier="sources"/>
+ </dependency>
+ <dependency org="org.testng" name="testng" rev="5.6">
+ <artifact name="testng" type="jar"/>
+ </dependency>
+ <!-- I tried to use conf="test" but I simply didn't understand how it worked -->
+ <dependency org="org.jboss.seam.embedded" name="hibernate-all" rev="${jboss-embedded.version}">
+ <artifact name="hibernate-all" type="test-jar" ext="jar"/>
+ </dependency>
+ <dependency org="org.jboss.seam.embedded" name="thirdparty-all" rev="${jboss-embedded.version}">
+ <artifact name="thirdparty-all" type="test-jar" ext="jar"/>
+ </dependency>
+ <dependency org="org.jboss.seam.embedded" name="jboss-embedded-all" rev="${jboss-embedded.version}">
+ <artifact name="jboss-embedded-all" type="test-jar" ext="jar"/>
+ </dependency>
+ </dependencies>
+</ivy-module>
View
61 open18_seam2/etc/jboss-as-conf/jboss-log4j.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+ <!-- A time/date based rolling appender -->
+ <appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender">
+ <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <param name="File" value="${jboss.server.log.dir}/server.log"/>
+ <param name="Append" value="false"/>
+
+ <!-- Rollover at midnight each day -->
+ <param name="DatePattern" value="'.'yyyy-MM-dd"/>
+
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d{HH:mm:ss} %p [%c{6}] %m%n"/>
+ <!--
+ <param name="ConversionPattern" value="%d{HH:mm:ss} [%p] %c#%M@%L => %m%n"/>
+ -->
+ </layout>
+ </appender>
+
+ <!-- Console appender -->
+ <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+ <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
+ <param name="Target" value="System.out"/>
+ <!--
+ <param name="Threshold" value="INFO"/>
+ -->
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d{HH:mm:ss} %p [%c{6}] %m%n"/>
+ <!--
+ <param name="ConversionPattern" value="%d{HH:mm:ss} [%p] %c#%M@%L => %m%n"/>
+ -->
+ </layout>
+ </appender>
+
+ <!-- digester is way too whiny -->
+ <category name="org.apache.commons.digester.Digester">
+ <priority value="WARN" />
+ </category>
+
+ <!-- log SQL queries -->
+ <!--
+ <category name="org.hibernate.SQL">
+ <priority value="DEBUG" />
+ </category>
+ -->
+
+ <category name="org.open18">
+ <priority value="DEBUG" />
+ </category>
+
+ <root>
+ <priority value="INFO"/>
+ <appender-ref ref="CONSOLE"/>
+ <!--
+ <appender-ref ref="FILE"/>
+ -->
+ </root>
+
+</log4j:configuration>
View
54 open18_seam2/etc/jboss-as-conf/run.conf
@@ -0,0 +1,54 @@
+## -*- shell-script -*- ######################################################
+## ##
+## JBoss Bootstrap Script Configuration ##
+## ##
+##############################################################################
+
+### $Id: run.conf 62747 2007-05-02 17:43:36Z dimitris@jboss.org $
+
+JBOSS_HOME=$DIRNAME/..
+
+#
+# This file is optional; it may be removed if not needed.
+#
+
+#
+# Specify the maximum file descriptor limit, use "max" or "maximum" to use
+# the default, as queried by the system.
+#
+# Defaults to "maximum"
+#
+#MAX_FD="maximum"
+
+#
+# Specify the profiler configuration file to load.
+#
+# Default is to not load profiler configuration file.
+#
+#PROFILER=""
+
+#
+# Specify the location of the Java home directory. If set then $JAVA will
+# be defined to $JAVA_HOME/bin/java, else $JAVA will be "java".
+#
+#JAVA_HOME="/opt/java/jdk"
+
+#
+# Specify the exact Java VM executable to use.
+#
+#JAVA=""
+
+#
+# Specify options to pass to the Java VM.
+#
+if [ "x$JAVA_OPTS" = "x" ]; then
+ JAVA_OPTS="-Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"
+ # Extra options to avoid permgen errors
+ JAVA_OPTS="$JAVA_OPTS -XX:+UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=512m -Xverify:none"
+fi
+
+# Sample JPDA settings for remote socket debuging
+#JAVA_OPTS="$JAVA_OPTS -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"
+
+# Sample JPDA settings for shared memory debugging
+#JAVA_OPTS="$JAVA_OPTS -Xrunjdwp:transport=dt_shmem,server=y,suspend=n,address=jboss"
View
19 open18_seam2/etc/jboss-as-conf/run.sh.patch
@@ -0,0 +1,19 @@
+--- bin/run.sh 2008-06-18 15:44:08.973044015 -0400
++++ bin/run.sh.bindall 2008-06-18 15:44:06.972930035 -0400
+@@ -211,14 +211,14 @@
+ "$JAVA" $JAVA_OPTS \
+ -Djava.endorsed.dirs="$JBOSS_ENDORSED_DIRS" \
+ -classpath "$JBOSS_CLASSPATH" \
+- org.jboss.Main "$@"
++ org.jboss.Main -b 0.0.0.0 "$@"
+ JBOSS_STATUS=$?
+ else
+ # Execute the JVM in the background
+ "$JAVA" $JAVA_OPTS \
+ -Djava.endorsed.dirs="$JBOSS_ENDORSED_DIRS" \
+ -classpath "$JBOSS_CLASSPATH" \
+- org.jboss.Main "$@" &
++ org.jboss.Main -b 0.0.0.0 "$@" &
+ JBOSS_PID=$!
+ # Trap common signals and relay them to the jboss process
+ trap "kill -HUP $JBOSS_PID" HUP
View
BIN  open18_seam2/etc/mime-icons/pdf-icon.png
Diff not rendered
View
BIN  open18_seam2/etc/mime-icons/rtf-icon.png
Diff not rendered
View
BIN  open18_seam2/etc/open18-logo.png
Diff not rendered
View
135 open18_seam2/etc/reveng/open18-seam-gen.reveng.xml
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE hibernate-reverse-engineering SYSTEM
+ "http://hibernate.sourceforge.net/hibernate-reverse-engineering-3.0.dtd">
+<hibernate-reverse-engineering>
+
+ <table name="COURSE">
+ <meta attribute="class-code">
+@javax.persistence.Transient
+public int getMensParOut() {
+ int par = 0;
+ for (Hole hole : holes) {
+ if (hole.getNumber() &lt;= 9) {
+ par += hole.getMensPar();
+ }
+ }
+ return par;
+}
+
+@javax.persistence.Transient
+public int getMensParIn() {
+ int par = 0;
+ for (Hole hole : holes) {
+ if (hole.getNumber() > 9) {
+ par += hole.getMensPar();
+ }
+ }
+ return par;
+}
+
+@javax.persistence.Transient
+public int getTotalMensPar() {
+ return getMensParOut() + getMensParIn();
+}
+
+@javax.persistence.Transient
+public int getLadiesParOut() {
+ int par = 0;
+ for (Hole hole : holes) {
+ if (hole.getNumber() &lt;= 9) {
+ par += hole.getLadiesPar();
+ }
+ }
+ return par;
+}
+
+@javax.persistence.Transient
+public int getLadiesParIn() {
+ int par = 0;
+ for (Hole hole : holes) {
+ if (hole.getNumber() > 9) {
+ par += hole.getLadiesPar();
+ }
+ }
+ return par;
+}
+
+@javax.persistence.Transient
+public int getTotalLadiesPar() {
+ return getLadiesParOut() + getLadiesParIn();
+}
+
+@javax.persistence.Transient
+public boolean isLadiesParUnique() {
+ for (Hole hole : holes) {
+ if (hole.getMensPar() != hole.getLadiesPar()) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+@javax.persistence.Transient
+public boolean isLadiesHandicapUnique() {
+ for (Hole hole : holes) {
+ if (hole.getLadiesHandicap() != null &amp;&amp;
+ !hole.getLadiesHandicap().equals(hole.getMensHandicap())) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+ </meta>
+ </table>
+
+ <table name="HOLE">
+ <column name="M_PAR" property="mensPar" />
+ <column name="L_PAR" property="ladiesPar" />