\ No newline at end of file
diff --git a/case-studies/loanshark/src/main/webapp/WEB-INF/views/index-template.jspx b/case-studies/loanshark/src/main/webapp/WEB-INF/views/index-template.jspx
new file mode 100644
index 00000000..871bc55c
--- /dev/null
+++ b/case-studies/loanshark/src/main/webapp/WEB-INF/views/index-template.jspx
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/case-studies/loanshark/src/main/webapp/WEB-INF/views/index.jspx b/case-studies/loanshark/src/main/webapp/WEB-INF/views/index.jspx
new file mode 100644
index 00000000..75ce000a
--- /dev/null
+++ b/case-studies/loanshark/src/main/webapp/WEB-INF/views/index.jspx
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/case-studies/loanshark/src/main/webapp/WEB-INF/views/loansharks/create.jspx b/case-studies/loanshark/src/main/webapp/WEB-INF/views/loansharks/create.jspx
new file mode 100644
index 00000000..6b4e04cd
--- /dev/null
+++ b/case-studies/loanshark/src/main/webapp/WEB-INF/views/loansharks/create.jspx
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/case-studies/loanshark/src/main/webapp/WEB-INF/views/loansharks/findLoanSharksByName.jspx b/case-studies/loanshark/src/main/webapp/WEB-INF/views/loansharks/findLoanSharksByName.jspx
new file mode 100644
index 00000000..acd81fb8
--- /dev/null
+++ b/case-studies/loanshark/src/main/webapp/WEB-INF/views/loansharks/findLoanSharksByName.jspx
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/case-studies/loanshark/src/main/webapp/WEB-INF/views/loansharks/list.jspx b/case-studies/loanshark/src/main/webapp/WEB-INF/views/loansharks/list.jspx
new file mode 100644
index 00000000..c79443ea
--- /dev/null
+++ b/case-studies/loanshark/src/main/webapp/WEB-INF/views/loansharks/list.jspx
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/case-studies/loanshark/src/main/webapp/WEB-INF/views/loansharks/show.jspx b/case-studies/loanshark/src/main/webapp/WEB-INF/views/loansharks/show.jspx
new file mode 100644
index 00000000..cbd4f019
--- /dev/null
+++ b/case-studies/loanshark/src/main/webapp/WEB-INF/views/loansharks/show.jspx
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/case-studies/loanshark/src/main/webapp/WEB-INF/views/loansharks/update.jspx b/case-studies/loanshark/src/main/webapp/WEB-INF/views/loansharks/update.jspx
new file mode 100644
index 00000000..f85da6e8
--- /dev/null
+++ b/case-studies/loanshark/src/main/webapp/WEB-INF/views/loansharks/update.jspx
@@ -0,0 +1,9 @@
+
+
diff --git a/case-studies/loanshark/src/main/webapp/WEB-INF/views/resourceNotFound.jspx b/case-studies/loanshark/src/main/webapp/WEB-INF/views/resourceNotFound.jspx
new file mode 100644
index 00000000..fce7f5b0
--- /dev/null
+++ b/case-studies/loanshark/src/main/webapp/WEB-INF/views/resourceNotFound.jspx
@@ -0,0 +1,28 @@
+
+
+
+
+
${fn:escapeXml(title)}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/case-studies/loanshark/src/main/webapp/WEB-INF/views/uncaughtException.jspx b/case-studies/loanshark/src/main/webapp/WEB-INF/views/uncaughtException.jspx
new file mode 100644
index 00000000..2196d388
--- /dev/null
+++ b/case-studies/loanshark/src/main/webapp/WEB-INF/views/uncaughtException.jspx
@@ -0,0 +1,28 @@
+
+
+
+
+
${fn:escapeXml(title)}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/case-studies/loanshark/src/main/webapp/WEB-INF/views/views.xml b/case-studies/loanshark/src/main/webapp/WEB-INF/views/views.xml
new file mode 100644
index 00000000..d12473f9
--- /dev/null
+++ b/case-studies/loanshark/src/main/webapp/WEB-INF/views/views.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/case-studies/loanshark/src/main/webapp/WEB-INF/web.xml b/case-studies/loanshark/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 00000000..2f7bb833
--- /dev/null
+++ b/case-studies/loanshark/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,98 @@
+
+
+
+
+ loanshark
+
+ Roo generated loanshark application
+
+
+
+
+ defaultHtmlEscape
+ true
+
+
+
+ contextConfigLocation
+ classpath*:META-INF/spring/applicationContext*.xml
+
+
+
+ Spring OpenEntityManagerInViewFilter
+ org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter
+
+
+
+
+
+ CharacterEncodingFilter
+ org.springframework.web.filter.CharacterEncodingFilter
+
+ encoding
+ UTF-8
+
+
+ forceEncoding
+ true
+
+
+
+
+ HttpMethodFilter
+ org.springframework.web.filter.HiddenHttpMethodFilter
+
+
+ Spring OpenEntityManagerInViewFilter
+ /*
+
+
+
+ CharacterEncodingFilter
+ /*
+
+
+
+ HttpMethodFilter
+ /*
+
+
+
+
+ org.springframework.web.context.ContextLoaderListener
+
+
+
+
+ loanshark
+ org.springframework.web.servlet.DispatcherServlet
+
+ contextConfigLocation
+ /WEB-INF/spring/webmvc-config.xml
+
+ 1
+
+
+
+ loanshark
+ /
+
+
+
+ 10
+
+
+
+ /
+
+
+
+ java.lang.Exception
+ /uncaughtException
+
+
+
+ 404
+ /resourceNotFound
+
+
diff --git a/case-studies/loanshark/src/main/webapp/images/add.png b/case-studies/loanshark/src/main/webapp/images/add.png
new file mode 100644
index 00000000..d5bfa071
Binary files /dev/null and b/case-studies/loanshark/src/main/webapp/images/add.png differ
diff --git a/case-studies/loanshark/src/main/webapp/images/banner-graphic.png b/case-studies/loanshark/src/main/webapp/images/banner-graphic.png
new file mode 100644
index 00000000..7d2b78c6
Binary files /dev/null and b/case-studies/loanshark/src/main/webapp/images/banner-graphic.png differ
diff --git a/case-studies/loanshark/src/main/webapp/images/create.png b/case-studies/loanshark/src/main/webapp/images/create.png
new file mode 100644
index 00000000..d5bfa071
Binary files /dev/null and b/case-studies/loanshark/src/main/webapp/images/create.png differ
diff --git a/case-studies/loanshark/src/main/webapp/images/delete.png b/case-studies/loanshark/src/main/webapp/images/delete.png
new file mode 100644
index 00000000..1514d51a
Binary files /dev/null and b/case-studies/loanshark/src/main/webapp/images/delete.png differ
diff --git a/case-studies/loanshark/src/main/webapp/images/en.png b/case-studies/loanshark/src/main/webapp/images/en.png
new file mode 100644
index 00000000..ff701e19
Binary files /dev/null and b/case-studies/loanshark/src/main/webapp/images/en.png differ
diff --git a/case-studies/loanshark/src/main/webapp/images/favicon.ico b/case-studies/loanshark/src/main/webapp/images/favicon.ico
new file mode 100644
index 00000000..c2f2b6cc
Binary files /dev/null and b/case-studies/loanshark/src/main/webapp/images/favicon.ico differ
diff --git a/case-studies/loanshark/src/main/webapp/images/list.png b/case-studies/loanshark/src/main/webapp/images/list.png
new file mode 100644
index 00000000..acc30b85
Binary files /dev/null and b/case-studies/loanshark/src/main/webapp/images/list.png differ
diff --git a/case-studies/loanshark/src/main/webapp/images/resultset_first.png b/case-studies/loanshark/src/main/webapp/images/resultset_first.png
new file mode 100644
index 00000000..b03eaf8b
Binary files /dev/null and b/case-studies/loanshark/src/main/webapp/images/resultset_first.png differ
diff --git a/case-studies/loanshark/src/main/webapp/images/resultset_last.png b/case-studies/loanshark/src/main/webapp/images/resultset_last.png
new file mode 100644
index 00000000..8ec89478
Binary files /dev/null and b/case-studies/loanshark/src/main/webapp/images/resultset_last.png differ
diff --git a/case-studies/loanshark/src/main/webapp/images/resultset_next.png b/case-studies/loanshark/src/main/webapp/images/resultset_next.png
new file mode 100644
index 00000000..e252606d
Binary files /dev/null and b/case-studies/loanshark/src/main/webapp/images/resultset_next.png differ
diff --git a/case-studies/loanshark/src/main/webapp/images/resultset_previous.png b/case-studies/loanshark/src/main/webapp/images/resultset_previous.png
new file mode 100644
index 00000000..18f9cc10
Binary files /dev/null and b/case-studies/loanshark/src/main/webapp/images/resultset_previous.png differ
diff --git a/case-studies/loanshark/src/main/webapp/images/show.png b/case-studies/loanshark/src/main/webapp/images/show.png
new file mode 100644
index 00000000..2f193889
Binary files /dev/null and b/case-studies/loanshark/src/main/webapp/images/show.png differ
diff --git a/case-studies/loanshark/src/main/webapp/images/springsource-logo.png b/case-studies/loanshark/src/main/webapp/images/springsource-logo.png
new file mode 100644
index 00000000..e170f8ab
Binary files /dev/null and b/case-studies/loanshark/src/main/webapp/images/springsource-logo.png differ
diff --git a/case-studies/loanshark/src/main/webapp/images/update.png b/case-studies/loanshark/src/main/webapp/images/update.png
new file mode 100644
index 00000000..046811ed
Binary files /dev/null and b/case-studies/loanshark/src/main/webapp/images/update.png differ
diff --git a/case-studies/loanshark/src/main/webapp/styles/alt.css b/case-studies/loanshark/src/main/webapp/styles/alt.css
new file mode 100644
index 00000000..3c6c81d5
--- /dev/null
+++ b/case-studies/loanshark/src/main/webapp/styles/alt.css
@@ -0,0 +1,362 @@
+/* main elements */
+
+body,div,td {
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 12px;
+ color: #666;
+}
+
+body {
+ background-color: #fff;
+ text-align: center;
+}
+
+#header {
+ margin-bottom: 1em;
+}
+
+#wrapper {
+ width:800px;
+ min-width: 800px;
+ max-width: 800px;
+ margin-right: auto;
+ margin-left: auto;
+
+ /* fix max-width incompatibility in IE6 */
+ width:expression(document.body.clientWidth > 800? "800px": "auto" );
+
+ overflow:hidden;
+ display:block;
+}
+
+/* header and footer elements */
+
+#main {
+ overflow:hidden;
+ display:box;
+}
+
+#menu {
+ background: #eee;
+ position:relative;
+ float:right;
+ left:0px;
+ width:220px;
+ margin-left:15px;
+}
+
+#menu ul{
+ list-style: none;
+ margin: 0;
+ padding: 0;
+}
+
+#menu ul li{
+ padding: 0px;
+}
+
+
+#menu a, #menu h2 {
+ display: block;
+ margin: 0;
+ padding: 2px 6px;
+ color:#FFFFFF;
+}
+
+#menu h2 {
+ color: #fff;
+ background: #648C1D;
+ text-transform: uppercase;
+ font-weight:bold;
+ font-size: 12px;
+}
+
+#menu a {
+ color: #666666;
+ background: #efefef;
+ text-decoration: none;
+ padding: 2px 12px;
+}
+
+#menu a:hover {
+ color: #648C1D;
+ background: #fff;
+}
+
+#footer {
+ background:#fff;
+ border:none;
+ margin-top:15px;
+ border-top:1px solid #999999;
+}
+
+#footer .new {
+ float:left;
+}
+
+#footer a:link {color: #7db223;}
+
+.quicklinks {
+ clear:both;
+ padding-bottom: 15px
+}
+.quicklinks span {
+ float: right;
+}
+
+label {
+ width:100px;
+ float:left;
+ margin-left: 5px;
+ margin-top: 0px;
+}
+
+input {
+ height:20px;
+}
+
+input, textarea, select {
+ border:1px solid #B3B3B3;
+}
+
+input.image {
+ border: none;
+ height: auto;
+}
+
+submit {
+ height:25px;
+}
+
+div {
+ text-align: left;
+}
+
+div .box {
+ display:block;
+ margin-left:105px;
+}
+
+/* menu elements*/
+
+a.menu, a.menu:link, a.menu:visited {display:block; width:150px; height:25px;}
+
+/* text styles */
+
+h1,h2,h3 {
+ font-family: Helvetica, sans-serif;
+ color: #7db223;
+}
+
+h1 {
+ font-size: 20px;
+ line-height: 26px;
+}
+
+h2 {
+ font-size: 18px;
+ line-height: 20px;
+}
+
+h3 {
+ font-size: 15px;
+ line-height: 21px;
+ color:#555;
+}
+
+h4 {
+ font-size: 14px;
+ line-height: 20px;
+}
+
+.errors {
+ color: red;
+ font-weight: bold;
+ display: block;
+ margin-left: 105px;
+}
+
+a {
+ text-decoration: underline;
+ font-size: 12px;
+}
+
+a img {
+ border: 0 none;
+ vertical-align: middle;
+}
+
+tr:nth-child(odd) {
+ background-color: #FFFFFF;
+}
+
+tr:nth-child(even) {
+ background-color: #EFEFEF;
+}
+
+a:link {
+ color: #7db223;
+}
+
+a:hover {
+ color: #456314;
+}
+
+a:active {
+ color: #7db223;
+}
+
+a:visited {
+ color: #7db223;
+}
+
+li {
+ padding-top: 5px;
+ text-align: left;
+}
+
+ul li {
+ margin:0 0 0.25em 0;
+ padding:0;
+}
+/* table elements */
+
+table {
+ background: #EEEEEE;
+ margin: 2px 0 0 0;
+ border: 1px solid #BBBBBB;
+ border-collapse: collapse;
+ width: 100%
+}
+
+table table {
+ margin: -5px 0;
+ border: 0px solid #e0e7d3;
+ width: 100%;
+}
+
+table td,table th {
+ padding: 2px;
+ border: 1px solid #CCCCCC;
+}
+
+table td form {
+ text-align:center;
+ vertical-align: middle;
+ margin: 0px;
+}
+
+table th {
+ font-size: 0.9em;
+ text-align: left;
+ font-weight: bold;
+ color: #FFF;
+ background: #999;
+}
+
+table thead {
+ font-weight: bold;
+ font-style: italic;
+ background-color: #BBBBBB;
+}
+
+table a:link {color: #303030;}
+
+caption {
+ caption-side: top;
+ width: auto;
+ text-align: left;
+ font-size: 12px;
+ color: #848f73;
+ padding-bottom: 4px;
+}
+
+fieldset {
+ background: #e0e7d3;
+ padding: 8px;
+ padding-bottom: 22px;
+ border: none;
+ width: 560px;
+}
+
+fieldset label {
+ width: 70px;
+ float: left;
+ margin-top: 1.7em;
+ margin-left: 20px;
+}
+
+fieldset textfield {
+ margin: 3px;
+ height: 20px;
+ background: #e0e7d3;
+}
+
+fieldset textarea {
+ margin: 3px;
+ height: 165px;
+ background: #e0e7d3;
+}
+
+fieldset input {
+ margin: 3px;
+ height: 20px;
+ background: #e0e7d3;
+}
+
+fieldset table {
+ width: 100%;
+}
+
+fieldset th {
+ padding-left: 25px;
+}
+
+.table-buttons {
+ background-color:#fff;
+ border:none;
+}
+
+.table-buttons td {
+ border:none;
+}
+
+.submit input {
+ border: 1px solid #BBBBBB;
+ color:#777777;
+ padding:2px 7px;
+ font-size:11px;
+ text-transform:uppercase;
+ font-weight:bold;
+ height:24px;
+}
+
+.updated {
+ background:#ecf1e5;
+ font-size:11px;
+ margin-left:2px;
+ border:4px solid #ecf1e5;
+}
+
+.updated td {
+ padding:2px 8px;
+ font-size:11px;
+ color:#888888;
+}
+
+.dijitTextArea{
+ min-height:5.5em !important;
+ max-height:22em !important;
+ overflow-y: auto !important;
+ max-width: 175px;
+}
+
+.RichTextEditable{
+ min-height:18em !important;
+ max-height:18em !important;
+}
+
+.flag {
+ height: 11px;
+ width: 16px;
+}
\ No newline at end of file
diff --git a/case-studies/loanshark/src/main/webapp/styles/standard.css b/case-studies/loanshark/src/main/webapp/styles/standard.css
new file mode 100644
index 00000000..b32928c7
--- /dev/null
+++ b/case-studies/loanshark/src/main/webapp/styles/standard.css
@@ -0,0 +1,366 @@
+/* main elements */
+
+body,div,td {
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 12px;
+ color: #666;
+}
+
+body {
+ background-color: #fff;
+ text-align: center;
+}
+
+#header {
+ margin-bottom: 1em;
+}
+
+#wrapper {
+ width:800px;
+ min-width: 800px;
+ max-width: 800px;
+ margin-right: auto;
+ margin-left: auto;
+
+ /* fix max-width incompatibility in IE6 */
+ width:expression(document.body.clientWidth > 800? "800px": "auto" );
+
+ overflow:hidden;
+ display:block;
+}
+
+/* header and footer elements */
+
+#main {
+ overflow:hidden;
+ display:box;
+}
+
+#menu {
+ background: #eee;
+ position:relative;
+ float:left;
+ left:0px;
+ width:220px;
+ margin-right:15px;
+}
+
+#menu ul{
+ list-style: none;
+ margin: 0;
+ padding: 0;
+}
+
+#menu ul li{
+ padding: 0px;
+}
+
+
+#menu a, #menu h2 {
+ display: block;
+ margin: 0;
+ padding: 2px 6px;
+ color:#FFFFFF;
+}
+
+#menu h2 {
+ color: #fff;
+ background: #648C1D;
+ text-transform: uppercase;
+ font-weight:bold;
+ font-size: 12px;
+}
+
+#menu a {
+ color: #666666;
+ background: #efefef;
+ text-decoration: none;
+ padding: 2px 12px;
+}
+
+#menu a:hover {
+ color: #648C1D;
+ background: #fff;
+}
+
+#footer {
+ background:#fff;
+ border:none;
+ margin-top:15px;
+ border-top:1px solid #999999;
+}
+
+#footer .new {
+ float:left;
+}
+
+#footer a:link {color: #7db223;}
+
+.quicklinks {
+ clear:both;
+ padding-bottom: 15px
+}
+.quicklinks span {
+ float: right;
+}
+
+table.navigation {
+ border: 0px;
+}
+
+label {
+ width:100px;
+ float:left;
+ margin-left: 5px;
+ margin-top: 0px;
+}
+
+input {
+ height:20px;
+}
+
+input, textarea, select {
+ border:1px solid #B3B3B3;
+}
+
+input.image {
+ border: none;
+ height: auto;
+}
+
+submit {
+ height:25px;
+}
+
+div {
+ text-align: left;
+}
+
+div .box {
+ display:block;
+ margin-left:105px;
+}
+
+/* menu elements*/
+
+a.menu, a.menu:link, a.menu:visited {display:block; width:150px; height:25px;}
+
+/* text styles */
+
+h1,h2,h3 {
+ font-family: Helvetica, sans-serif;
+ color: #7db223;
+}
+
+h1 {
+ font-size: 20px;
+ line-height: 26px;
+}
+
+h2 {
+ font-size: 18px;
+ line-height: 20px;
+}
+
+h3 {
+ font-size: 15px;
+ line-height: 21px;
+ color:#555;
+}
+
+h4 {
+ font-size: 14px;
+ line-height: 20px;
+}
+
+.errors {
+ color: red;
+ font-weight: bold;
+ display: block;
+ margin-left: 105px;
+}
+
+a {
+ text-decoration: underline;
+ font-size: 12px;
+}
+
+a img {
+ border: 0 none;
+ vertical-align: middle;
+}
+
+tr:nth-child(odd) {
+ background-color: #FFFFFF;
+}
+
+tr:nth-child(even) {
+ background-color: #EFEFEF;
+}
+
+a:link {
+ color: #7db223;
+}
+
+a:hover {
+ color: #456314;
+}
+
+a:active {
+ color: #7db223;
+}
+
+a:visited {
+ color: #7db223;
+}
+
+li {
+ padding-top: 5px;
+ text-align: left;
+}
+
+ul li {
+ margin:0 0 0.25em 0;
+ padding:0;
+}
+/* table elements */
+
+table {
+ background: #EEEEEE;
+ margin: 2px 0 0 0;
+ border: 1px solid #BBBBBB;
+ border-collapse: collapse;
+ width: 100%
+}
+
+table table {
+ margin: -5px 0;
+ border: 0px solid #e0e7d3;
+ width: 100%;
+}
+
+table td,table th {
+ padding: 2px;
+ border: 1px solid #CCCCCC;
+}
+
+table td form {
+ text-align:center;
+ vertical-align: middle;
+ margin: 0px;
+}
+
+table th {
+ font-size: 0.9em;
+ text-align: left;
+ font-weight: bold;
+ color: #FFF;
+ background: #999;
+}
+
+table thead {
+ font-weight: bold;
+ font-style: italic;
+ background-color: #BBBBBB;
+}
+
+table a:link {color: #303030;}
+
+caption {
+ caption-side: top;
+ width: auto;
+ text-align: left;
+ font-size: 12px;
+ color: #848f73;
+ padding-bottom: 4px;
+}
+
+fieldset {
+ background: #e0e7d3;
+ padding: 8px;
+ padding-bottom: 22px;
+ border: none;
+ width: 560px;
+}
+
+fieldset label {
+ width: 70px;
+ float: left;
+ margin-top: 1.7em;
+ margin-left: 20px;
+}
+
+fieldset textfield {
+ margin: 3px;
+ height: 20px;
+ background: #e0e7d3;
+}
+
+fieldset textarea {
+ margin: 3px;
+ height: 165px;
+ background: #e0e7d3;
+}
+
+fieldset input {
+ margin: 3px;
+ height: 20px;
+ background: #e0e7d3;
+}
+
+fieldset table {
+ width: 100%;
+}
+
+fieldset th {
+ padding-left: 25px;
+}
+
+.table-buttons {
+ background-color:#fff;
+ border:none;
+}
+
+.table-buttons td {
+ border:none;
+}
+
+.submit input {
+ border: 1px solid #BBBBBB;
+ color:#777777;
+ padding:2px 7px;
+ font-size:11px;
+ text-transform:uppercase;
+ font-weight:bold;
+ height:24px;
+}
+
+.updated {
+ background:#ecf1e5;
+ font-size:11px;
+ margin-left:2px;
+ border:4px solid #ecf1e5;
+}
+
+.updated td {
+ padding:2px 8px;
+ font-size:11px;
+ color:#888888;
+}
+
+.dijitTextArea{
+ min-height:5.5em !important;
+ max-height:22em !important;
+ overflow-y: auto !important;
+ max-width: 175px;
+}
+
+.RichTextEditable{
+ min-height:18em !important;
+ max-height:18em !important;
+}
+
+.flag {
+ height: 11px;
+ width: 16px;
+}
\ No newline at end of file
diff --git a/case-studies/loanshark/src/test/java/org/springframework/integration/samples/loanbroker/loanshark/biz/TestAccumulator.java b/case-studies/loanshark/src/test/java/org/springframework/integration/samples/loanbroker/loanshark/biz/TestAccumulator.java
new file mode 100644
index 00000000..bf2c19b5
--- /dev/null
+++ b/case-studies/loanshark/src/test/java/org/springframework/integration/samples/loanbroker/loanshark/biz/TestAccumulator.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2002-2010 the original author or authors.
+ *
+ * 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.
+ */
+package org.springframework.integration.samples.loanbroker.loanshark.biz;
+
+
+import static junit.framework.Assert.assertEquals;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.integration.samples.loanbroker.loanshark.biz.Accumulator;
+import org.springframework.integration.samples.loanbroker.loanshark.biz.SharkQuote;
+import org.springframework.integration.samples.loanbroker.loanshark.domain.LoanShark;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+import org.springframework.transaction.annotation.Transactional;
+
+
+
+/**
+ * @author Gary Russell
+ *
+ */
+@ContextConfiguration(locations="classpath:META-INF/spring/applicationContext.xml")
+@RunWith(SpringJUnit4ClassRunner.class)
+public class TestAccumulator {
+
+ @Autowired
+ Accumulator accumulator;
+
+ @Test
+ @Transactional
+ public void test() {
+ accumulator.accumulate(new SharkQuote("fred", 6.0d));
+ accumulator.accumulate(new SharkQuote("fred", 6.2d));
+ LoanShark shark = (LoanShark) LoanShark.findLoanSharksByName("fred").getSingleResult();
+ assertEquals(new Long(2), shark.getCounter());
+ assertEquals(new Double(6.1), shark.getAverageRate());
+ }
+}
diff --git a/case-studies/loanshark/src/test/resources/log4j.properties b/case-studies/loanshark/src/test/resources/log4j.properties
new file mode 100644
index 00000000..becbf46c
--- /dev/null
+++ b/case-studies/loanshark/src/test/resources/log4j.properties
@@ -0,0 +1,12 @@
+#Updated at Tue Mar 23 17:20:25 PDT 2010
+#Tue Mar 23 17:20:25 PDT 2010
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.rootLogger=DEBUG, stdout, R
+log4j.appender.R.File=application.log
+log4j.appender.R.MaxFileSize=100KB
+log4j.appender.R.layout=org.apache.log4j.PatternLayout
+log4j.appender.R.MaxBackupIndex=1
+log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
+log4j.appender.stdout.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.R=org.apache.log4j.RollingFileAppender
diff --git a/case-studies/loanshark/target/.DS_Store b/case-studies/loanshark/target/.DS_Store
new file mode 100644
index 00000000..5008ddfc
Binary files /dev/null and b/case-studies/loanshark/target/.DS_Store differ
diff --git a/case-studies/loanshark/target/classes/META-INF/aop-ajc.xml b/case-studies/loanshark/target/classes/META-INF/aop-ajc.xml
new file mode 100644
index 00000000..0359a5f0
--- /dev/null
+++ b/case-studies/loanshark/target/classes/META-INF/aop-ajc.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/case-studies/loanshark/target/classes/META-INF/persistence.xml b/case-studies/loanshark/target/classes/META-INF/persistence.xml
new file mode 100644
index 00000000..4eed4a17
--- /dev/null
+++ b/case-studies/loanshark/target/classes/META-INF/persistence.xml
@@ -0,0 +1,12 @@
+
+
+
+ org.hibernate.ejb.HibernatePersistence
+
+
+
+
+
+
+
+
diff --git a/case-studies/loanshark/target/classes/META-INF/spring/applicationContext.xml b/case-studies/loanshark/target/classes/META-INF/spring/applicationContext.xml
new file mode 100644
index 00000000..df3a201d
--- /dev/null
+++ b/case-studies/loanshark/target/classes/META-INF/spring/applicationContext.xml
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/case-studies/loanshark/target/classes/META-INF/spring/database.properties b/case-studies/loanshark/target/classes/META-INF/spring/database.properties
new file mode 100644
index 00000000..7f9adf69
--- /dev/null
+++ b/case-studies/loanshark/target/classes/META-INF/spring/database.properties
@@ -0,0 +1,6 @@
+#Updated at Tue Sep 07 17:11:44 EDT 2010
+#Tue Sep 07 17:11:44 EDT 2010
+database.password=
+database.url=jdbc\:hsqldb\:mem\:loanshark
+database.username=sa
+database.driverClassName=org.hsqldb.jdbcDriver
diff --git a/case-studies/loanshark/target/classes/META-INF/spring/integrationContext.xml b/case-studies/loanshark/target/classes/META-INF/spring/integrationContext.xml
new file mode 100644
index 00000000..e54e0e0a
--- /dev/null
+++ b/case-studies/loanshark/target/classes/META-INF/spring/integrationContext.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/case-studies/loanshark/target/classes/META-INF/spring/log4j.properties b/case-studies/loanshark/target/classes/META-INF/spring/log4j.properties
new file mode 100644
index 00000000..d9877f3f
--- /dev/null
+++ b/case-studies/loanshark/target/classes/META-INF/spring/log4j.properties
@@ -0,0 +1,12 @@
+#Updated at Wed Mar 24 10:09:35 PDT 2010
+#Wed Mar 24 10:09:35 PDT 2010
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.rootLogger=DEBUG, stdout, R
+log4j.appender.R.File=application.log
+log4j.appender.R.MaxFileSize=100KB
+log4j.appender.R.layout=org.apache.log4j.PatternLayout
+log4j.appender.R.MaxBackupIndex=1
+log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
+log4j.appender.stdout.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.R=org.apache.log4j.RollingFileAppender
diff --git a/case-studies/loanshark/target/classes/builddef.lst b/case-studies/loanshark/target/classes/builddef.lst
new file mode 100644
index 00000000..77706e48
--- /dev/null
+++ b/case-studies/loanshark/target/classes/builddef.lst
@@ -0,0 +1,23 @@
+-outxml
+-source
+1.6
+-target
+1.6
+-classpath
+/Users/ozhurakousky/.m2/repository/antlr/antlr/2.7.6/antlr-2.7.6.jar:/Users/ozhurakousky/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar:/Users/ozhurakousky/.m2/repository/cglib/cglib-nodep/2.2/cglib-nodep-2.2.jar:/Users/ozhurakousky/.m2/repository/commons-beanutils/commons-beanutils/1.8.0/commons-beanutils-1.8.0.jar:/Users/ozhurakousky/.m2/repository/commons-collections/commons-collections/3.1/commons-collections-3.1.jar:/Users/ozhurakousky/.m2/repository/commons-dbcp/commons-dbcp/1.3/commons-dbcp-1.3.jar:/Users/ozhurakousky/.m2/repository/commons-digester/commons-digester/2.0/commons-digester-2.0.jar:/Users/ozhurakousky/.m2/repository/commons-fileupload/commons-fileupload/1.2.1/commons-fileupload-1.2.1.jar:/Users/ozhurakousky/.m2/repository/commons-pool/commons-pool/1.5.4/commons-pool-1.5.4.jar:/Users/ozhurakousky/.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar:/Users/ozhurakousky/.m2/repository/javassist/javassist/3.9.0.GA/javassist-3.9.0.GA.jar:/Users/ozhurakousky/.m2/repository/javax/el/el-api/1.0/el-api-1.0.jar:/Users/ozhurakousky/.m2/repository/javax/servlet/jstl/1.2/jstl-1.2.jar:/Users/ozhurakousky/.m2/repository/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar:/Users/ozhurakousky/.m2/repository/javax/transaction/jta/1.1/jta-1.1.jar:/Users/ozhurakousky/.m2/repository/javax/validation/validation-api/1.0.0.GA/validation-api-1.0.0.GA.jar:/Users/ozhurakousky/.m2/repository/joda-time/joda-time/1.6/joda-time-1.6.jar:/Users/ozhurakousky/.m2/repository/junit/junit/4.8.1/junit-4.8.1.jar:/Users/ozhurakousky/.m2/repository/log4j/log4j/1.2.16/log4j-1.2.16.jar:/Users/ozhurakousky/.m2/repository/net/sf/flexjson/flexjson/2.0/flexjson-2.0.jar:/Users/ozhurakousky/.m2/repository/org/apache/tiles/tiles-api/2.2.1/tiles-api-2.2.1.jar:/Users/ozhurakousky/.m2/repository/org/apache/tiles/tiles-core/2.2.1/tiles-core-2.2.1.jar:/Users/ozhurakousky/.m2/repository/org/apache/tiles/tiles-jsp/2.2.1/tiles-jsp-2.2.1.jar:/Users/ozhurakousky/.m2/repository/org/apache/tiles/tiles-servlet/2.2.1/tiles-servlet-2.2.1.jar:/Users/ozhurakousky/.m2/repository/org/apache/tiles/tiles-template/2.2.1/tiles-template-2.2.1.jar:/Users/ozhurakousky/.m2/repository/org/aspectj/aspectjrt/1.6.10.M1/aspectjrt-1.6.10.M1.jar:/Users/ozhurakousky/.m2/repository/org/hibernate/hibernate-annotations/3.5.5-Final/hibernate-annotations-3.5.5-Final.jar:/Users/ozhurakousky/.m2/repository/org/hibernate/hibernate-commons-annotations/3.2.0.Final/hibernate-commons-annotations-3.2.0.Final.jar:/Users/ozhurakousky/.m2/repository/org/hibernate/hibernate-core/3.5.5-Final/hibernate-core-3.5.5-Final.jar:/Users/ozhurakousky/.m2/repository/org/hibernate/hibernate-entitymanager/3.5.5-Final/hibernate-entitymanager-3.5.5-Final.jar:/Users/ozhurakousky/.m2/repository/org/hibernate/hibernate-validator/4.1.0.Final/hibernate-validator-4.1.0.Final.jar:/Users/ozhurakousky/.m2/repository/org/hibernate/javax/persistence/hibernate-jpa-2.0-api/1.0.0.Final/hibernate-jpa-2.0-api-1.0.0.Final.jar:/Users/ozhurakousky/.m2/repository/org/hsqldb/hsqldb/2.0.0/hsqldb-2.0.0.jar:/Users/ozhurakousky/.m2/repository/org/slf4j/jcl-over-slf4j/1.6.1/jcl-over-slf4j-1.6.1.jar:/Users/ozhurakousky/.m2/repository/org/slf4j/slf4j-api/1.6.1/slf4j-api-1.6.1.jar:/Users/ozhurakousky/.m2/repository/org/slf4j/slf4j-log4j12/1.6.1/slf4j-log4j12-1.6.1.jar:/Users/ozhurakousky/.m2/repository/org/springframework/spring-aop/3.0.4.RELEASE/spring-aop-3.0.4.RELEASE.jar:/Users/ozhurakousky/.m2/repository/org/springframework/spring-asm/3.0.4.RELEASE/spring-asm-3.0.4.RELEASE.jar:/Users/ozhurakousky/.m2/repository/org/springframework/spring-aspects/3.0.4.RELEASE/spring-aspects-3.0.4.RELEASE.jar:/Users/ozhurakousky/.m2/repository/org/springframework/spring-beans/3.0.4.RELEASE/spring-beans-3.0.4.RELEASE.jar:/Users/ozhurakousky/.m2/repository/org/springframework/spring-context/3.0.4.RELEASE/spring-context-3.0.4.RELEASE.jar:/Users/ozhurakousky/.m2/repository/org/springframework/spring-context-support/3.0.4.RELEASE/spring-context-support-3.0.4.RELEASE.jar:/Users/ozhurakousky/.m2/repository/org/springframework/spring-core/3.0.4.RELEASE/spring-core-3.0.4.RELEASE.jar:/Users/ozhurakousky/.m2/repository/org/springframework/spring-expression/3.0.4.RELEASE/spring-expression-3.0.4.RELEASE.jar:/Users/ozhurakousky/.m2/repository/org/springframework/spring-jdbc/3.0.4.RELEASE/spring-jdbc-3.0.4.RELEASE.jar:/Users/ozhurakousky/.m2/repository/org/springframework/spring-orm/3.0.4.RELEASE/spring-orm-3.0.4.RELEASE.jar:/Users/ozhurakousky/.m2/repository/org/springframework/spring-test/3.0.4.RELEASE/spring-test-3.0.4.RELEASE.jar:/Users/ozhurakousky/.m2/repository/org/springframework/spring-tx/3.0.4.RELEASE/spring-tx-3.0.4.RELEASE.jar:/Users/ozhurakousky/.m2/repository/org/springframework/spring-web/3.0.4.RELEASE/spring-web-3.0.4.RELEASE.jar:/Users/ozhurakousky/.m2/repository/org/springframework/spring-webmvc/3.0.4.RELEASE/spring-webmvc-3.0.4.RELEASE.jar:/Users/ozhurakousky/.m2/repository/org/springframework/commons/spring-commons-serializer/1.0.0.M1/spring-commons-serializer-1.0.0.M1.jar:/Users/ozhurakousky/.m2/repository/org/springframework/integration/spring-integration-core/2.0.0.M7/spring-integration-core-2.0.0.M7.jar:/Users/ozhurakousky/.m2/repository/org/springframework/integration/spring-integration-ip/2.0.0.M7/spring-integration-ip-2.0.0.M7.jar:/Users/ozhurakousky/.m2/repository/org/springframework/roo/org.springframework.roo.annotations/1.1.0.M3/org.springframework.roo.annotations-1.1.0.M3.jar:/Users/ozhurakousky/.m2/repository/org/springframework/webflow/spring-js/2.1.1.RELEASE/spring-js-2.1.1.RELEASE.jar:/Users/ozhurakousky/.m2/repository/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar:/Users/ozhurakousky/workspace-sts-2.3.3.M2/si/spring-integration/spring-integration-samples/loanshark/target/classes
+-aspectpath
+/Users/ozhurakousky/.m2/repository/org/springframework/spring-aspects/3.0.4.RELEASE/spring-aspects-3.0.4.RELEASE.jar
+-d
+/Users/ozhurakousky/workspace-sts-2.3.3.M2/si/spring-integration/spring-integration-samples/loanshark/target/classes
+/Users/ozhurakousky/workspace-sts-2.3.3.M2/si/spring-integration/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/domain/LoanShark.java
+/Users/ozhurakousky/workspace-sts-2.3.3.M2/si/spring-integration/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/domain/LoanShark_Roo_ToString.aj
+/Users/ozhurakousky/workspace-sts-2.3.3.M2/si/spring-integration/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/domain/LoanShark_Roo_Finder.aj
+/Users/ozhurakousky/workspace-sts-2.3.3.M2/si/spring-integration/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/domain/LoanShark_Roo_Configurable.aj
+/Users/ozhurakousky/workspace-sts-2.3.3.M2/si/spring-integration/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/biz/Accumulator.java
+/Users/ozhurakousky/workspace-sts-2.3.3.M2/si/spring-integration/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/biz/SharkTransformer.java
+/Users/ozhurakousky/workspace-sts-2.3.3.M2/si/spring-integration/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/web/SharkController_Roo_Controller.aj
+/Users/ozhurakousky/workspace-sts-2.3.3.M2/si/spring-integration/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/domain/LoanShark_Roo_JavaBean.aj
+/Users/ozhurakousky/workspace-sts-2.3.3.M2/si/spring-integration/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/biz/SharkQuote.java
+/Users/ozhurakousky/workspace-sts-2.3.3.M2/si/spring-integration/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/web/SharkController.java
+/Users/ozhurakousky/workspace-sts-2.3.3.M2/si/spring-integration/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/domain/LoanShark_Roo_Json.aj
+/Users/ozhurakousky/workspace-sts-2.3.3.M2/si/spring-integration/spring-integration-samples/loanshark/src/main/java/org/springframework/integration/samples/loanbroker/loanshark/domain/LoanShark_Roo_Entity.aj
diff --git a/case-studies/loanshark/target/classes/log4j.properties b/case-studies/loanshark/target/classes/log4j.properties
new file mode 100644
index 00000000..dcbdb027
--- /dev/null
+++ b/case-studies/loanshark/target/classes/log4j.properties
@@ -0,0 +1,12 @@
+#Updated at Tue Sep 07 17:11:52 EDT 2010
+#Tue Sep 07 17:11:52 EDT 2010
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.rootLogger=DEBUG, stdout
+log4j.appender.R.File=application.log
+log4j.appender.R.MaxFileSize=100KB
+log4j.appender.R.layout=org.apache.log4j.PatternLayout
+log4j.appender.R.MaxBackupIndex=1
+log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
+log4j.appender.stdout.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.R=org.apache.log4j.RollingFileAppender
diff --git a/case-studies/loanshark/target/classes/org/springframework/integration/samples/loanbroker/loanshark/domain/LoanShark.class b/case-studies/loanshark/target/classes/org/springframework/integration/samples/loanbroker/loanshark/domain/LoanShark.class
new file mode 100644
index 00000000..c840d9a4
Binary files /dev/null and b/case-studies/loanshark/target/classes/org/springframework/integration/samples/loanbroker/loanshark/domain/LoanShark.class differ
diff --git a/case-studies/loanshark/target/test-classes/META-INF/aop-ajc.xml b/case-studies/loanshark/target/test-classes/META-INF/aop-ajc.xml
new file mode 100644
index 00000000..d2d7ed1d
--- /dev/null
+++ b/case-studies/loanshark/target/test-classes/META-INF/aop-ajc.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/case-studies/loanshark/target/test-classes/builddef.lst b/case-studies/loanshark/target/test-classes/builddef.lst
new file mode 100644
index 00000000..ea82befc
--- /dev/null
+++ b/case-studies/loanshark/target/test-classes/builddef.lst
@@ -0,0 +1,12 @@
+-outxml
+-source
+1.6
+-target
+1.6
+-classpath
+/Users/ozhurakousky/.m2/repository/antlr/antlr/2.7.6/antlr-2.7.6.jar:/Users/ozhurakousky/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar:/Users/ozhurakousky/.m2/repository/cglib/cglib-nodep/2.2/cglib-nodep-2.2.jar:/Users/ozhurakousky/.m2/repository/commons-beanutils/commons-beanutils/1.8.0/commons-beanutils-1.8.0.jar:/Users/ozhurakousky/.m2/repository/commons-collections/commons-collections/3.1/commons-collections-3.1.jar:/Users/ozhurakousky/.m2/repository/commons-dbcp/commons-dbcp/1.3/commons-dbcp-1.3.jar:/Users/ozhurakousky/.m2/repository/commons-digester/commons-digester/2.0/commons-digester-2.0.jar:/Users/ozhurakousky/.m2/repository/commons-fileupload/commons-fileupload/1.2.1/commons-fileupload-1.2.1.jar:/Users/ozhurakousky/.m2/repository/commons-pool/commons-pool/1.5.4/commons-pool-1.5.4.jar:/Users/ozhurakousky/.m2/repository/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar:/Users/ozhurakousky/.m2/repository/javassist/javassist/3.9.0.GA/javassist-3.9.0.GA.jar:/Users/ozhurakousky/.m2/repository/javax/el/el-api/1.0/el-api-1.0.jar:/Users/ozhurakousky/.m2/repository/javax/servlet/jstl/1.2/jstl-1.2.jar:/Users/ozhurakousky/.m2/repository/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar:/Users/ozhurakousky/.m2/repository/javax/transaction/jta/1.1/jta-1.1.jar:/Users/ozhurakousky/.m2/repository/javax/validation/validation-api/1.0.0.GA/validation-api-1.0.0.GA.jar:/Users/ozhurakousky/.m2/repository/joda-time/joda-time/1.6/joda-time-1.6.jar:/Users/ozhurakousky/.m2/repository/junit/junit/4.8.1/junit-4.8.1.jar:/Users/ozhurakousky/.m2/repository/log4j/log4j/1.2.16/log4j-1.2.16.jar:/Users/ozhurakousky/.m2/repository/net/sf/flexjson/flexjson/2.0/flexjson-2.0.jar:/Users/ozhurakousky/.m2/repository/org/apache/tiles/tiles-api/2.2.1/tiles-api-2.2.1.jar:/Users/ozhurakousky/.m2/repository/org/apache/tiles/tiles-core/2.2.1/tiles-core-2.2.1.jar:/Users/ozhurakousky/.m2/repository/org/apache/tiles/tiles-jsp/2.2.1/tiles-jsp-2.2.1.jar:/Users/ozhurakousky/.m2/repository/org/apache/tiles/tiles-servlet/2.2.1/tiles-servlet-2.2.1.jar:/Users/ozhurakousky/.m2/repository/org/apache/tiles/tiles-template/2.2.1/tiles-template-2.2.1.jar:/Users/ozhurakousky/.m2/repository/org/aspectj/aspectjrt/1.6.10.M1/aspectjrt-1.6.10.M1.jar:/Users/ozhurakousky/.m2/repository/org/hibernate/hibernate-annotations/3.5.5-Final/hibernate-annotations-3.5.5-Final.jar:/Users/ozhurakousky/.m2/repository/org/hibernate/hibernate-commons-annotations/3.2.0.Final/hibernate-commons-annotations-3.2.0.Final.jar:/Users/ozhurakousky/.m2/repository/org/hibernate/hibernate-core/3.5.5-Final/hibernate-core-3.5.5-Final.jar:/Users/ozhurakousky/.m2/repository/org/hibernate/hibernate-entitymanager/3.5.5-Final/hibernate-entitymanager-3.5.5-Final.jar:/Users/ozhurakousky/.m2/repository/org/hibernate/hibernate-validator/4.1.0.Final/hibernate-validator-4.1.0.Final.jar:/Users/ozhurakousky/.m2/repository/org/hibernate/javax/persistence/hibernate-jpa-2.0-api/1.0.0.Final/hibernate-jpa-2.0-api-1.0.0.Final.jar:/Users/ozhurakousky/.m2/repository/org/hsqldb/hsqldb/2.0.0/hsqldb-2.0.0.jar:/Users/ozhurakousky/.m2/repository/org/slf4j/jcl-over-slf4j/1.6.1/jcl-over-slf4j-1.6.1.jar:/Users/ozhurakousky/.m2/repository/org/slf4j/slf4j-api/1.6.1/slf4j-api-1.6.1.jar:/Users/ozhurakousky/.m2/repository/org/slf4j/slf4j-log4j12/1.6.1/slf4j-log4j12-1.6.1.jar:/Users/ozhurakousky/.m2/repository/org/springframework/spring-aop/3.0.4.RELEASE/spring-aop-3.0.4.RELEASE.jar:/Users/ozhurakousky/.m2/repository/org/springframework/spring-asm/3.0.4.RELEASE/spring-asm-3.0.4.RELEASE.jar:/Users/ozhurakousky/.m2/repository/org/springframework/spring-aspects/3.0.4.RELEASE/spring-aspects-3.0.4.RELEASE.jar:/Users/ozhurakousky/.m2/repository/org/springframework/spring-beans/3.0.4.RELEASE/spring-beans-3.0.4.RELEASE.jar:/Users/ozhurakousky/.m2/repository/org/springframework/spring-context/3.0.4.RELEASE/spring-context-3.0.4.RELEASE.jar:/Users/ozhurakousky/.m2/repository/org/springframework/spring-context-support/3.0.4.RELEASE/spring-context-support-3.0.4.RELEASE.jar:/Users/ozhurakousky/.m2/repository/org/springframework/spring-core/3.0.4.RELEASE/spring-core-3.0.4.RELEASE.jar:/Users/ozhurakousky/.m2/repository/org/springframework/spring-expression/3.0.4.RELEASE/spring-expression-3.0.4.RELEASE.jar:/Users/ozhurakousky/.m2/repository/org/springframework/spring-jdbc/3.0.4.RELEASE/spring-jdbc-3.0.4.RELEASE.jar:/Users/ozhurakousky/.m2/repository/org/springframework/spring-orm/3.0.4.RELEASE/spring-orm-3.0.4.RELEASE.jar:/Users/ozhurakousky/.m2/repository/org/springframework/spring-test/3.0.4.RELEASE/spring-test-3.0.4.RELEASE.jar:/Users/ozhurakousky/.m2/repository/org/springframework/spring-tx/3.0.4.RELEASE/spring-tx-3.0.4.RELEASE.jar:/Users/ozhurakousky/.m2/repository/org/springframework/spring-web/3.0.4.RELEASE/spring-web-3.0.4.RELEASE.jar:/Users/ozhurakousky/.m2/repository/org/springframework/spring-webmvc/3.0.4.RELEASE/spring-webmvc-3.0.4.RELEASE.jar:/Users/ozhurakousky/.m2/repository/org/springframework/commons/spring-commons-serializer/1.0.0.M1/spring-commons-serializer-1.0.0.M1.jar:/Users/ozhurakousky/.m2/repository/org/springframework/integration/spring-integration-core/2.0.0.M7/spring-integration-core-2.0.0.M7.jar:/Users/ozhurakousky/.m2/repository/org/springframework/integration/spring-integration-ip/2.0.0.M7/spring-integration-ip-2.0.0.M7.jar:/Users/ozhurakousky/.m2/repository/org/springframework/integration/spring-integration-stream/2.0.0.M7/spring-integration-stream-2.0.0.M7.jar:/Users/ozhurakousky/.m2/repository/org/springframework/roo/org.springframework.roo.annotations/1.1.0.M3/org.springframework.roo.annotations-1.1.0.M3.jar:/Users/ozhurakousky/.m2/repository/org/springframework/webflow/spring-js/2.1.1.RELEASE/spring-js-2.1.1.RELEASE.jar:/Users/ozhurakousky/.m2/repository/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar:/Users/ozhurakousky/workspace-sts-2.3.3.M2/si/spring-integration/spring-integration-samples/loanshark/target/test-classes:/Users/ozhurakousky/workspace-sts-2.3.3.M2/si/spring-integration/spring-integration-samples/loanshark/target/classes
+-aspectpath
+/Users/ozhurakousky/workspace-sts-2.3.3.M2/si/spring-integration/spring-integration-samples/loanshark/target/classes:/Users/ozhurakousky/.m2/repository/org/springframework/spring-aspects/3.0.4.RELEASE/spring-aspects-3.0.4.RELEASE.jar
+-d
+/Users/ozhurakousky/workspace-sts-2.3.3.M2/si/spring-integration/spring-integration-samples/loanshark/target/test-classes
+/Users/ozhurakousky/workspace-sts-2.3.3.M2/si/spring-integration/spring-integration-samples/loanshark/src/test/java/org/springframework/integration/samples/loanbroker/loanshark/biz/TestAccumulator.java
diff --git a/case-studies/loanshark/target/test-classes/log4j.properties b/case-studies/loanshark/target/test-classes/log4j.properties
new file mode 100644
index 00000000..becbf46c
--- /dev/null
+++ b/case-studies/loanshark/target/test-classes/log4j.properties
@@ -0,0 +1,12 @@
+#Updated at Tue Mar 23 17:20:25 PDT 2010
+#Tue Mar 23 17:20:25 PDT 2010
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.rootLogger=DEBUG, stdout, R
+log4j.appender.R.File=application.log
+log4j.appender.R.MaxFileSize=100KB
+log4j.appender.R.layout=org.apache.log4j.PatternLayout
+log4j.appender.R.MaxBackupIndex=1
+log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
+log4j.appender.stdout.layout.ConversionPattern=%d [%t] %-5p %c - %m%n
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.R=org.apache.log4j.RollingFileAppender
diff --git a/case-studies/loanshark/udps.groovy b/case-studies/loanshark/udps.groovy
new file mode 100644
index 00000000..f9b69716
--- /dev/null
+++ b/case-studies/loanshark/udps.groovy
@@ -0,0 +1,12 @@
+//Groovy Script to catch multicast packets.
+socket = new MulticastSocket(11111)
+mcast = InetAddress.getByName("225.6.7.8")
+socket.joinGroup(mcast)
+buffer = (' ' * 1024) as byte[]
+while(true) {
+ incoming = new DatagramPacket(buffer, buffer.length)
+ socket.receive(incoming)
+ s = new String(incoming.data, 0, incoming.length)
+ println ("** Shark **" + s)
+}
+
diff --git a/case-studies/loanshark/udps.pl b/case-studies/loanshark/udps.pl
new file mode 100755
index 00000000..ed00ed57
--- /dev/null
+++ b/case-studies/loanshark/udps.pl
@@ -0,0 +1,16 @@
+#!/usr/bin/perl -w
+#Perl Script to catch multicast packets.
+use strict;
+use IO::Socket::Multicast;
+
+my $socket = IO::Socket::Multicast->new(LocalPort=>11111, ReuseAddr=>1)
+ or die "Can't start UDP server: $@";
+
+$socket->mcast_add('225.6.7.8');
+
+my ($datagram,$flags);
+while ($socket->recv($datagram,1024,$flags)) {
+ print "**Shark** $datagram\n";
+}
+
+$socket->close();
diff --git a/case-studies/readme.txt b/case-studies/readme.txt
new file mode 100644
index 00000000..e69de29b
diff --git a/cook-books/async-gateway/readme.txt b/cook-books/async-gateway/readme.txt
index a811e1d7..a1ed69f5 100644
--- a/cook-books/async-gateway/readme.txt
+++ b/cook-books/async-gateway/readme.txt
@@ -1,4 +1,10 @@
-However when you invoke a method you expect the method to return. And since gateway's method call represents a contract with the messaging system which states that for each request there will always be a reply you must always guarantee that your message flow is in compliance with such contract. And in a lot of cases you can based on how your flow is structured. But what about the cases where you can't (e.g, message was filtered out and discarded or routed into a unidirectional sub-flow)?
+Gateway provides a convenient way to expose a Proxy over a service-interface thus giving you a POJO-based access
+to a messaging system (based on objects in your own domain, or primitives/Strings, etc).
+However when you invoke a method you expect the method to return. And since gateway's method call represents a
+contract with the messaging system which states that for each request there will always be a reply you must always
+guarantee that your message flow is in compliance with such contract. And in a lot of cases you can based on how your
+flow is structured. But what about the cases where you can't (e.g, message was filtered out and discarded or routed into
+a unidirectional sub-flow)?
With Spring Integration 2.0 we are introducing support for an Asynchronous Gateway which is
a convenient way to initiate flows where you may not know if a reply is expected or how long will it take for it
to arrive.
diff --git a/cook-books/errorhandling/.classpath b/cook-books/errorhandling/.classpath
new file mode 100644
index 00000000..24166ba5
--- /dev/null
+++ b/cook-books/errorhandling/.classpath
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/cook-books/errorhandling/.project b/cook-books/errorhandling/.project
new file mode 100644
index 00000000..d9402a70
--- /dev/null
+++ b/cook-books/errorhandling/.project
@@ -0,0 +1,23 @@
+
+
+ errorhandling
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.maven.ide.eclipse.maven2Builder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+ org.maven.ide.eclipse.maven2Nature
+
+
diff --git a/cook-books/errorhandling/pom.xml b/cook-books/errorhandling/pom.xml
new file mode 100644
index 00000000..889b9c52
--- /dev/null
+++ b/cook-books/errorhandling/pom.xml
@@ -0,0 +1,39 @@
+
+
+ 4.0.0
+
+ org.springframework.integration.samples
+ spring-integration-samples
+ 2.0.0.BUILD-SNAPSHOT
+
+ errorhandling
+ Spring Integration Error Handling Sample
+
+
+ org.springframework.integration
+ spring-integration-core
+
+
+ org.springframework.integration
+ spring-integration-stream
+
+
+
+
+ repository.springframework.maven.release
+ Spring Framework Maven Release Repository
+ http://maven.springframework.org/release
+
+
+ repository.springframework.maven.milestone
+ Spring Framework Maven Milestone Repository
+ http://maven.springframework.org/milestone
+
+
+ repository.springframework.maven.snapshot
+ Spring Framework Maven Snapshot Repository
+ http://maven.springframework.org/snapshot
+
+
+
diff --git a/cook-books/errorhandling/src/main/java/log4j.xml b/cook-books/errorhandling/src/main/java/log4j.xml
new file mode 100644
index 00000000..a01d5446
--- /dev/null
+++ b/cook-books/errorhandling/src/main/java/log4j.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cook-books/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/ErrorUnwrapper.java b/cook-books/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/ErrorUnwrapper.java
new file mode 100644
index 00000000..b2fe72ab
--- /dev/null
+++ b/cook-books/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/ErrorUnwrapper.java
@@ -0,0 +1,35 @@
+/* Copyright 2002-2008 the original author or authors.
+ *
+ * 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.
+ */
+
+package org.springframework.integration.samples.errorhandling;
+
+import org.springframework.integration.Message;
+import org.springframework.integration.MessagingException;
+import org.springframework.integration.annotation.MessageEndpoint;
+import org.springframework.integration.annotation.Transformer;
+import org.springframework.integration.message.ErrorMessage;
+
+/**
+ * @author Iwein Fuld
+ */
+@MessageEndpoint
+public class ErrorUnwrapper {
+
+ @Transformer
+ public Message> transform(ErrorMessage errorMessage) {
+ return ((MessagingException) errorMessage.getPayload()).getFailedMessage();
+ }
+
+}
diff --git a/cook-books/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/Invitation.java b/cook-books/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/Invitation.java
new file mode 100644
index 00000000..e9e3dbf0
--- /dev/null
+++ b/cook-books/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/Invitation.java
@@ -0,0 +1,34 @@
+/* Copyright 2002-2008 the original author or authors.
+ *
+ * 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.
+ */
+
+package org.springframework.integration.samples.errorhandling;
+
+/**
+ * @author Iwein Fuld
+ */
+public class Invitation {
+
+ private final int number;
+
+ public Invitation(int number) {
+ this.number = number;
+ }
+
+ @Override
+ public String toString() {
+ return "Invitation number " + number;
+ }
+
+}
diff --git a/cook-books/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/PartyDemo.java b/cook-books/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/PartyDemo.java
new file mode 100644
index 00000000..7f77fb4e
--- /dev/null
+++ b/cook-books/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/PartyDemo.java
@@ -0,0 +1,46 @@
+/**
+ * Copyright 2002-2010 the original author or authors.
+ *
+ * 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.
+ */
+
+package org.springframework.integration.samples.errorhandling;
+
+import java.io.IOException;
+
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+/**
+ * Demonstrates the handling of Exceptions in an asynchronous messaging
+ * environment. View the 'errorHandlingDemo.xml' configuration file within
+ * this same package. Notice the use of a <header-enricher/> element
+ * within a <chain/> that establishes an 'error-channel' reference
+ * prior to passing the message to a <service-activator/>.
+ *
+ * @author Iwein Fuld
+ */
+public class PartyDemo {
+
+ public static void main(String[] args) {
+ new ClassPathXmlApplicationContext("errorHandlingDemo.xml", PartyDemo.class);
+ System.out.println("### Hit ENTER to stop ###");
+ try {
+ System.in.read();
+ }
+ catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ System.exit(0);
+ }
+
+}
diff --git a/cook-books/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/PartyGuest.java b/cook-books/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/PartyGuest.java
new file mode 100644
index 00000000..54ab6aa0
--- /dev/null
+++ b/cook-books/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/PartyGuest.java
@@ -0,0 +1,34 @@
+/* Copyright 2002-2008 the original author or authors.
+ *
+ * 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.
+ */
+
+package org.springframework.integration.samples.errorhandling;
+
+import org.springframework.integration.annotation.MessageEndpoint;
+
+/**
+ * This guest receives invitations, but returns them to sender with a wrong
+ * address exception message.
+ *
+ * @author Iwein Fuld
+ */
+@MessageEndpoint
+public class PartyGuest {
+
+ public void onInvitation(Invitation invitation) {
+ System.out.println("Guest is throwing exception");
+ throw new RuntimeException("Wrong address");
+ }
+
+}
diff --git a/cook-books/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/PartyHost.java b/cook-books/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/PartyHost.java
new file mode 100644
index 00000000..2d18e8ef
--- /dev/null
+++ b/cook-books/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/PartyHost.java
@@ -0,0 +1,41 @@
+/* Copyright 2002-2008 the original author or authors.
+ *
+ * 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.
+ */
+
+package org.springframework.integration.samples.errorhandling;
+
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.springframework.integration.annotation.MessageEndpoint;
+
+/**
+ * Sends invitations to PartyGuests and likes to be notified of
+ * delivery failures of course.
+ *
+ * @author Iwein Fuld
+ */
+@MessageEndpoint
+public class PartyHost {
+
+ private final AtomicInteger counter = new AtomicInteger(0);
+
+ public Invitation nextInvitation() {
+ return new Invitation(counter.incrementAndGet());
+ }
+
+ public void onInvitationFailed(Invitation inv) {
+ System.out.println("Host received failure notification for: " + inv);
+ }
+
+}
diff --git a/cook-books/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/errorHandlingDemo.xml b/cook-books/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/errorHandlingDemo.xml
new file mode 100644
index 00000000..7485ab44
--- /dev/null
+++ b/cook-books/errorhandling/src/main/java/org/springframework/integration/samples/errorhandling/errorHandlingDemo.xml
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cook-books/errorhandling/target/classes/log4j.xml b/cook-books/errorhandling/target/classes/log4j.xml
new file mode 100644
index 00000000..a01d5446
--- /dev/null
+++ b/cook-books/errorhandling/target/classes/log4j.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cook-books/errorhandling/target/classes/org/springframework/integration/samples/errorhandling/ErrorUnwrapper.class b/cook-books/errorhandling/target/classes/org/springframework/integration/samples/errorhandling/ErrorUnwrapper.class
new file mode 100644
index 00000000..ce16e430
Binary files /dev/null and b/cook-books/errorhandling/target/classes/org/springframework/integration/samples/errorhandling/ErrorUnwrapper.class differ
diff --git a/cook-books/errorhandling/target/classes/org/springframework/integration/samples/errorhandling/Invitation.class b/cook-books/errorhandling/target/classes/org/springframework/integration/samples/errorhandling/Invitation.class
new file mode 100644
index 00000000..2ac32634
Binary files /dev/null and b/cook-books/errorhandling/target/classes/org/springframework/integration/samples/errorhandling/Invitation.class differ
diff --git a/cook-books/errorhandling/target/classes/org/springframework/integration/samples/errorhandling/PartyDemo.class b/cook-books/errorhandling/target/classes/org/springframework/integration/samples/errorhandling/PartyDemo.class
new file mode 100644
index 00000000..017278a3
Binary files /dev/null and b/cook-books/errorhandling/target/classes/org/springframework/integration/samples/errorhandling/PartyDemo.class differ
diff --git a/cook-books/errorhandling/target/classes/org/springframework/integration/samples/errorhandling/PartyGuest.class b/cook-books/errorhandling/target/classes/org/springframework/integration/samples/errorhandling/PartyGuest.class
new file mode 100644
index 00000000..4d4eb7b2
Binary files /dev/null and b/cook-books/errorhandling/target/classes/org/springframework/integration/samples/errorhandling/PartyGuest.class differ
diff --git a/cook-books/errorhandling/target/classes/org/springframework/integration/samples/errorhandling/PartyHost.class b/cook-books/errorhandling/target/classes/org/springframework/integration/samples/errorhandling/PartyHost.class
new file mode 100644
index 00000000..5ce69811
Binary files /dev/null and b/cook-books/errorhandling/target/classes/org/springframework/integration/samples/errorhandling/PartyHost.class differ
diff --git a/cook-books/errorhandling/target/classes/org/springframework/integration/samples/errorhandling/errorHandlingDemo.xml b/cook-books/errorhandling/target/classes/org/springframework/integration/samples/errorhandling/errorHandlingDemo.xml
new file mode 100644
index 00000000..7485ab44
--- /dev/null
+++ b/cook-books/errorhandling/target/classes/org/springframework/integration/samples/errorhandling/errorHandlingDemo.xml
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/cook-books/errorhandling/target/errorhandling-2.0.0.BUILD-SNAPSHOT.jar b/cook-books/errorhandling/target/errorhandling-2.0.0.BUILD-SNAPSHOT.jar
new file mode 100644
index 00000000..2ae91940
Binary files /dev/null and b/cook-books/errorhandling/target/errorhandling-2.0.0.BUILD-SNAPSHOT.jar differ
diff --git a/cook-books/errorhandling/target/maven-archiver/pom.properties b/cook-books/errorhandling/target/maven-archiver/pom.properties
new file mode 100644
index 00000000..82b74938
--- /dev/null
+++ b/cook-books/errorhandling/target/maven-archiver/pom.properties
@@ -0,0 +1,5 @@
+#Generated by Maven
+#Sat Sep 04 08:22:04 EDT 2010
+version=2.0.0.BUILD-SNAPSHOT
+groupId=org.springframework.integration.samples
+artifactId=errorhandling
diff --git a/cook-books/readme.txt b/cook-books/readme.txt
new file mode 100644
index 00000000..e69de29b
diff --git a/getting-started/file/.classpath b/getting-started/file/.classpath
new file mode 100644
index 00000000..dde3100b
--- /dev/null
+++ b/getting-started/file/.classpath
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/getting-started/file/.gitignore b/getting-started/file/.gitignore
new file mode 100644
index 00000000..ea8c4bf7
--- /dev/null
+++ b/getting-started/file/.gitignore
@@ -0,0 +1 @@
+/target
diff --git a/getting-started/file/.project b/getting-started/file/.project
new file mode 100644
index 00000000..f9eccf68
--- /dev/null
+++ b/getting-started/file/.project
@@ -0,0 +1,23 @@
+
+
+ file
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.maven.ide.eclipse.maven2Builder
+
+
+
+
+
+ org.maven.ide.eclipse.maven2Nature
+ org.eclipse.jdt.core.javanature
+
+
diff --git a/getting-started/file/pom.xml b/getting-started/file/pom.xml
new file mode 100644
index 00000000..7abdcf79
--- /dev/null
+++ b/getting-started/file/pom.xml
@@ -0,0 +1,48 @@
+
+
+ 4.0.0
+ org.springframework.integration.samples
+ file
+ 2.0.0
+ Spring Integration File Copy Sample
+ jar
+
+ 2.0.0.M7
+ 1.2.15
+ 4.7
+
+
+
+ org.springframework.integration
+ spring-integration-file
+ ${spring.integration.version}
+
+
+ log4j
+ log4j
+ ${log4j.version}
+
+
+
+ junit
+ junit
+ ${junit.version}
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+ 1.5
+ 1.5
+ -Xlint:all
+ true
+ false
+
+
+
+
+
diff --git a/getting-started/file/readme.txt b/getting-started/file/readme.txt
new file mode 100644
index 00000000..bd446cba
--- /dev/null
+++ b/getting-started/file/readme.txt
@@ -0,0 +1,13 @@
+This example demonstrates the following aspects of the File operations support available with Spring Integration:
+1. File Inbound Channel Adapter
+2. File Outbound Channel Adapter
+3. File-to-Bytes Transformer
+
+as well as Poller
+
+The use case is a simple file copy, but implemented in 3 basic flavors:
+1. Binary file copy
+2. Text file copy
+3. Simple file copy
+
+To run samples simply execute the 3 test cases located in the org.springframework.integration.samples.filecopy package
\ No newline at end of file
diff --git a/getting-started/file/src/main/java/org/springframework/integration/samples/filecopy/FileCopyDemoCommon.java b/getting-started/file/src/main/java/org/springframework/integration/samples/filecopy/FileCopyDemoCommon.java
new file mode 100644
index 00000000..72fb0187
--- /dev/null
+++ b/getting-started/file/src/main/java/org/springframework/integration/samples/filecopy/FileCopyDemoCommon.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2002-2010 the original author or authors.
+ *
+ * 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.
+ */
+
+package org.springframework.integration.samples.filecopy;
+
+import java.io.File;
+
+import org.springframework.beans.DirectFieldAccessor;
+import org.springframework.context.ApplicationContext;
+import org.springframework.integration.file.FileReadingMessageSource;
+import org.springframework.integration.file.FileWritingMessageHandler;
+
+/**
+ * Displays the names of the input and output directories.
+ *
+ * @author Marius Bogoevici
+ * @author Mark Fisher
+ */
+public class FileCopyDemoCommon {
+
+ public static void displayDirectories(ApplicationContext context) {
+ File inDir = (File) new DirectFieldAccessor(context.getBean(FileReadingMessageSource.class)).getPropertyValue("directory");
+ File outDir = (File) new DirectFieldAccessor(context.getBean(FileWritingMessageHandler.class)).getPropertyValue("destinationDirectory");
+ System.out.println("Input directory is: " + inDir.getAbsolutePath());
+ System.out.println("Output directory is: " + outDir.getAbsolutePath());
+ System.out.println("===================================================");
+ }
+
+}
diff --git a/getting-started/file/src/main/java/org/springframework/integration/samples/filecopy/Handler.java b/getting-started/file/src/main/java/org/springframework/integration/samples/filecopy/Handler.java
new file mode 100644
index 00000000..8fb30246
--- /dev/null
+++ b/getting-started/file/src/main/java/org/springframework/integration/samples/filecopy/Handler.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2002-2010 the original author or authors.
+ *
+ * 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.
+ */
+
+package org.springframework.integration.samples.filecopy;
+
+import java.io.File;
+
+/**
+ * A class providing several handling methods for different types of payloads.
+ *
+ * @author Mark Fisher
+ * @author Marius Bogoevici
+ */
+public class Handler {
+
+ public String handleString(String input) {
+ System.out.println("Copying text: " + input);
+ return input.toUpperCase();
+ }
+
+ public File handleFile(File input) {
+ System.out.println("Copying file: " + input.getAbsolutePath());
+ return input;
+ }
+
+ public byte[] handleBytes(byte[] input) {
+ System.out.println("Copying " + input.length + " bytes ...");
+ return new String(input).toUpperCase().getBytes();
+ }
+
+}
diff --git a/getting-started/file/src/main/resources/META-INF/spring/integration/fileCopyDemo-binary.xml b/getting-started/file/src/main/resources/META-INF/spring/integration/fileCopyDemo-binary.xml
new file mode 100644
index 00000000..0a931d29
--- /dev/null
+++ b/getting-started/file/src/main/resources/META-INF/spring/integration/fileCopyDemo-binary.xml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/getting-started/file/src/main/resources/META-INF/spring/integration/fileCopyDemo-file.xml b/getting-started/file/src/main/resources/META-INF/spring/integration/fileCopyDemo-file.xml
new file mode 100644
index 00000000..e38e27ab
--- /dev/null
+++ b/getting-started/file/src/main/resources/META-INF/spring/integration/fileCopyDemo-file.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/getting-started/file/src/main/resources/META-INF/spring/integration/fileCopyDemo-text.xml b/getting-started/file/src/main/resources/META-INF/spring/integration/fileCopyDemo-text.xml
new file mode 100644
index 00000000..ac5302c0
--- /dev/null
+++ b/getting-started/file/src/main/resources/META-INF/spring/integration/fileCopyDemo-text.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/getting-started/file/src/test/java/org/springframework/integration/samples/filecopy/BinaryFileCopyTest.java b/getting-started/file/src/test/java/org/springframework/integration/samples/filecopy/BinaryFileCopyTest.java
new file mode 100644
index 00000000..b213c23f
--- /dev/null
+++ b/getting-started/file/src/test/java/org/springframework/integration/samples/filecopy/BinaryFileCopyTest.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2002-2010 the original author or authors.
+ *
+ * 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.
+ */
+
+package org.springframework.integration.samples.filecopy;
+
+import org.junit.Test;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+/**
+ * Demonstrating the file copy scenario using binary file source and target.
+ * See the 'fileCopyDemo-binary.xml' configuration file for details. Notice
+ * that the transformer is configured to delete the source File after it
+ * extracts the content as a byte array.
+ *
+ * @author Marius Bogoevici
+ */
+public class BinaryFileCopyTest {
+
+ @Test
+ public void testBinaryCopy(){
+ ApplicationContext context = new ClassPathXmlApplicationContext("/META-INF/spring/integration/fileCopyDemo-binary.xml", BinaryFileCopyTest.class);
+ FileCopyDemoCommon.displayDirectories(context);
+ }
+
+}
diff --git a/getting-started/file/src/test/java/org/springframework/integration/samples/filecopy/FileBasedFileCopyTest.java b/getting-started/file/src/test/java/org/springframework/integration/samples/filecopy/FileBasedFileCopyTest.java
new file mode 100644
index 00000000..6f07874b
--- /dev/null
+++ b/getting-started/file/src/test/java/org/springframework/integration/samples/filecopy/FileBasedFileCopyTest.java
@@ -0,0 +1,37 @@
+/*
+ * Copyright 2002-2010 the original author or authors.
+ *
+ * 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.
+ */
+
+package org.springframework.integration.samples.filecopy;
+
+import org.junit.Test;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+/**
+ * Demonstrating the file copy scenario using file-based source and target.
+ * See the 'fileCopyDemo-file.xml' configuration file for details.
+ *
+ * @author Marius Bogoevici
+ */
+public class FileBasedFileCopyTest {
+
+ @Test
+ public void testFileBasedCopy(){
+ ApplicationContext context = new ClassPathXmlApplicationContext("/META-INF/spring/integration/fileCopyDemo-file.xml", FileBasedFileCopyTest.class);
+ FileCopyDemoCommon.displayDirectories(context);
+ }
+
+}
diff --git a/getting-started/file/src/test/java/org/springframework/integration/samples/filecopy/TextFileCopyTest.java b/getting-started/file/src/test/java/org/springframework/integration/samples/filecopy/TextFileCopyTest.java
new file mode 100644
index 00000000..e063dca1
--- /dev/null
+++ b/getting-started/file/src/test/java/org/springframework/integration/samples/filecopy/TextFileCopyTest.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2002-2010 the original author or authors.
+ *
+ * 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.
+ */
+
+package org.springframework.integration.samples.filecopy;
+
+import org.junit.Test;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+/**
+ * Demonstrating the file copy scenario using text-based source and target.
+ * See the 'fileCopyDemo-text.xml' configuration file for details.
+ *
+ * @author Mark Fisher
+ * @author Marius Bogoevici
+ */
+public class TextFileCopyTest {
+
+ @Test
+ public void testTextBasedCopy(){
+ ApplicationContext context = new ClassPathXmlApplicationContext("/META-INF/spring/integration/fileCopyDemo-text.xml", TextFileCopyTest.class);
+ FileCopyDemoCommon.displayDirectories(context);
+ }
+
+}
+
diff --git a/getting-started/file/src/test/resources/log4j.xml b/getting-started/file/src/test/resources/log4j.xml
new file mode 100644
index 00000000..da348ad0
--- /dev/null
+++ b/getting-started/file/src/test/resources/log4j.xml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/getting-started/helloworld/.classpath b/getting-started/helloworld/.classpath
new file mode 100644
index 00000000..16f01e2e
--- /dev/null
+++ b/getting-started/helloworld/.classpath
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/getting-started/helloworld/.project b/getting-started/helloworld/.project
new file mode 100644
index 00000000..dea589e1
--- /dev/null
+++ b/getting-started/helloworld/.project
@@ -0,0 +1,35 @@
+
+
+ helloworld
+
+
+
+
+
+ org.eclipse.wst.common.project.facet.core.builder
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.springframework.ide.eclipse.core.springbuilder
+
+
+
+
+ org.maven.ide.eclipse.maven2Builder
+
+
+
+
+
+ org.springframework.ide.eclipse.core.springnature
+ org.eclipse.jdt.core.javanature
+ org.maven.ide.eclipse.maven2Nature
+ org.eclipse.wst.common.project.facet.core.nature
+
+
diff --git a/getting-started/helloworld/.springBeans b/getting-started/helloworld/.springBeans
new file mode 100644
index 00000000..15608f30
--- /dev/null
+++ b/getting-started/helloworld/.springBeans
@@ -0,0 +1,13 @@
+
+
+ 1
+
+
+
+
+
+
+
+
+
+
diff --git a/getting-started/helloworld/README.txt b/getting-started/helloworld/README.txt
new file mode 100644
index 00000000..f46df4fa
--- /dev/null
+++ b/getting-started/helloworld/README.txt
@@ -0,0 +1,9 @@
+Instructions for running the HelloWorldDemo sample
+-------------------------------------------------------------------------------
+1. See README.txt in the parent directory.
+
+2. To run this sample as a standalone application simply execute the
+ HelloWorldDemo class that is located within the
+ org.springframework.integration.samples.helloworld package.
+
+Happy integration :-)
diff --git a/getting-started/helloworld/pom.xml b/getting-started/helloworld/pom.xml
new file mode 100644
index 00000000..8ee01e01
--- /dev/null
+++ b/getting-started/helloworld/pom.xml
@@ -0,0 +1,52 @@
+
+
+ 4.0.0
+
+ org.springframework.integration.samples
+ spring-integration-samples
+ 2.0.0.BUILD-SNAPSHOT
+
+ helloworld
+ Spring Integration Hello World Sample
+
+
+
+ ${basedir}/src/main/java
+
+ **/*.xml
+
+
+
+ false
+ ${basedir}/src/main/resources
+
+ META-INF/spring/*.xml
+
+
+
+
+
+
+ org.springframework.integration
+ spring-integration-core
+
+
+
+
+ repository.springframework.maven.release
+ Spring Framework Maven Release Repository
+ http://maven.springframework.org/release
+
+
+ repository.springframework.maven.milestone
+ Spring Framework Maven Milestone Repository
+ http://maven.springframework.org/milestone
+
+
+ repository.springframework.maven.snapshot
+ Spring Framework Maven Snapshot Repository
+ http://maven.springframework.org/snapshot
+
+
+
diff --git a/getting-started/helloworld/src/main/java/log4j.xml b/getting-started/helloworld/src/main/java/log4j.xml
new file mode 100644
index 00000000..3865c97d
--- /dev/null
+++ b/getting-started/helloworld/src/main/java/log4j.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/getting-started/helloworld/src/main/java/org/springframework/integration/samples/helloworld/HelloService.java b/getting-started/helloworld/src/main/java/org/springframework/integration/samples/helloworld/HelloService.java
new file mode 100644
index 00000000..a8f76a8c
--- /dev/null
+++ b/getting-started/helloworld/src/main/java/org/springframework/integration/samples/helloworld/HelloService.java
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2002-2010 the original author or authors.
+ *
+ * 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.
+ */
+
+package org.springframework.integration.samples.helloworld;
+
+/**
+ * Simple POJO to be referenced from a Service Activator.
+ *
+ * @author Mark Fisher
+ */
+public class HelloService {
+
+ public String sayHello(String name) {
+ return "Hello " + name;
+ }
+
+}
diff --git a/getting-started/helloworld/src/main/java/org/springframework/integration/samples/helloworld/HelloWorldDemo.java b/getting-started/helloworld/src/main/java/org/springframework/integration/samples/helloworld/HelloWorldDemo.java
new file mode 100644
index 00000000..f234da47
--- /dev/null
+++ b/getting-started/helloworld/src/main/java/org/springframework/integration/samples/helloworld/HelloWorldDemo.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2002-2010 the original author or authors.
+ *
+ * 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.
+ */
+
+package org.springframework.integration.samples.helloworld;
+
+import org.springframework.context.support.AbstractApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+import org.springframework.integration.MessageChannel;
+import org.springframework.integration.core.PollableChannel;
+import org.springframework.integration.message.GenericMessage;
+
+/**
+ * Demonstrates a basic Message Endpoint that simply prepends a greeting
+ * ("Hello ") to an inbound String payload from a Message. This is a very
+ * low-level example, using Message Channels directly for both input and
+ * output. Notice that the output channel has a queue sub-element. It is
+ * therefore a PollableChannel and its consumers must invoke receive() as
+ * demonstrated below.
+ *
+ * View the configuration of the channels and the endpoint (a <service-activator/>
+ * element) in 'helloWorldDemo.xml' within this same package.
+ *
+ * @author Mark Fisher
+ * @author Oleg Zhurakousky
+ */
+public class HelloWorldDemo {
+
+ public static void main(String[] args) {
+ AbstractApplicationContext context = new ClassPathXmlApplicationContext("helloWorldDemo.xml", HelloWorldDemo.class);
+ MessageChannel inputChannel = context.getBean("inputChannel", MessageChannel.class);
+ PollableChannel outputChannel = context.getBean("outputChannel", PollableChannel.class);
+ inputChannel.send(new GenericMessage("World"));
+ System.out.println("==> HelloWorldDemo: " + outputChannel.receive(0).getPayload());
+ }
+
+}
diff --git a/getting-started/helloworld/src/main/java/org/springframework/integration/samples/helloworld/helloWorldDemo.xml b/getting-started/helloworld/src/main/java/org/springframework/integration/samples/helloworld/helloWorldDemo.xml
new file mode 100644
index 00000000..0c355f26
--- /dev/null
+++ b/getting-started/helloworld/src/main/java/org/springframework/integration/samples/helloworld/helloWorldDemo.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/getting-started/helloworld/target/classes/log4j.xml b/getting-started/helloworld/target/classes/log4j.xml
new file mode 100644
index 00000000..3865c97d
--- /dev/null
+++ b/getting-started/helloworld/target/classes/log4j.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/getting-started/helloworld/target/classes/org/springframework/integration/samples/helloworld/HelloService.class b/getting-started/helloworld/target/classes/org/springframework/integration/samples/helloworld/HelloService.class
new file mode 100644
index 00000000..ec1b46a3
Binary files /dev/null and b/getting-started/helloworld/target/classes/org/springframework/integration/samples/helloworld/HelloService.class differ
diff --git a/getting-started/helloworld/target/classes/org/springframework/integration/samples/helloworld/HelloWorldDemo.class b/getting-started/helloworld/target/classes/org/springframework/integration/samples/helloworld/HelloWorldDemo.class
new file mode 100644
index 00000000..b2e229dc
Binary files /dev/null and b/getting-started/helloworld/target/classes/org/springframework/integration/samples/helloworld/HelloWorldDemo.class differ
diff --git a/getting-started/helloworld/target/classes/org/springframework/integration/samples/helloworld/helloWorldDemo.xml b/getting-started/helloworld/target/classes/org/springframework/integration/samples/helloworld/helloWorldDemo.xml
new file mode 100644
index 00000000..0c355f26
--- /dev/null
+++ b/getting-started/helloworld/target/classes/org/springframework/integration/samples/helloworld/helloWorldDemo.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/getting-started/helloworld/target/helloworld-2.0.0.BUILD-SNAPSHOT.jar b/getting-started/helloworld/target/helloworld-2.0.0.BUILD-SNAPSHOT.jar
new file mode 100644
index 00000000..b956dfac
Binary files /dev/null and b/getting-started/helloworld/target/helloworld-2.0.0.BUILD-SNAPSHOT.jar differ
diff --git a/getting-started/helloworld/target/maven-archiver/pom.properties b/getting-started/helloworld/target/maven-archiver/pom.properties
new file mode 100644
index 00000000..4d6ef09c
--- /dev/null
+++ b/getting-started/helloworld/target/maven-archiver/pom.properties
@@ -0,0 +1,5 @@
+#Generated by Maven
+#Sat Sep 04 08:22:06 EDT 2010
+version=2.0.0.BUILD-SNAPSHOT
+groupId=org.springframework.integration.samples
+artifactId=helloworld
diff --git a/getting-started/jms/.classpath b/getting-started/jms/.classpath
new file mode 100644
index 00000000..24166ba5
--- /dev/null
+++ b/getting-started/jms/.classpath
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/getting-started/jms/.project b/getting-started/jms/.project
new file mode 100644
index 00000000..f21c4696
--- /dev/null
+++ b/getting-started/jms/.project
@@ -0,0 +1,23 @@
+
+
+ jms
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.maven.ide.eclipse.maven2Builder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+ org.maven.ide.eclipse.maven2Nature
+
+
diff --git a/getting-started/jms/README.txt b/getting-started/jms/README.txt
new file mode 100644
index 00000000..4a60dcf3
--- /dev/null
+++ b/getting-started/jms/README.txt
@@ -0,0 +1,9 @@
+Instructions for running the HelloWorldDemo sample
+-------------------------------------------------------------------------------
+1. See README.txt in the parent directory.
+
+This demo consists of two samples, ChannelAdapterDemo and GatewayDemo.
+PLease see the corresponding javadocs for more details on each sample.
+
+
+Happy integration :-)
diff --git a/getting-started/jms/pom.xml b/getting-started/jms/pom.xml
new file mode 100644
index 00000000..790df4b4
--- /dev/null
+++ b/getting-started/jms/pom.xml
@@ -0,0 +1,44 @@
+
+
+ 4.0.0
+
+ org.springframework.integration.samples
+ spring-integration-samples
+ 2.0.0.BUILD-SNAPSHOT
+
+ jms
+ Spring Integration JMS Sample
+
+
+ org.apache.activemq
+ activemq-core
+ 5.2.0
+
+
+ org.springframework.integration
+ spring-integration-jms
+
+
+ org.springframework.integration
+ spring-integration-stream
+
+
+
+
+ repository.springframework.maven.release
+ Spring Framework Maven Release Repository
+ http://maven.springframework.org/release
+
+
+ repository.springframework.maven.milestone
+ Spring Framework Maven Milestone Repository
+ http://maven.springframework.org/milestone
+
+
+ repository.springframework.maven.snapshot
+ Spring Framework Maven Snapshot Repository
+ http://maven.springframework.org/snapshot
+
+
+
diff --git a/getting-started/jms/src/main/java/log4j.xml b/getting-started/jms/src/main/java/log4j.xml
new file mode 100644
index 00000000..a54abb80
--- /dev/null
+++ b/getting-started/jms/src/main/java/log4j.xml
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/getting-started/jms/src/main/java/org/springframework/integration/samples/jms/ActiveMqTestUtils.java b/getting-started/jms/src/main/java/org/springframework/integration/samples/jms/ActiveMqTestUtils.java
new file mode 100644
index 00000000..02f978f2
--- /dev/null
+++ b/getting-started/jms/src/main/java/org/springframework/integration/samples/jms/ActiveMqTestUtils.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2002-2010 the original author or authors.
+ *
+ * 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.
+ */
+package org.springframework.integration.samples.jms;
+
+import java.io.File;
+
+/**
+ * @author Oleg Zhurakousky
+ *
+ */
+public class ActiveMqTestUtils {
+
+ public static void prepare() {
+ System.out.println("####### Refreshing ActiveMq ########");
+ File activeMqTempDir = new File("activemq-data");
+ deleteDir(activeMqTempDir);
+
+ }
+ /*
+ *
+ */
+ private static void deleteDir(File directory){
+ if (directory.exists()){
+ String[] children = directory.list();
+ if (children != null){
+ for (int i=0; i < children.length; i++) {
+ deleteDir(new File(directory, children[i]));
+ }
+ }
+ }
+ directory.delete();
+ }
+}
diff --git a/getting-started/jms/src/main/java/org/springframework/integration/samples/jms/ChannelAdapterDemo.java b/getting-started/jms/src/main/java/org/springframework/integration/samples/jms/ChannelAdapterDemo.java
new file mode 100644
index 00000000..589f90f4
--- /dev/null
+++ b/getting-started/jms/src/main/java/org/springframework/integration/samples/jms/ChannelAdapterDemo.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2002-2010 the original author or authors.
+ *
+ * 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.
+ */
+
+package org.springframework.integration.samples.jms;
+
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+/**
+ * A simple bootstrap main() method for starting a pair of JMS Channel
+ * Adapters. Text entered in the console will go through an outbound
+ * JMS Channel Adapter from which it is sent to a JMS Destination.
+ * An inbound JMS Channel Adapter is listening to that same JMS
+ * Destination and will echo the result in the console.
+ *
+ * See the configuration in the three XML files that are referenced below.
+ *
+ * @author Mark Fisher
+ */
+public class ChannelAdapterDemo {
+
+ private final static String[] configFiles = {
+ "common.xml", "inboundChannelAdapter.xml", "outboundChannelAdapter.xml"
+ };
+
+
+ public static void main(String[] args) {
+ ActiveMqTestUtils.prepare();
+ new ClassPathXmlApplicationContext(configFiles, ChannelAdapterDemo.class);
+ }
+
+}
diff --git a/getting-started/jms/src/main/java/org/springframework/integration/samples/jms/DemoBean.java b/getting-started/jms/src/main/java/org/springframework/integration/samples/jms/DemoBean.java
new file mode 100644
index 00000000..b19127a7
--- /dev/null
+++ b/getting-started/jms/src/main/java/org/springframework/integration/samples/jms/DemoBean.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2002-2010 the original author or authors.
+ *
+ * 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.
+ */
+
+package org.springframework.integration.samples.jms;
+
+import org.springframework.integration.annotation.MessageEndpoint;
+import org.springframework.integration.annotation.ServiceActivator;
+
+/**
+ * @author Mark Fisher
+ */
+@MessageEndpoint
+public class DemoBean {
+
+ @ServiceActivator
+ public String upperCase(String input) {
+ return input.toUpperCase();
+ }
+
+}
diff --git a/getting-started/jms/src/main/java/org/springframework/integration/samples/jms/GatewayDemo.java b/getting-started/jms/src/main/java/org/springframework/integration/samples/jms/GatewayDemo.java
new file mode 100644
index 00000000..35a6022e
--- /dev/null
+++ b/getting-started/jms/src/main/java/org/springframework/integration/samples/jms/GatewayDemo.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2002-2010 the original author or authors.
+ *
+ * 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.
+ */
+
+package org.springframework.integration.samples.jms;
+
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+/**
+ * A simple bootstrap main() method for starting a pair of JMS Gateways.
+ * Text entered in the console will go through an outbound JMS Gateway from
+ * which it is sent to a JMS Destination. An inbound JMS Gateway is listening
+ * to that same JMS Destination and will send the text to another Spring
+ * Integration channel where it is handled by a service that simply converts
+ * the text to upper case. The upper-case result is then sent in a response
+ * message over JMS so that the outbound Gateway receives it as the reply to
+ * its original request. At that point, the text is logged to the console.
+ *
+ * See the configuration in the three XML files that are referenced below.
+ *
+ * @author Mark Fisher
+ */
+public class GatewayDemo {
+
+ private final static String[] configFiles = {
+ "common.xml", "inboundGateway.xml", "outboundGateway.xml"
+ };
+
+
+ public static void main(String[] args) {
+ ActiveMqTestUtils.prepare();
+ new ClassPathXmlApplicationContext(configFiles, GatewayDemo.class);
+ }
+
+}
diff --git a/getting-started/jms/src/main/java/org/springframework/integration/samples/jms/common.xml b/getting-started/jms/src/main/java/org/springframework/integration/samples/jms/common.xml
new file mode 100644
index 00000000..0d9c717f
--- /dev/null
+++ b/getting-started/jms/src/main/java/org/springframework/integration/samples/jms/common.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/getting-started/jms/src/main/java/org/springframework/integration/samples/jms/inboundChannelAdapter.xml b/getting-started/jms/src/main/java/org/springframework/integration/samples/jms/inboundChannelAdapter.xml
new file mode 100644
index 00000000..898441c0
--- /dev/null
+++ b/getting-started/jms/src/main/java/org/springframework/integration/samples/jms/inboundChannelAdapter.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/getting-started/jms/src/main/java/org/springframework/integration/samples/jms/inboundGateway.xml b/getting-started/jms/src/main/java/org/springframework/integration/samples/jms/inboundGateway.xml
new file mode 100644
index 00000000..5fa49455
--- /dev/null
+++ b/getting-started/jms/src/main/java/org/springframework/integration/samples/jms/inboundGateway.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/getting-started/jms/src/main/java/org/springframework/integration/samples/jms/outboundChannelAdapter.xml b/getting-started/jms/src/main/java/org/springframework/integration/samples/jms/outboundChannelAdapter.xml
new file mode 100644
index 00000000..33d5b920
--- /dev/null
+++ b/getting-started/jms/src/main/java/org/springframework/integration/samples/jms/outboundChannelAdapter.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/getting-started/jms/src/main/java/org/springframework/integration/samples/jms/outboundGateway.xml b/getting-started/jms/src/main/java/org/springframework/integration/samples/jms/outboundGateway.xml
new file mode 100644
index 00000000..3f282ad6
--- /dev/null
+++ b/getting-started/jms/src/main/java/org/springframework/integration/samples/jms/outboundGateway.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/getting-started/jms/target/classes/log4j.xml b/getting-started/jms/target/classes/log4j.xml
new file mode 100644
index 00000000..a54abb80
--- /dev/null
+++ b/getting-started/jms/target/classes/log4j.xml
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/getting-started/jms/target/classes/org/springframework/integration/samples/jms/ActiveMqTestUtils.class b/getting-started/jms/target/classes/org/springframework/integration/samples/jms/ActiveMqTestUtils.class
new file mode 100644
index 00000000..d12db3d0
Binary files /dev/null and b/getting-started/jms/target/classes/org/springframework/integration/samples/jms/ActiveMqTestUtils.class differ
diff --git a/getting-started/jms/target/classes/org/springframework/integration/samples/jms/ChannelAdapterDemo.class b/getting-started/jms/target/classes/org/springframework/integration/samples/jms/ChannelAdapterDemo.class
new file mode 100644
index 00000000..6c98ce37
Binary files /dev/null and b/getting-started/jms/target/classes/org/springframework/integration/samples/jms/ChannelAdapterDemo.class differ
diff --git a/getting-started/jms/target/classes/org/springframework/integration/samples/jms/DemoBean.class b/getting-started/jms/target/classes/org/springframework/integration/samples/jms/DemoBean.class
new file mode 100644
index 00000000..98bc009b
Binary files /dev/null and b/getting-started/jms/target/classes/org/springframework/integration/samples/jms/DemoBean.class differ
diff --git a/getting-started/jms/target/classes/org/springframework/integration/samples/jms/GatewayDemo.class b/getting-started/jms/target/classes/org/springframework/integration/samples/jms/GatewayDemo.class
new file mode 100644
index 00000000..5ba58828
Binary files /dev/null and b/getting-started/jms/target/classes/org/springframework/integration/samples/jms/GatewayDemo.class differ
diff --git a/getting-started/jms/target/classes/org/springframework/integration/samples/jms/common.xml b/getting-started/jms/target/classes/org/springframework/integration/samples/jms/common.xml
new file mode 100644
index 00000000..0d9c717f
--- /dev/null
+++ b/getting-started/jms/target/classes/org/springframework/integration/samples/jms/common.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/getting-started/jms/target/classes/org/springframework/integration/samples/jms/inboundChannelAdapter.xml b/getting-started/jms/target/classes/org/springframework/integration/samples/jms/inboundChannelAdapter.xml
new file mode 100644
index 00000000..898441c0
--- /dev/null
+++ b/getting-started/jms/target/classes/org/springframework/integration/samples/jms/inboundChannelAdapter.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/getting-started/jms/target/classes/org/springframework/integration/samples/jms/inboundGateway.xml b/getting-started/jms/target/classes/org/springframework/integration/samples/jms/inboundGateway.xml
new file mode 100644
index 00000000..5fa49455
--- /dev/null
+++ b/getting-started/jms/target/classes/org/springframework/integration/samples/jms/inboundGateway.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/getting-started/jms/target/classes/org/springframework/integration/samples/jms/outboundChannelAdapter.xml b/getting-started/jms/target/classes/org/springframework/integration/samples/jms/outboundChannelAdapter.xml
new file mode 100644
index 00000000..33d5b920
--- /dev/null
+++ b/getting-started/jms/target/classes/org/springframework/integration/samples/jms/outboundChannelAdapter.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/getting-started/jms/target/classes/org/springframework/integration/samples/jms/outboundGateway.xml b/getting-started/jms/target/classes/org/springframework/integration/samples/jms/outboundGateway.xml
new file mode 100644
index 00000000..3f282ad6
--- /dev/null
+++ b/getting-started/jms/target/classes/org/springframework/integration/samples/jms/outboundGateway.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/getting-started/jms/target/jms-2.0.0.BUILD-SNAPSHOT.jar b/getting-started/jms/target/jms-2.0.0.BUILD-SNAPSHOT.jar
new file mode 100644
index 00000000..b658a362
Binary files /dev/null and b/getting-started/jms/target/jms-2.0.0.BUILD-SNAPSHOT.jar differ
diff --git a/getting-started/jms/target/maven-archiver/pom.properties b/getting-started/jms/target/maven-archiver/pom.properties
new file mode 100644
index 00000000..b494df34
--- /dev/null
+++ b/getting-started/jms/target/maven-archiver/pom.properties
@@ -0,0 +1,5 @@
+#Generated by Maven
+#Sat Sep 04 08:22:08 EDT 2010
+version=2.0.0.BUILD-SNAPSHOT
+groupId=org.springframework.integration.samples
+artifactId=jms
diff --git a/getting-started/jmx/.classpath b/getting-started/jmx/.classpath
new file mode 100644
index 00000000..16f01e2e
--- /dev/null
+++ b/getting-started/jmx/.classpath
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/getting-started/jmx/.project b/getting-started/jmx/.project
new file mode 100644
index 00000000..2b917559
--- /dev/null
+++ b/getting-started/jmx/.project
@@ -0,0 +1,29 @@
+
+
+ jmx
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.springframework.ide.eclipse.core.springbuilder
+
+
+
+
+ org.maven.ide.eclipse.maven2Builder
+
+
+
+
+
+ org.springframework.ide.eclipse.core.springnature
+ org.eclipse.jdt.core.javanature
+ org.maven.ide.eclipse.maven2Nature
+
+
diff --git a/getting-started/jmx/.springBeans b/getting-started/jmx/.springBeans
new file mode 100644
index 00000000..15608f30
--- /dev/null
+++ b/getting-started/jmx/.springBeans
@@ -0,0 +1,13 @@
+
+
+ 1
+
+
+
+
+
+
+
+
+
+
diff --git a/getting-started/jmx/pom.xml b/getting-started/jmx/pom.xml
new file mode 100644
index 00000000..31f4e171
--- /dev/null
+++ b/getting-started/jmx/pom.xml
@@ -0,0 +1,39 @@
+
+
+ 4.0.0
+
+ org.springframework.integration.samples
+ spring-integration-samples
+ 2.0.0.BUILD-SNAPSHOT
+
+ jmx
+ Spring Integration JMX Sample
+
+
+ org.springframework.integration
+ spring-integration-jmx
+
+
+ org.springframework.integration
+ spring-integration-stream
+
+
+
+
+ repository.springframework.maven.release
+ Spring Framework Maven Release Repository
+ http://maven.springframework.org/release
+
+
+ repository.springframework.maven.milestone
+ Spring Framework Maven Milestone Repository
+ http://maven.springframework.org/milestone
+
+
+ repository.springframework.maven.snapshot
+ Spring Framework Maven Snapshot Repository
+ http://maven.springframework.org/snapshot
+
+
+
diff --git a/getting-started/jmx/src/main/java/log4j.xml b/getting-started/jmx/src/main/java/log4j.xml
new file mode 100644
index 00000000..a01d5446
--- /dev/null
+++ b/getting-started/jmx/src/main/java/log4j.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/getting-started/jmx/src/main/java/org/springframework/integration/samples/jmx/JmxAdapterDemo-context.xml b/getting-started/jmx/src/main/java/org/springframework/integration/samples/jmx/JmxAdapterDemo-context.xml
new file mode 100644
index 00000000..e3aceb8a
--- /dev/null
+++ b/getting-started/jmx/src/main/java/org/springframework/integration/samples/jmx/JmxAdapterDemo-context.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/getting-started/jmx/src/main/java/org/springframework/integration/samples/jmx/JmxAdapterDemo.java b/getting-started/jmx/src/main/java/org/springframework/integration/samples/jmx/JmxAdapterDemo.java
new file mode 100644
index 00000000..74ad3ff4
--- /dev/null
+++ b/getting-started/jmx/src/main/java/org/springframework/integration/samples/jmx/JmxAdapterDemo.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2002-2010 the original author or authors.
+ *
+ * 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.
+ */
+
+package org.springframework.integration.samples.jmx;
+
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+/**
+ * @author Mark Fisher
+ * @since 2.0
+ */
+public class JmxAdapterDemo {
+
+ public static void main(String[] args) {
+ new ClassPathXmlApplicationContext(
+ "JmxAdapterDemo-context.xml", JmxAdapterDemo.class);
+ }
+
+}
diff --git a/getting-started/jmx/src/main/java/org/springframework/integration/samples/jmx/StopWatch.java b/getting-started/jmx/src/main/java/org/springframework/integration/samples/jmx/StopWatch.java
new file mode 100644
index 00000000..a431a579
--- /dev/null
+++ b/getting-started/jmx/src/main/java/org/springframework/integration/samples/jmx/StopWatch.java
@@ -0,0 +1,72 @@
+/*
+ * Copyright 2002-2010 the original author or authors.
+ *
+ * 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.
+ */
+
+package org.springframework.integration.samples.jmx;
+
+import java.util.concurrent.Future;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import org.springframework.beans.factory.InitializingBean;
+import org.springframework.jmx.export.annotation.ManagedAttribute;
+import org.springframework.jmx.export.annotation.ManagedOperation;
+import org.springframework.jmx.export.annotation.ManagedResource;
+import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;
+import org.springframework.stereotype.Component;
+
+/**
+ * @author Mark Fisher
+ * @since 2.0
+ */
+@Component
+@ManagedResource
+public class StopWatch implements InitializingBean {
+
+ private final ThreadPoolTaskScheduler scheduler = new ThreadPoolTaskScheduler();
+
+ private volatile Future> future;
+
+ private final AtomicInteger seconds = new AtomicInteger();
+
+ @ManagedAttribute
+ public int getSeconds() {
+ return this.seconds.get();
+ }
+
+ public void afterPropertiesSet() {
+ this.start();
+ }
+
+ @ManagedOperation
+ public void start() {
+ this.scheduler.initialize();
+ this.future = this.scheduler.scheduleAtFixedRate(new Runnable() {
+ public void run() {
+ seconds.incrementAndGet();
+ }
+ }, 1000);
+ }
+
+ @ManagedOperation
+ public void stop() {
+ this.future.cancel(true);
+ }
+
+ @ManagedOperation
+ public void reset() {
+ this.seconds.set(0);
+ }
+
+}
diff --git a/getting-started/jmx/target/classes/log4j.xml b/getting-started/jmx/target/classes/log4j.xml
new file mode 100644
index 00000000..a01d5446
--- /dev/null
+++ b/getting-started/jmx/target/classes/log4j.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/getting-started/jmx/target/classes/org/springframework/integration/samples/jmx/JmxAdapterDemo-context.xml b/getting-started/jmx/target/classes/org/springframework/integration/samples/jmx/JmxAdapterDemo-context.xml
new file mode 100644
index 00000000..e3aceb8a
--- /dev/null
+++ b/getting-started/jmx/target/classes/org/springframework/integration/samples/jmx/JmxAdapterDemo-context.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/getting-started/jmx/target/classes/org/springframework/integration/samples/jmx/JmxAdapterDemo.class b/getting-started/jmx/target/classes/org/springframework/integration/samples/jmx/JmxAdapterDemo.class
new file mode 100644
index 00000000..16ec859a
Binary files /dev/null and b/getting-started/jmx/target/classes/org/springframework/integration/samples/jmx/JmxAdapterDemo.class differ
diff --git a/getting-started/jmx/target/classes/org/springframework/integration/samples/jmx/StopWatch$1.class b/getting-started/jmx/target/classes/org/springframework/integration/samples/jmx/StopWatch$1.class
new file mode 100644
index 00000000..ed78681d
Binary files /dev/null and b/getting-started/jmx/target/classes/org/springframework/integration/samples/jmx/StopWatch$1.class differ
diff --git a/getting-started/jmx/target/classes/org/springframework/integration/samples/jmx/StopWatch.class b/getting-started/jmx/target/classes/org/springframework/integration/samples/jmx/StopWatch.class
new file mode 100644
index 00000000..7c98fc18
Binary files /dev/null and b/getting-started/jmx/target/classes/org/springframework/integration/samples/jmx/StopWatch.class differ
diff --git a/getting-started/jmx/target/jmx-2.0.0.BUILD-SNAPSHOT.jar b/getting-started/jmx/target/jmx-2.0.0.BUILD-SNAPSHOT.jar
new file mode 100644
index 00000000..eb99783e
Binary files /dev/null and b/getting-started/jmx/target/jmx-2.0.0.BUILD-SNAPSHOT.jar differ
diff --git a/getting-started/jmx/target/maven-archiver/pom.properties b/getting-started/jmx/target/maven-archiver/pom.properties
new file mode 100644
index 00000000..b2a2f224
--- /dev/null
+++ b/getting-started/jmx/target/maven-archiver/pom.properties
@@ -0,0 +1,5 @@
+#Generated by Maven
+#Sat Sep 04 08:22:10 EDT 2010
+version=2.0.0.BUILD-SNAPSHOT
+groupId=org.springframework.integration.samples
+artifactId=jmx
diff --git a/getting-started/oddeven/.classpath b/getting-started/oddeven/.classpath
new file mode 100644
index 00000000..24166ba5
--- /dev/null
+++ b/getting-started/oddeven/.classpath
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/getting-started/oddeven/.project b/getting-started/oddeven/.project
new file mode 100644
index 00000000..7d3fb088
--- /dev/null
+++ b/getting-started/oddeven/.project
@@ -0,0 +1,23 @@
+
+
+ oddeven
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.maven.ide.eclipse.maven2Builder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+ org.maven.ide.eclipse.maven2Nature
+
+
diff --git a/getting-started/oddeven/pom.xml b/getting-started/oddeven/pom.xml
new file mode 100644
index 00000000..5f7d4730
--- /dev/null
+++ b/getting-started/oddeven/pom.xml
@@ -0,0 +1,35 @@
+
+
+ 4.0.0
+
+ org.springframework.integration.samples
+ spring-integration-samples
+ 2.0.0.BUILD-SNAPSHOT
+
+ oddeven
+ Spring Integration Odd-Even Sample
+
+
+ org.springframework.integration
+ spring-integration-core
+
+
+
+
+ repository.springframework.maven.release
+ Spring Framework Maven Release Repository
+ http://maven.springframework.org/release
+
+
+ repository.springframework.maven.milestone
+ Spring Framework Maven Milestone Repository
+ http://maven.springframework.org/milestone
+
+
+ repository.springframework.maven.snapshot
+ Spring Framework Maven Snapshot Repository
+ http://maven.springframework.org/snapshot
+
+
+
diff --git a/getting-started/oddeven/readme.txt b/getting-started/oddeven/readme.txt
new file mode 100644
index 00000000..775f38d0
--- /dev/null
+++ b/getting-started/oddeven/readme.txt
@@ -0,0 +1 @@
+Demonstrates Inbound channel adapter and Poller configuration with Cron and Interval triggers
\ No newline at end of file
diff --git a/getting-started/oddeven/src/main/java/log4j.xml b/getting-started/oddeven/src/main/java/log4j.xml
new file mode 100644
index 00000000..78268c06
--- /dev/null
+++ b/getting-started/oddeven/src/main/java/log4j.xml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/getting-started/oddeven/src/main/java/org/springframework/integration/samples/oddeven/Counter.java b/getting-started/oddeven/src/main/java/org/springframework/integration/samples/oddeven/Counter.java
new file mode 100644
index 00000000..736989d8
--- /dev/null
+++ b/getting-started/oddeven/src/main/java/org/springframework/integration/samples/oddeven/Counter.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2002-2010 the original author or authors.
+ *
+ * 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.
+ */
+
+package org.springframework.integration.samples.oddeven;
+
+import java.util.concurrent.atomic.AtomicInteger;
+
+/**
+ * A simple POJO providing a method that returns incrementing integer values.
+ * This is referenced in the sample's configuration by an inbound Channel
+ * Adapter acting as a Polling Consumer.
+ *
+ * Every 5th number will be returned as a negative value.
+ *
+ * @author Mark Fisher
+ */
+public class Counter {
+
+ private final AtomicInteger count = new AtomicInteger();
+
+ public int next() {
+ int nextNumber = count.incrementAndGet();
+ return (nextNumber % 5 == 0) ? -nextNumber : nextNumber;
+ }
+
+}
diff --git a/getting-started/oddeven/src/main/java/org/springframework/integration/samples/oddeven/CronOddEvenDemo.java b/getting-started/oddeven/src/main/java/org/springframework/integration/samples/oddeven/CronOddEvenDemo.java
new file mode 100644
index 00000000..5dfc387d
--- /dev/null
+++ b/getting-started/oddeven/src/main/java/org/springframework/integration/samples/oddeven/CronOddEvenDemo.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2002-2010 the original author or authors.
+ *
+ * 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.
+ */
+
+package org.springframework.integration.samples.oddeven;
+
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+/**
+ * Demonstrates a method-invoking inbound Channel Adapter acting as a Polling
+ * Consumer with a cron-based trigger. That adapter is followed, downstream, by
+ * a simple method-invoking Message Filter that discards negative numbers to
+ * the "nullChannel". Next is a Content Based Router. The router sends to one of
+ * two channels based on whether the payload number is odd or even. Each of
+ * those two channels has an Event Driven Consumer ready to log the number
+ * and the current time.
+ *
+ * See the 'cronOddEvenDemo.xml' configuration file for more detail. The cron
+ * expression is based on the Fibonacci sequence. Feel free to modify it.
+ *
+ * @author Mark Fisher
+ */
+public class CronOddEvenDemo {
+
+ public static void main(String[] args) {
+ new ClassPathXmlApplicationContext("cronOddEvenDemo.xml", CronOddEvenDemo.class);
+ }
+
+}
diff --git a/getting-started/oddeven/src/main/java/org/springframework/integration/samples/oddeven/EvenLogger.java b/getting-started/oddeven/src/main/java/org/springframework/integration/samples/oddeven/EvenLogger.java
new file mode 100644
index 00000000..7f3f1e55
--- /dev/null
+++ b/getting-started/oddeven/src/main/java/org/springframework/integration/samples/oddeven/EvenLogger.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2002-2010 the original author or authors.
+ *
+ * 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.
+ */
+
+package org.springframework.integration.samples.oddeven;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import org.springframework.integration.annotation.MessageEndpoint;
+import org.springframework.integration.annotation.ServiceActivator;
+
+/**
+ * A POJO Service Activator that logs even numbers and the current time.
+ *
+ * @author Mark Fisher
+ * @author Marius Bogoevici
+ */
+@MessageEndpoint
+public class EvenLogger {
+
+ @ServiceActivator
+ public void log(int i) {
+ System.out.println("even: " + i + " at " + new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(new Date()));
+ }
+
+}
diff --git a/getting-started/oddeven/src/main/java/org/springframework/integration/samples/oddeven/IntervalOddEvenDemo.java b/getting-started/oddeven/src/main/java/org/springframework/integration/samples/oddeven/IntervalOddEvenDemo.java
new file mode 100644
index 00000000..fcf31073
--- /dev/null
+++ b/getting-started/oddeven/src/main/java/org/springframework/integration/samples/oddeven/IntervalOddEvenDemo.java
@@ -0,0 +1,40 @@
+/*
+ * Copyright 2002-2010 the original author or authors.
+ *
+ * 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.
+ */
+
+package org.springframework.integration.samples.oddeven;
+
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+/**
+ * Demonstrates a method-invoking inbound Channel Adapter acting as a Polling
+ * Consumer with an interval-based trigger. That adapter is followed,
+ * downstream, by a simple method-invoking Message Filter that discards
+ * negative numbers to the "nullChannel". Next is a Content Based Router. The
+ * router sends to one of two channels based on whether the payload number is
+ * odd or even. Each of those two channels has an Event Driven Consumer ready
+ * to log the number and the current time.
+ *
+ * See the 'intervalOddEvenDemo.xml' configuration file for more detail.
+ *
+ * @author Mark Fisher
+ */
+public class IntervalOddEvenDemo {
+
+ public static void main(String[] args) {
+ new ClassPathXmlApplicationContext("intervalOddEvenDemo.xml", IntervalOddEvenDemo.class);
+ }
+
+}
diff --git a/getting-started/oddeven/src/main/java/org/springframework/integration/samples/oddeven/OddLogger.java b/getting-started/oddeven/src/main/java/org/springframework/integration/samples/oddeven/OddLogger.java
new file mode 100644
index 00000000..2e2dbb0c
--- /dev/null
+++ b/getting-started/oddeven/src/main/java/org/springframework/integration/samples/oddeven/OddLogger.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2002-2010 the original author or authors.
+ *
+ * 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.
+ */
+
+package org.springframework.integration.samples.oddeven;
+
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import org.springframework.integration.annotation.MessageEndpoint;
+import org.springframework.integration.annotation.ServiceActivator;
+
+/**
+ * A POJO Service Activator that logs odd numbers and the current time.
+ *
+ * @author Mark Fisher
+ * @author Marius Bogoevici
+ */
+@MessageEndpoint
+public class OddLogger {
+
+ @ServiceActivator
+ public void log(int i) {
+ System.out.println("odd: " + i + " at " + new SimpleDateFormat("yyyy-MM-dd hh:mm:ss").format(new Date()));
+ }
+
+}
\ No newline at end of file
diff --git a/getting-started/oddeven/src/main/java/org/springframework/integration/samples/oddeven/cronOddEvenDemo.xml b/getting-started/oddeven/src/main/java/org/springframework/integration/samples/oddeven/cronOddEvenDemo.xml
new file mode 100644
index 00000000..eef728da
--- /dev/null
+++ b/getting-started/oddeven/src/main/java/org/springframework/integration/samples/oddeven/cronOddEvenDemo.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/getting-started/oddeven/src/main/java/org/springframework/integration/samples/oddeven/intervalOddEvenDemo.xml b/getting-started/oddeven/src/main/java/org/springframework/integration/samples/oddeven/intervalOddEvenDemo.xml
new file mode 100644
index 00000000..a155d205
--- /dev/null
+++ b/getting-started/oddeven/src/main/java/org/springframework/integration/samples/oddeven/intervalOddEvenDemo.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/getting-started/oddeven/target/classes/log4j.xml b/getting-started/oddeven/target/classes/log4j.xml
new file mode 100644
index 00000000..78268c06
--- /dev/null
+++ b/getting-started/oddeven/target/classes/log4j.xml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/getting-started/oddeven/target/classes/org/springframework/integration/samples/oddeven/Counter.class b/getting-started/oddeven/target/classes/org/springframework/integration/samples/oddeven/Counter.class
new file mode 100644
index 00000000..74759816
Binary files /dev/null and b/getting-started/oddeven/target/classes/org/springframework/integration/samples/oddeven/Counter.class differ
diff --git a/getting-started/oddeven/target/classes/org/springframework/integration/samples/oddeven/CronOddEvenDemo.class b/getting-started/oddeven/target/classes/org/springframework/integration/samples/oddeven/CronOddEvenDemo.class
new file mode 100644
index 00000000..6df63ccb
Binary files /dev/null and b/getting-started/oddeven/target/classes/org/springframework/integration/samples/oddeven/CronOddEvenDemo.class differ
diff --git a/getting-started/oddeven/target/classes/org/springframework/integration/samples/oddeven/EvenLogger.class b/getting-started/oddeven/target/classes/org/springframework/integration/samples/oddeven/EvenLogger.class
new file mode 100644
index 00000000..6b5f4b02
Binary files /dev/null and b/getting-started/oddeven/target/classes/org/springframework/integration/samples/oddeven/EvenLogger.class differ
diff --git a/getting-started/oddeven/target/classes/org/springframework/integration/samples/oddeven/IntervalOddEvenDemo.class b/getting-started/oddeven/target/classes/org/springframework/integration/samples/oddeven/IntervalOddEvenDemo.class
new file mode 100644
index 00000000..dadea56a
Binary files /dev/null and b/getting-started/oddeven/target/classes/org/springframework/integration/samples/oddeven/IntervalOddEvenDemo.class differ
diff --git a/getting-started/oddeven/target/classes/org/springframework/integration/samples/oddeven/OddLogger.class b/getting-started/oddeven/target/classes/org/springframework/integration/samples/oddeven/OddLogger.class
new file mode 100644
index 00000000..bbf02d91
Binary files /dev/null and b/getting-started/oddeven/target/classes/org/springframework/integration/samples/oddeven/OddLogger.class differ
diff --git a/getting-started/oddeven/target/classes/org/springframework/integration/samples/oddeven/cronOddEvenDemo.xml b/getting-started/oddeven/target/classes/org/springframework/integration/samples/oddeven/cronOddEvenDemo.xml
new file mode 100644
index 00000000..eef728da
--- /dev/null
+++ b/getting-started/oddeven/target/classes/org/springframework/integration/samples/oddeven/cronOddEvenDemo.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/getting-started/oddeven/target/classes/org/springframework/integration/samples/oddeven/intervalOddEvenDemo.xml b/getting-started/oddeven/target/classes/org/springframework/integration/samples/oddeven/intervalOddEvenDemo.xml
new file mode 100644
index 00000000..a155d205
--- /dev/null
+++ b/getting-started/oddeven/target/classes/org/springframework/integration/samples/oddeven/intervalOddEvenDemo.xml
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/getting-started/oddeven/target/maven-archiver/pom.properties b/getting-started/oddeven/target/maven-archiver/pom.properties
new file mode 100644
index 00000000..3234a446
--- /dev/null
+++ b/getting-started/oddeven/target/maven-archiver/pom.properties
@@ -0,0 +1,5 @@
+#Generated by Maven
+#Sat Sep 04 08:22:31 EDT 2010
+version=2.0.0.BUILD-SNAPSHOT
+groupId=org.springframework.integration.samples
+artifactId=oddeven
diff --git a/getting-started/oddeven/target/oddeven-2.0.0.BUILD-SNAPSHOT.jar b/getting-started/oddeven/target/oddeven-2.0.0.BUILD-SNAPSHOT.jar
new file mode 100644
index 00000000..b5716e7f
Binary files /dev/null and b/getting-started/oddeven/target/oddeven-2.0.0.BUILD-SNAPSHOT.jar differ
diff --git a/getting-started/quote/.classpath b/getting-started/quote/.classpath
new file mode 100644
index 00000000..24166ba5
--- /dev/null
+++ b/getting-started/quote/.classpath
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/getting-started/quote/.project b/getting-started/quote/.project
new file mode 100644
index 00000000..bcc67949
--- /dev/null
+++ b/getting-started/quote/.project
@@ -0,0 +1,23 @@
+
+
+ quote
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.maven.ide.eclipse.maven2Builder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+ org.maven.ide.eclipse.maven2Nature
+
+
diff --git a/getting-started/quote/pom.xml b/getting-started/quote/pom.xml
new file mode 100644
index 00000000..488e3cac
--- /dev/null
+++ b/getting-started/quote/pom.xml
@@ -0,0 +1,35 @@
+
+
+ 4.0.0
+
+ org.springframework.integration.samples
+ spring-integration-samples
+ 2.0.0.BUILD-SNAPSHOT
+
+ quote
+ Spring Integration Quote Sample
+
+
+ org.springframework.integration
+ spring-integration-stream
+
+
+
+
+ repository.springframework.maven.release
+ Spring Framework Maven Release Repository
+ http://maven.springframework.org/release
+
+
+ repository.springframework.maven.milestone
+ Spring Framework Maven Milestone Repository
+ http://maven.springframework.org/milestone
+
+
+ repository.springframework.maven.snapshot
+ Spring Framework Maven Snapshot Repository
+ http://maven.springframework.org/snapshot
+
+
+
diff --git a/getting-started/quote/readme.txt b/getting-started/quote/readme.txt
new file mode 100644
index 00000000..7a5970da
--- /dev/null
+++ b/getting-started/quote/readme.txt
@@ -0,0 +1 @@
+Demonstrates stream channel adapter and poller
\ No newline at end of file
diff --git a/getting-started/quote/src/main/java/log4j.xml b/getting-started/quote/src/main/java/log4j.xml
new file mode 100644
index 00000000..3865c97d
--- /dev/null
+++ b/getting-started/quote/src/main/java/log4j.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/getting-started/quote/src/main/java/org/springframework/integration/samples/quote/Quote.java b/getting-started/quote/src/main/java/org/springframework/integration/samples/quote/Quote.java
new file mode 100644
index 00000000..d8c051c5
--- /dev/null
+++ b/getting-started/quote/src/main/java/org/springframework/integration/samples/quote/Quote.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2002-2008 the original author or authors.
+ *
+ * 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.
+ */
+
+package org.springframework.integration.samples.quote;
+
+import java.math.BigDecimal;
+
+/**
+ * @author Mark Fisher
+ */
+public class Quote {
+
+ private String ticker;
+
+ private BigDecimal price;
+
+ public Quote(String ticker, BigDecimal price) {
+ this.ticker = ticker;
+ this.price = price;
+ }
+
+ public String toString() {
+ return ticker + ": " + price;
+ }
+
+}
diff --git a/getting-started/quote/src/main/java/org/springframework/integration/samples/quote/QuoteDemo.java b/getting-started/quote/src/main/java/org/springframework/integration/samples/quote/QuoteDemo.java
new file mode 100644
index 00000000..c868dfc5
--- /dev/null
+++ b/getting-started/quote/src/main/java/org/springframework/integration/samples/quote/QuoteDemo.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2002-2010 the original author or authors.
+ *
+ * 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.
+ */
+
+package org.springframework.integration.samples.quote;
+
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+/**
+ * Demonstrates a method-invoking inbound Channel Adapter and an
+ * outbound Channel Adapter that writes to stdout. Between them
+ * is an annotated Service Activator. See QuoteService and the
+ * 'quoteDemo.xml' configuration file for more detail.
+ *
+ * @author Mark Fisher
+ */
+public class QuoteDemo {
+
+ public static void main(String[] args) {
+ new ClassPathXmlApplicationContext("quoteDemo.xml", QuoteDemo.class);
+ }
+}
diff --git a/getting-started/quote/src/main/java/org/springframework/integration/samples/quote/QuoteService.java b/getting-started/quote/src/main/java/org/springframework/integration/samples/quote/QuoteService.java
new file mode 100644
index 00000000..49af0342
--- /dev/null
+++ b/getting-started/quote/src/main/java/org/springframework/integration/samples/quote/QuoteService.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2002-2008 the original author or authors.
+ *
+ * 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.
+ */
+
+package org.springframework.integration.samples.quote;
+
+import java.math.BigDecimal;
+import java.math.RoundingMode;
+import java.util.Random;
+
+import org.springframework.integration.annotation.MessageEndpoint;
+import org.springframework.integration.annotation.ServiceActivator;
+
+/**
+ * @author Mark Fisher
+ */
+@MessageEndpoint
+public class QuoteService {
+
+ @ServiceActivator(inputChannel="tickers", outputChannel="quotes")
+ public Quote lookupQuote(String ticker) {
+ BigDecimal price = new BigDecimal(new Random().nextDouble() * 100);
+ return new Quote(ticker, price.setScale(2, RoundingMode.HALF_EVEN));
+ }
+
+}
diff --git a/getting-started/quote/src/main/java/org/springframework/integration/samples/quote/TickerStream.java b/getting-started/quote/src/main/java/org/springframework/integration/samples/quote/TickerStream.java
new file mode 100644
index 00000000..77f58dcf
--- /dev/null
+++ b/getting-started/quote/src/main/java/org/springframework/integration/samples/quote/TickerStream.java
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2002-2008 the original author or authors.
+ *
+ * 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.
+ */
+
+package org.springframework.integration.samples.quote;
+
+import java.util.Random;
+
+/**
+ * @author Mark Fisher
+ */
+public class TickerStream {
+
+ public String nextTicker() {
+ char[] chars = new char[3];
+ for (int i = 0; i < 3; i++) {
+ chars[i] = (char) (new Random().nextInt(25) + 65);
+ }
+ return new String(chars);
+ }
+
+}
diff --git a/getting-started/quote/src/main/java/org/springframework/integration/samples/quote/quoteDemo.xml b/getting-started/quote/src/main/java/org/springframework/integration/samples/quote/quoteDemo.xml
new file mode 100644
index 00000000..25c335e6
--- /dev/null
+++ b/getting-started/quote/src/main/java/org/springframework/integration/samples/quote/quoteDemo.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/getting-started/quote/target/classes/log4j.xml b/getting-started/quote/target/classes/log4j.xml
new file mode 100644
index 00000000..3865c97d
--- /dev/null
+++ b/getting-started/quote/target/classes/log4j.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/getting-started/quote/target/classes/org/springframework/integration/samples/quote/Quote.class b/getting-started/quote/target/classes/org/springframework/integration/samples/quote/Quote.class
new file mode 100644
index 00000000..a1f49d21
Binary files /dev/null and b/getting-started/quote/target/classes/org/springframework/integration/samples/quote/Quote.class differ
diff --git a/getting-started/quote/target/classes/org/springframework/integration/samples/quote/QuoteDemo.class b/getting-started/quote/target/classes/org/springframework/integration/samples/quote/QuoteDemo.class
new file mode 100644
index 00000000..50fe871d
Binary files /dev/null and b/getting-started/quote/target/classes/org/springframework/integration/samples/quote/QuoteDemo.class differ
diff --git a/getting-started/quote/target/classes/org/springframework/integration/samples/quote/QuoteService.class b/getting-started/quote/target/classes/org/springframework/integration/samples/quote/QuoteService.class
new file mode 100644
index 00000000..9159c6a5
Binary files /dev/null and b/getting-started/quote/target/classes/org/springframework/integration/samples/quote/QuoteService.class differ
diff --git a/getting-started/quote/target/classes/org/springframework/integration/samples/quote/TickerStream.class b/getting-started/quote/target/classes/org/springframework/integration/samples/quote/TickerStream.class
new file mode 100644
index 00000000..82469942
Binary files /dev/null and b/getting-started/quote/target/classes/org/springframework/integration/samples/quote/TickerStream.class differ
diff --git a/getting-started/quote/target/classes/org/springframework/integration/samples/quote/quoteDemo.xml b/getting-started/quote/target/classes/org/springframework/integration/samples/quote/quoteDemo.xml
new file mode 100644
index 00000000..25c335e6
--- /dev/null
+++ b/getting-started/quote/target/classes/org/springframework/integration/samples/quote/quoteDemo.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/getting-started/quote/target/maven-archiver/pom.properties b/getting-started/quote/target/maven-archiver/pom.properties
new file mode 100644
index 00000000..a92bde97
--- /dev/null
+++ b/getting-started/quote/target/maven-archiver/pom.properties
@@ -0,0 +1,5 @@
+#Generated by Maven
+#Sat Sep 04 08:22:31 EDT 2010
+version=2.0.0.BUILD-SNAPSHOT
+groupId=org.springframework.integration.samples
+artifactId=quote
diff --git a/getting-started/quote/target/quote-2.0.0.BUILD-SNAPSHOT.jar b/getting-started/quote/target/quote-2.0.0.BUILD-SNAPSHOT.jar
new file mode 100644
index 00000000..6cbe6fba
Binary files /dev/null and b/getting-started/quote/target/quote-2.0.0.BUILD-SNAPSHOT.jar differ
diff --git a/getting-started/readme.txt b/getting-started/readme.txt
new file mode 100644
index 00000000..e69de29b
diff --git a/getting-started/ws-inbound-gateway/.classpath b/getting-started/ws-inbound-gateway/.classpath
new file mode 100644
index 00000000..02d04a45
--- /dev/null
+++ b/getting-started/ws-inbound-gateway/.classpath
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/getting-started/ws-inbound-gateway/.project b/getting-started/ws-inbound-gateway/.project
new file mode 100644
index 00000000..bc2b2f9e
--- /dev/null
+++ b/getting-started/ws-inbound-gateway/.project
@@ -0,0 +1,48 @@
+
+
+ ws-inbound-gateway
+
+
+
+
+
+ org.eclipse.wst.jsdt.core.javascriptValidator
+
+
+
+
+ org.eclipse.wst.common.project.facet.core.builder
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.eclipse.wst.validation.validationbuilder
+
+
+
+
+ org.springframework.ide.eclipse.core.springbuilder
+
+
+
+
+ org.maven.ide.eclipse.maven2Builder
+
+
+
+
+
+ org.maven.ide.eclipse.maven2Nature
+ org.springframework.ide.eclipse.core.springnature
+ org.eclipse.jem.workbench.JavaEMFNature
+ org.eclipse.wst.common.modulecore.ModuleCoreNature
+ org.eclipse.jdt.core.javanature
+ org.eclipse.wst.common.project.facet.core.nature
+ org.eclipse.wst.jsdt.core.jsNature
+
+
diff --git a/getting-started/ws-inbound-gateway/.settings/.jsdtscope b/getting-started/ws-inbound-gateway/.settings/.jsdtscope
new file mode 100644
index 00000000..bbb8e68b
--- /dev/null
+++ b/getting-started/ws-inbound-gateway/.settings/.jsdtscope
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/getting-started/ws-inbound-gateway/.settings/org.eclipse.jdt.core.prefs b/getting-started/ws-inbound-gateway/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000..0a8f20b3
--- /dev/null
+++ b/getting-started/ws-inbound-gateway/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Fri May 28 19:45:14 CEST 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.6
diff --git a/getting-started/ws-inbound-gateway/.settings/org.eclipse.wst.common.component b/getting-started/ws-inbound-gateway/.settings/org.eclipse.wst.common.component
new file mode 100644
index 00000000..860f1e3b
--- /dev/null
+++ b/getting-started/ws-inbound-gateway/.settings/org.eclipse.wst.common.component
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/getting-started/ws-inbound-gateway/.settings/org.eclipse.wst.common.project.facet.core.xml b/getting-started/ws-inbound-gateway/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 00000000..13ac87e9
--- /dev/null
+++ b/getting-started/ws-inbound-gateway/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/getting-started/ws-inbound-gateway/.settings/org.eclipse.wst.jsdt.ui.superType.container b/getting-started/ws-inbound-gateway/.settings/org.eclipse.wst.jsdt.ui.superType.container
new file mode 100644
index 00000000..3bd5d0a4
--- /dev/null
+++ b/getting-started/ws-inbound-gateway/.settings/org.eclipse.wst.jsdt.ui.superType.container
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
diff --git a/getting-started/ws-inbound-gateway/.settings/org.eclipse.wst.jsdt.ui.superType.name b/getting-started/ws-inbound-gateway/.settings/org.eclipse.wst.jsdt.ui.superType.name
new file mode 100644
index 00000000..05bd71b6
--- /dev/null
+++ b/getting-started/ws-inbound-gateway/.settings/org.eclipse.wst.jsdt.ui.superType.name
@@ -0,0 +1 @@
+Window
\ No newline at end of file
diff --git a/getting-started/ws-inbound-gateway/.settings/org.maven.ide.eclipse.prefs b/getting-started/ws-inbound-gateway/.settings/org.maven.ide.eclipse.prefs
new file mode 100644
index 00000000..3555c415
--- /dev/null
+++ b/getting-started/ws-inbound-gateway/.settings/org.maven.ide.eclipse.prefs
@@ -0,0 +1,9 @@
+#Wed Jul 28 12:38:49 EDT 2010
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=false
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
diff --git a/getting-started/ws-inbound-gateway/.settings/org.springframework.ide.eclipse.beans.core.prefs b/getting-started/ws-inbound-gateway/.settings/org.springframework.ide.eclipse.beans.core.prefs
new file mode 100644
index 00000000..f53abcb2
--- /dev/null
+++ b/getting-started/ws-inbound-gateway/.settings/org.springframework.ide.eclipse.beans.core.prefs
@@ -0,0 +1,4 @@
+#Fri Feb 26 15:19:13 PST 2010
+eclipse.preferences.version=1
+org.springframework.ide.eclipse.beans.core.ignoreMissingNamespaceHandler=false
+org.springframework.ide.eclipse.beans.core.loadNamespaceHandlerFromClasspath=false
diff --git a/getting-started/ws-inbound-gateway/.springBeans b/getting-started/ws-inbound-gateway/.springBeans
new file mode 100644
index 00000000..15608f30
--- /dev/null
+++ b/getting-started/ws-inbound-gateway/.springBeans
@@ -0,0 +1,13 @@
+
+
+ 1
+
+
+
+
+
+
+
+
+
+
diff --git a/getting-started/ws-inbound-gateway/README.txt b/getting-started/ws-inbound-gateway/README.txt
new file mode 100644
index 00000000..7632d648
--- /dev/null
+++ b/getting-started/ws-inbound-gateway/README.txt
@@ -0,0 +1,10 @@
+This sample demonstrates a barebones inbound Web Service Gateway. Take a look at "web.xml" in the WEB-INF directory where the Spring Web Services Message-dispatching Servlet is defined. Then have a look at the "spring-ws-config.xml" file (also in the WEB-INF directory) where the Spring WS EndpointMapping is defined. Finally view the Spring Integration configuration in the "inbound-gateway-config.xml" file within the "org.springframework.integration.samples.ws" package where the actual gateway is defined along with a channel and service-activator.
+
+To use the gateway, you can run the tests that are located within the "src/test/java" directory. One is for standalone testing of the gateway itself, while the other tests the gateway running on a web server. The latter uses Spring Web Services' client-side support. Alternatively, you can simply start the server, and then send invocations with any standalone HTTP client testing tool. The request format should be similar to the following and should be POSTed to the service URL (e.g. http://localhost:8080/ws-inbound-gateway/echoservice):
+
+
+
+
+hello
+
+
diff --git a/getting-started/ws-inbound-gateway/pom.xml b/getting-started/ws-inbound-gateway/pom.xml
new file mode 100644
index 00000000..a885157b
--- /dev/null
+++ b/getting-started/ws-inbound-gateway/pom.xml
@@ -0,0 +1,74 @@
+
+
+ 4.0.0
+
+ org.springframework.integration.samples
+ spring-integration-samples
+ 2.0.0.BUILD-SNAPSHOT
+
+ ws-inbound-gateway
+ Spring Integration WS Inbound Gateway Sample
+ war
+
+
+ org.springframework.integration
+ spring-integration-xml
+
+
+ org.springframework.integration
+ spring-integration-ws
+
+
+
+ junit
+ junit
+
+
+ org.springframework
+ spring-test
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+ 1.5
+ 1.5
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+
+
+ **/*Tests.java
+
+
+
+ **/InContainerTests.java
+
+
+
+
+
+
+
+ repository.springframework.maven.release
+ Spring Framework Maven Release Repository
+ http://maven.springframework.org/release
+
+
+ repository.springframework.maven.milestone
+ Spring Framework Maven Milestone Repository
+ http://maven.springframework.org/milestone
+
+
+ repository.springframework.maven.snapshot
+ Spring Framework Maven Snapshot Repository
+ http://maven.springframework.org/snapshot
+
+
+
diff --git a/getting-started/ws-inbound-gateway/src/main/java/log4j.dtd b/getting-started/ws-inbound-gateway/src/main/java/log4j.dtd
new file mode 100644
index 00000000..d92a6e7b
--- /dev/null
+++ b/getting-started/ws-inbound-gateway/src/main/java/log4j.dtd
@@ -0,0 +1,166 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/getting-started/ws-inbound-gateway/src/main/java/log4j.xml b/getting-started/ws-inbound-gateway/src/main/java/log4j.xml
new file mode 100644
index 00000000..cf78c080
--- /dev/null
+++ b/getting-started/ws-inbound-gateway/src/main/java/log4j.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/getting-started/ws-inbound-gateway/src/main/java/org/springframework/integration/samples/ws/SimpleEchoResponder.java b/getting-started/ws-inbound-gateway/src/main/java/org/springframework/integration/samples/ws/SimpleEchoResponder.java
new file mode 100644
index 00000000..13c5bfb9
--- /dev/null
+++ b/getting-started/ws-inbound-gateway/src/main/java/org/springframework/integration/samples/ws/SimpleEchoResponder.java
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2002-2010 the original author or authors.
+ *
+ * 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.
+ */
+
+package org.springframework.integration.samples.ws;
+
+import javax.xml.transform.Source;
+import javax.xml.transform.dom.DOMSource;
+
+import org.springframework.integration.xml.source.DomSourceFactory;
+
+public class SimpleEchoResponder {
+
+ public Source issueResponseFor(DOMSource request) {
+ return new DomSourceFactory().createSource(
+ "" +
+ request.getNode().getTextContent() + "");
+ }
+}
diff --git a/getting-started/ws-inbound-gateway/src/main/java/org/springframework/integration/samples/ws/inbound-gateway-config.xml b/getting-started/ws-inbound-gateway/src/main/java/org/springframework/integration/samples/ws/inbound-gateway-config.xml
new file mode 100644
index 00000000..8c0644df
--- /dev/null
+++ b/getting-started/ws-inbound-gateway/src/main/java/org/springframework/integration/samples/ws/inbound-gateway-config.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/getting-started/ws-inbound-gateway/src/main/webapp/WEB-INF/spring-ws-config.xml b/getting-started/ws-inbound-gateway/src/main/webapp/WEB-INF/spring-ws-config.xml
new file mode 100644
index 00000000..05dea196
--- /dev/null
+++ b/getting-started/ws-inbound-gateway/src/main/webapp/WEB-INF/spring-ws-config.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/getting-started/ws-inbound-gateway/src/main/webapp/WEB-INF/web.xml b/getting-started/ws-inbound-gateway/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 00000000..e7321385
--- /dev/null
+++ b/getting-started/ws-inbound-gateway/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,24 @@
+
+
+ ws:inbound-gateway sample
+
+
+ spring-ws
+ org.springframework.ws.transport.http.MessageDispatcherServlet
+
+ contextConfigLocation
+ WEB-INF/spring-ws-config.xml
+
+ 1
+
+
+
+ spring-ws
+ /echoservice
+
+
+
+ index.html
+
+
+
diff --git a/getting-started/ws-inbound-gateway/src/main/webapp/index.html b/getting-started/ws-inbound-gateway/src/main/webapp/index.html
new file mode 100644
index 00000000..54436ec8
--- /dev/null
+++ b/getting-started/ws-inbound-gateway/src/main/webapp/index.html
@@ -0,0 +1 @@
+The web service has been successfully deployed. You may now issue SOAP requests. See included JUnit tests for examples.
\ No newline at end of file
diff --git a/getting-started/ws-inbound-gateway/src/test/java/org/springframework/integration/samples/ws/InContainerTests.java b/getting-started/ws-inbound-gateway/src/test/java/org/springframework/integration/samples/ws/InContainerTests.java
new file mode 100644
index 00000000..c01140b8
--- /dev/null
+++ b/getting-started/ws-inbound-gateway/src/test/java/org/springframework/integration/samples/ws/InContainerTests.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright 2002-2010 the original author or authors.
+ *
+ * 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.
+ */
+
+package org.springframework.integration.samples.ws;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.junit.Assert.assertThat;
+
+import javax.xml.transform.Source;
+
+import org.junit.Test;
+
+import org.springframework.ws.client.core.WebServiceTemplate;
+import org.springframework.xml.transform.StringResult;
+import org.springframework.xml.transform.StringSource;
+
+/**
+ * System tests ensuring the Spring WS MessageDispatcherServlet is correctly
+ * set up and configured to delegate incoming requests to our ws:inbound-gateway.
+ *
+ * Use 'mvn package' to create a war file for this project, then deploy before
+ * attempting to run this test.
+ *
+ * @author Chris Beams
+ */
+public class InContainerTests {
+
+ private static final String WS_URI = "http://localhost:8080/ws-inbound-gateway/echoservice";
+ private final WebServiceTemplate template = new WebServiceTemplate();
+
+ @Test
+ public void testWebServiceRequestAndResponse() {
+ StringResult result = new StringResult();
+ Source payload = new StringSource(
+ "" +
+ "hello");
+
+ template.sendSourceAndReceiveToResult(WS_URI, payload, result);
+
+ assertThat(result.toString(), equalTo(
+ "" +
+ "hello"));
+ }
+}
diff --git a/getting-started/ws-inbound-gateway/src/test/java/org/springframework/integration/samples/ws/InboundGatewayTests.java b/getting-started/ws-inbound-gateway/src/test/java/org/springframework/integration/samples/ws/InboundGatewayTests.java
new file mode 100644
index 00000000..af9915c5
--- /dev/null
+++ b/getting-started/ws-inbound-gateway/src/test/java/org/springframework/integration/samples/ws/InboundGatewayTests.java
@@ -0,0 +1,84 @@
+/*
+ * Copyright 2002-2010 the original author or authors.
+ *
+ * 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.
+ */
+
+package org.springframework.integration.samples.ws;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.assertThat;
+
+import java.io.StringReader;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.xml.sax.InputSource;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.integration.ws.SimpleWebServiceInboundGateway;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+import org.springframework.ws.context.DefaultMessageContext;
+import org.springframework.ws.context.MessageContext;
+import org.springframework.ws.pox.dom.DomPoxMessage;
+import org.springframework.ws.pox.dom.DomPoxMessageFactory;
+
+/**
+ * Out-of-container tests for ws:inbound-gateway message processing.
+ *
+ * @author Chris Beams
+ * @author Mark Fisher
+ */
+@ContextConfiguration("inbound-gateway-config.xml")
+@RunWith(SpringJUnit4ClassRunner.class)
+public class InboundGatewayTests {
+
+ @Autowired
+ private SimpleWebServiceInboundGateway gateway;
+
+ /**
+ * Emulate the Spring WS MessageDispatcherServlet by calling the gateway
+ * with a DOMSource object representing the payload of the original SOAP
+ * 'echoRequest' message. Expect an 'echoResponse' DOMSource object
+ * to be returned in synchronous fashion, which the MessageDispatcherServlet
+ * would in turn wrap in a SOAP envelope and return to the client.
+ */
+ @Test
+ public void testSendAndReceive() throws Exception {
+ String xml = "hello";
+ DomPoxMessageFactory messageFactory = new DomPoxMessageFactory();
+ DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();
+ documentBuilderFactory.setNamespaceAware(true);
+ DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
+ Document document = documentBuilder.parse(new InputSource(new StringReader(xml)));
+ Transformer transformer = TransformerFactory.newInstance().newTransformer();
+ DomPoxMessage request = new DomPoxMessage(document, transformer, "text/xml");
+ MessageContext messageContext = new DefaultMessageContext(request, messageFactory);
+ gateway.invoke(messageContext);
+ Object reply = messageContext.getResponse().getPayloadSource();
+ assertThat(reply, is(DOMSource.class));
+ DOMSource replySource = (DOMSource) reply;
+ Element element = (Element) replySource.getNode().getFirstChild();
+ assertThat(element.getTagName(), equalTo("echoResponse"));
+ }
+}
diff --git a/getting-started/ws-inbound-gateway/target/classes/log4j.dtd b/getting-started/ws-inbound-gateway/target/classes/log4j.dtd
new file mode 100644
index 00000000..d92a6e7b
--- /dev/null
+++ b/getting-started/ws-inbound-gateway/target/classes/log4j.dtd
@@ -0,0 +1,166 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/getting-started/ws-inbound-gateway/target/classes/log4j.xml b/getting-started/ws-inbound-gateway/target/classes/log4j.xml
new file mode 100644
index 00000000..cf78c080
--- /dev/null
+++ b/getting-started/ws-inbound-gateway/target/classes/log4j.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/getting-started/ws-inbound-gateway/target/classes/org/springframework/integration/samples/ws/SimpleEchoResponder.class b/getting-started/ws-inbound-gateway/target/classes/org/springframework/integration/samples/ws/SimpleEchoResponder.class
new file mode 100644
index 00000000..a72bd1bd
Binary files /dev/null and b/getting-started/ws-inbound-gateway/target/classes/org/springframework/integration/samples/ws/SimpleEchoResponder.class differ
diff --git a/getting-started/ws-inbound-gateway/target/classes/org/springframework/integration/samples/ws/inbound-gateway-config.xml b/getting-started/ws-inbound-gateway/target/classes/org/springframework/integration/samples/ws/inbound-gateway-config.xml
new file mode 100644
index 00000000..8c0644df
--- /dev/null
+++ b/getting-started/ws-inbound-gateway/target/classes/org/springframework/integration/samples/ws/inbound-gateway-config.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/getting-started/ws-inbound-gateway/target/maven-archiver/pom.properties b/getting-started/ws-inbound-gateway/target/maven-archiver/pom.properties
new file mode 100644
index 00000000..3f7ba89b
--- /dev/null
+++ b/getting-started/ws-inbound-gateway/target/maven-archiver/pom.properties
@@ -0,0 +1,5 @@
+#Generated by Maven
+#Sat Sep 04 08:22:36 EDT 2010
+version=2.0.0.BUILD-SNAPSHOT
+groupId=org.springframework.integration.samples
+artifactId=ws-inbound-gateway
diff --git a/getting-started/ws-inbound-gateway/target/surefire-reports/TEST-org.springframework.integration.samples.ws.InboundGatewayTests.xml b/getting-started/ws-inbound-gateway/target/surefire-reports/TEST-org.springframework.integration.samples.ws.InboundGatewayTests.xml
new file mode 100644
index 00000000..51efa7f7
--- /dev/null
+++ b/getting-started/ws-inbound-gateway/target/surefire-reports/TEST-org.springframework.integration.samples.ws.InboundGatewayTests.xml
@@ -0,0 +1,65 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/getting-started/ws-inbound-gateway/target/test-classes/org/springframework/integration/samples/ws/InContainerTests.class b/getting-started/ws-inbound-gateway/target/test-classes/org/springframework/integration/samples/ws/InContainerTests.class
new file mode 100644
index 00000000..f0b93459
Binary files /dev/null and b/getting-started/ws-inbound-gateway/target/test-classes/org/springframework/integration/samples/ws/InContainerTests.class differ
diff --git a/getting-started/ws-inbound-gateway/target/test-classes/org/springframework/integration/samples/ws/InboundGatewayTests.class b/getting-started/ws-inbound-gateway/target/test-classes/org/springframework/integration/samples/ws/InboundGatewayTests.class
new file mode 100644
index 00000000..c4af3fa4
Binary files /dev/null and b/getting-started/ws-inbound-gateway/target/test-classes/org/springframework/integration/samples/ws/InboundGatewayTests.class differ
diff --git a/getting-started/ws-inbound-gateway/target/war/work/webapp-cache.xml b/getting-started/ws-inbound-gateway/target/war/work/webapp-cache.xml
new file mode 100644
index 00000000..741f33ec
--- /dev/null
+++ b/getting-started/ws-inbound-gateway/target/war/work/webapp-cache.xml
@@ -0,0 +1,86 @@
+
+
+
+ currentBuild
+
+
+ index.html
+ WEB-INF/spring-ws-config.xml
+ WEB-INF/web.xml
+ WEB-INF/classes/log4j.dtd
+ WEB-INF/classes/log4j.xml
+ WEB-INF/classes/org/springframework/integration/samples/ws/inbound-gateway-config.xml
+ WEB-INF/classes/org/springframework/integration/samples/ws/SimpleEchoResponder.class
+ WEB-INF/lib/spring-integration-xml-2.0.0.BUILD-SNAPSHOT.jar
+ WEB-INF/lib/spring-context-3.0.3.RELEASE.jar
+ WEB-INF/lib/spring-aop-3.0.3.RELEASE.jar
+ WEB-INF/lib/aopalliance-1.0.jar
+ WEB-INF/lib/spring-asm-3.0.3.RELEASE.jar
+ WEB-INF/lib/spring-beans-3.0.3.RELEASE.jar
+ WEB-INF/lib/spring-core-3.0.3.RELEASE.jar
+ WEB-INF/lib/commons-logging-1.1.1.jar
+ WEB-INF/lib/spring-expression-3.0.3.RELEASE.jar
+ WEB-INF/lib/spring-integration-core-2.0.0.BUILD-SNAPSHOT.jar
+ WEB-INF/lib/spring-tx-3.0.3.RELEASE.jar
+ WEB-INF/lib/spring-oxm-3.0.3.RELEASE.jar
+ WEB-INF/lib/spring-xml-1.5.9.jar
+ WEB-INF/lib/spring-integration-ws-2.0.0.BUILD-SNAPSHOT.jar
+ WEB-INF/lib/spring-ws-core-1.5.9.jar
+ WEB-INF/lib/spring-oxm-1.5.9.jar
+ WEB-INF/lib/spring-web-3.0.3.RELEASE.jar
+ WEB-INF/lib/spring-webmvc-3.0.3.RELEASE.jar
+ WEB-INF/lib/spring-context-support-3.0.3.RELEASE.jar
+ WEB-INF/lib/wsdl4j-1.6.1.jar
+
+
+
+
+
+
+
+ org.springframework.integration
+ spring-integration-xml
+ 2.0.0.BUILD-SNAPSHOT
+ jar
+ compile
+
+ false
+
+ spring-integration-xml-2.0.0.BUILD-SNAPSHOT.jar
+
+
+
+ org.springframework.integration
+ spring-integration-ws
+ 2.0.0.BUILD-SNAPSHOT
+ jar
+ compile
+
+ false
+
+ spring-integration-ws-2.0.0.BUILD-SNAPSHOT.jar
+
+
+
+ junit
+ junit
+ 4.7
+ jar
+ test
+
+ false
+
+
+
+
+ org.springframework
+ spring-test
+ 3.0.3.RELEASE
+ jar
+ test
+
+ false
+
+
+
+
\ No newline at end of file
diff --git a/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT.war b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT.war
new file mode 100644
index 00000000..1d8106ff
Binary files /dev/null and b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT.war differ
diff --git a/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/classes/log4j.dtd b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/classes/log4j.dtd
new file mode 100644
index 00000000..d92a6e7b
--- /dev/null
+++ b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/classes/log4j.dtd
@@ -0,0 +1,166 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/classes/log4j.xml b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/classes/log4j.xml
new file mode 100644
index 00000000..cf78c080
--- /dev/null
+++ b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/classes/log4j.xml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/classes/org/springframework/integration/samples/ws/SimpleEchoResponder.class b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/classes/org/springframework/integration/samples/ws/SimpleEchoResponder.class
new file mode 100644
index 00000000..ec7a4997
Binary files /dev/null and b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/classes/org/springframework/integration/samples/ws/SimpleEchoResponder.class differ
diff --git a/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/classes/org/springframework/integration/samples/ws/inbound-gateway-config.xml b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/classes/org/springframework/integration/samples/ws/inbound-gateway-config.xml
new file mode 100644
index 00000000..8c0644df
--- /dev/null
+++ b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/classes/org/springframework/integration/samples/ws/inbound-gateway-config.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/aopalliance-1.0.jar b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/aopalliance-1.0.jar
new file mode 100644
index 00000000..578b1a0c
Binary files /dev/null and b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/aopalliance-1.0.jar differ
diff --git a/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/commons-logging-1.1.1.jar b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/commons-logging-1.1.1.jar
new file mode 100644
index 00000000..1deef144
Binary files /dev/null and b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/commons-logging-1.1.1.jar differ
diff --git a/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-aop-3.0.3.RELEASE.jar b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-aop-3.0.3.RELEASE.jar
new file mode 100644
index 00000000..7a78f04b
Binary files /dev/null and b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-aop-3.0.3.RELEASE.jar differ
diff --git a/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-asm-3.0.3.RELEASE.jar b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-asm-3.0.3.RELEASE.jar
new file mode 100644
index 00000000..71a389dc
Binary files /dev/null and b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-asm-3.0.3.RELEASE.jar differ
diff --git a/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-beans-3.0.3.RELEASE.jar b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-beans-3.0.3.RELEASE.jar
new file mode 100644
index 00000000..82cb2bc0
Binary files /dev/null and b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-beans-3.0.3.RELEASE.jar differ
diff --git a/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-context-3.0.3.RELEASE.jar b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-context-3.0.3.RELEASE.jar
new file mode 100644
index 00000000..1f94999a
Binary files /dev/null and b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-context-3.0.3.RELEASE.jar differ
diff --git a/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-context-support-3.0.3.RELEASE.jar b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-context-support-3.0.3.RELEASE.jar
new file mode 100644
index 00000000..bcc0e6ab
Binary files /dev/null and b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-context-support-3.0.3.RELEASE.jar differ
diff --git a/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-core-3.0.3.RELEASE.jar b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-core-3.0.3.RELEASE.jar
new file mode 100644
index 00000000..7792a5f9
Binary files /dev/null and b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-core-3.0.3.RELEASE.jar differ
diff --git a/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-expression-3.0.3.RELEASE.jar b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-expression-3.0.3.RELEASE.jar
new file mode 100644
index 00000000..1989503a
Binary files /dev/null and b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-expression-3.0.3.RELEASE.jar differ
diff --git a/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-integration-core-2.0.0.BUILD-SNAPSHOT.jar b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-integration-core-2.0.0.BUILD-SNAPSHOT.jar
new file mode 100644
index 00000000..b0505454
Binary files /dev/null and b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-integration-core-2.0.0.BUILD-SNAPSHOT.jar differ
diff --git a/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-integration-ws-2.0.0.BUILD-SNAPSHOT.jar b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-integration-ws-2.0.0.BUILD-SNAPSHOT.jar
new file mode 100644
index 00000000..3fcd8db5
Binary files /dev/null and b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-integration-ws-2.0.0.BUILD-SNAPSHOT.jar differ
diff --git a/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-integration-xml-2.0.0.BUILD-SNAPSHOT.jar b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-integration-xml-2.0.0.BUILD-SNAPSHOT.jar
new file mode 100644
index 00000000..4d09d846
Binary files /dev/null and b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-integration-xml-2.0.0.BUILD-SNAPSHOT.jar differ
diff --git a/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-oxm-1.5.9.jar b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-oxm-1.5.9.jar
new file mode 100644
index 00000000..fc474689
Binary files /dev/null and b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-oxm-1.5.9.jar differ
diff --git a/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-oxm-3.0.3.RELEASE.jar b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-oxm-3.0.3.RELEASE.jar
new file mode 100644
index 00000000..5d58154e
Binary files /dev/null and b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-oxm-3.0.3.RELEASE.jar differ
diff --git a/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-tx-3.0.3.RELEASE.jar b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-tx-3.0.3.RELEASE.jar
new file mode 100644
index 00000000..8ef75383
Binary files /dev/null and b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-tx-3.0.3.RELEASE.jar differ
diff --git a/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-web-3.0.3.RELEASE.jar b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-web-3.0.3.RELEASE.jar
new file mode 100644
index 00000000..dd25a7d6
Binary files /dev/null and b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-web-3.0.3.RELEASE.jar differ
diff --git a/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-webmvc-3.0.3.RELEASE.jar b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-webmvc-3.0.3.RELEASE.jar
new file mode 100644
index 00000000..65a972f8
Binary files /dev/null and b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-webmvc-3.0.3.RELEASE.jar differ
diff --git a/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-ws-core-1.5.9.jar b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-ws-core-1.5.9.jar
new file mode 100644
index 00000000..9f0496b2
Binary files /dev/null and b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-ws-core-1.5.9.jar differ
diff --git a/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-xml-1.5.9.jar b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-xml-1.5.9.jar
new file mode 100644
index 00000000..bff34944
Binary files /dev/null and b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/spring-xml-1.5.9.jar differ
diff --git a/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/wsdl4j-1.6.1.jar b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/wsdl4j-1.6.1.jar
new file mode 100644
index 00000000..67a35fcb
Binary files /dev/null and b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/lib/wsdl4j-1.6.1.jar differ
diff --git a/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/spring-ws-config.xml b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/spring-ws-config.xml
new file mode 100644
index 00000000..05dea196
--- /dev/null
+++ b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/spring-ws-config.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/web.xml b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/web.xml
new file mode 100644
index 00000000..e7321385
--- /dev/null
+++ b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/WEB-INF/web.xml
@@ -0,0 +1,24 @@
+
+
+ ws:inbound-gateway sample
+
+
+ spring-ws
+ org.springframework.ws.transport.http.MessageDispatcherServlet
+
+ contextConfigLocation
+ WEB-INF/spring-ws-config.xml
+
+ 1
+
+
+
+ spring-ws
+ /echoservice
+
+
+
+ index.html
+
+
+
diff --git a/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/index.html b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/index.html
new file mode 100644
index 00000000..54436ec8
--- /dev/null
+++ b/getting-started/ws-inbound-gateway/target/ws-inbound-gateway-2.0.0.BUILD-SNAPSHOT/index.html
@@ -0,0 +1 @@
+The web service has been successfully deployed. You may now issue SOAP requests. See included JUnit tests for examples.
\ No newline at end of file
diff --git a/getting-started/ws-outbound-gateway/.classpath b/getting-started/ws-outbound-gateway/.classpath
new file mode 100644
index 00000000..24166ba5
--- /dev/null
+++ b/getting-started/ws-outbound-gateway/.classpath
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/getting-started/ws-outbound-gateway/.project b/getting-started/ws-outbound-gateway/.project
new file mode 100644
index 00000000..9730b83f
--- /dev/null
+++ b/getting-started/ws-outbound-gateway/.project
@@ -0,0 +1,23 @@
+
+
+ ws-outbound-gateway
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.maven.ide.eclipse.maven2Builder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+ org.maven.ide.eclipse.maven2Nature
+
+
diff --git a/getting-started/ws-outbound-gateway/pom.xml b/getting-started/ws-outbound-gateway/pom.xml
new file mode 100644
index 00000000..f3b0d177
--- /dev/null
+++ b/getting-started/ws-outbound-gateway/pom.xml
@@ -0,0 +1,49 @@
+
+
+ 4.0.0
+
+ org.springframework.integration.samples
+ spring-integration-samples
+ 2.0.0.BUILD-SNAPSHOT
+
+ ws-outbound-gateway
+ Spring Integration WS Outbound Gateway Sample
+
+
+ com.sun.xml.messaging.saaj
+ saaj-impl
+ 1.3
+
+
+ javax.activation
+ activation
+ 1.1.1
+
+
+ org.springframework.integration
+ spring-integration-stream
+
+
+ org.springframework.integration
+ spring-integration-ws
+
+
+
+
+ repository.springframework.maven.release
+ Spring Framework Maven Release Repository
+ http://maven.springframework.org/release
+
+
+ repository.springframework.maven.milestone
+ Spring Framework Maven Milestone Repository
+ http://maven.springframework.org/milestone
+
+
+ repository.springframework.maven.snapshot
+ Spring Framework Maven Snapshot Repository
+ http://maven.springframework.org/snapshot
+
+
+
diff --git a/getting-started/ws-outbound-gateway/src/main/java/log4j.xml b/getting-started/ws-outbound-gateway/src/main/java/log4j.xml
new file mode 100644
index 00000000..6cb1544e
--- /dev/null
+++ b/getting-started/ws-outbound-gateway/src/main/java/log4j.xml
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/getting-started/ws-outbound-gateway/src/main/java/org/springframework/integration/samples/ws/WebServiceDemo.java b/getting-started/ws-outbound-gateway/src/main/java/org/springframework/integration/samples/ws/WebServiceDemo.java
new file mode 100644
index 00000000..93bb6654
--- /dev/null
+++ b/getting-started/ws-outbound-gateway/src/main/java/org/springframework/integration/samples/ws/WebServiceDemo.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2002-2010 the original author or authors.
+ *
+ * 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.
+ */
+
+package org.springframework.integration.samples.ws;
+
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+import org.springframework.integration.Message;
+import org.springframework.integration.MessageChannel;
+import org.springframework.integration.support.MessageBuilder;
+import org.springframework.integration.support.channel.BeanFactoryChannelResolver;
+import org.springframework.integration.support.channel.ChannelResolver;
+
+/**
+ * Demonstrates a web service invocation through a Web Service outbound Gateway.
+ * A header-enricher provides the Soap Action prior to invocation. See the
+ * 'temperatureConversion.xml' configuration file for more detail.
+ *
+ * @author Marius Bogoevici
+ */
+public class WebServiceDemo {
+
+ public static void main(String[] args) {
+ ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("temperatureConversion.xml", WebServiceDemo.class);
+ ChannelResolver channelResolver = new BeanFactoryChannelResolver(context);
+
+ // Compose the XML message according to the server's schema
+ String requestXml =
+ "" +
+ " 90.0" +
+ "";
+
+ // Create the Message object
+ Message message = MessageBuilder.withPayload(requestXml).build();
+
+ // Send the Message to the handler's input channel
+ MessageChannel channel = channelResolver.resolveChannelName("fahrenheitChannel");
+ channel.send(message);
+ }
+
+}
diff --git a/getting-started/ws-outbound-gateway/src/main/java/org/springframework/integration/samples/ws/temperatureConversion.xml b/getting-started/ws-outbound-gateway/src/main/java/org/springframework/integration/samples/ws/temperatureConversion.xml
new file mode 100644
index 00000000..e6a3c495
--- /dev/null
+++ b/getting-started/ws-outbound-gateway/src/main/java/org/springframework/integration/samples/ws/temperatureConversion.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/getting-started/ws-outbound-gateway/target/classes/log4j.xml b/getting-started/ws-outbound-gateway/target/classes/log4j.xml
new file mode 100644
index 00000000..6cb1544e
--- /dev/null
+++ b/getting-started/ws-outbound-gateway/target/classes/log4j.xml
@@ -0,0 +1,36 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/getting-started/ws-outbound-gateway/target/classes/org/springframework/integration/samples/ws/WebServiceDemo.class b/getting-started/ws-outbound-gateway/target/classes/org/springframework/integration/samples/ws/WebServiceDemo.class
new file mode 100644
index 00000000..b05c0328
Binary files /dev/null and b/getting-started/ws-outbound-gateway/target/classes/org/springframework/integration/samples/ws/WebServiceDemo.class differ
diff --git a/getting-started/ws-outbound-gateway/target/classes/org/springframework/integration/samples/ws/temperatureConversion.xml b/getting-started/ws-outbound-gateway/target/classes/org/springframework/integration/samples/ws/temperatureConversion.xml
new file mode 100644
index 00000000..e6a3c495
--- /dev/null
+++ b/getting-started/ws-outbound-gateway/target/classes/org/springframework/integration/samples/ws/temperatureConversion.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/getting-started/ws-outbound-gateway/target/maven-archiver/pom.properties b/getting-started/ws-outbound-gateway/target/maven-archiver/pom.properties
new file mode 100644
index 00000000..6d09df5a
--- /dev/null
+++ b/getting-started/ws-outbound-gateway/target/maven-archiver/pom.properties
@@ -0,0 +1,5 @@
+#Generated by Maven
+#Sat Sep 04 08:22:37 EDT 2010
+version=2.0.0.BUILD-SNAPSHOT
+groupId=org.springframework.integration.samples
+artifactId=ws-outbound-gateway
diff --git a/getting-started/ws-outbound-gateway/target/ws-outbound-gateway-2.0.0.BUILD-SNAPSHOT.jar b/getting-started/ws-outbound-gateway/target/ws-outbound-gateway-2.0.0.BUILD-SNAPSHOT.jar
new file mode 100644
index 00000000..eb98e440
Binary files /dev/null and b/getting-started/ws-outbound-gateway/target/ws-outbound-gateway-2.0.0.BUILD-SNAPSHOT.jar differ
diff --git a/getting-started/xml/.classpath b/getting-started/xml/.classpath
new file mode 100644
index 00000000..24166ba5
--- /dev/null
+++ b/getting-started/xml/.classpath
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/getting-started/xml/.project b/getting-started/xml/.project
new file mode 100644
index 00000000..ccdada11
--- /dev/null
+++ b/getting-started/xml/.project
@@ -0,0 +1,23 @@
+
+
+ xml
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.maven.ide.eclipse.maven2Builder
+
+
+
+
+
+ org.eclipse.jdt.core.javanature
+ org.maven.ide.eclipse.maven2Nature
+
+
diff --git a/getting-started/xml/.settings/org.eclipse.jdt.core.prefs b/getting-started/xml/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000..74d312fc
--- /dev/null
+++ b/getting-started/xml/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,6 @@
+#Fri May 28 19:45:26 CEST 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/getting-started/xml/.settings/org.maven.ide.eclipse.prefs b/getting-started/xml/.settings/org.maven.ide.eclipse.prefs
new file mode 100644
index 00000000..22182451
--- /dev/null
+++ b/getting-started/xml/.settings/org.maven.ide.eclipse.prefs
@@ -0,0 +1,9 @@
+#Tue Jun 30 15:22:48 EDT 2009
+activeProfiles=
+eclipse.preferences.version=1
+fullBuildGoals=process-test-resources
+includeModules=false
+resolveWorkspaceProjects=true
+resourceFilterGoals=process-resources resources\:testResources
+skipCompilerPlugin=true
+version=1
diff --git a/getting-started/xml/pom.xml b/getting-started/xml/pom.xml
new file mode 100644
index 00000000..c054a1fb
--- /dev/null
+++ b/getting-started/xml/pom.xml
@@ -0,0 +1,35 @@
+
+
+ 4.0.0
+
+ org.springframework.integration.samples
+ spring-integration-samples
+ 2.0.0.BUILD-SNAPSHOT
+
+ xml
+ Spring Integration XML Sample
+
+
+ org.springframework.integration
+ spring-integration-xml
+
+
+
+
+ repository.springframework.maven.release
+ Spring Framework Maven Release Repository
+ http://maven.springframework.org/release
+
+
+ repository.springframework.maven.milestone
+ Spring Framework Maven Milestone Repository
+ http://maven.springframework.org/milestone
+
+
+ repository.springframework.maven.snapshot
+ Spring Framework Maven Snapshot Repository
+ http://maven.springframework.org/snapshot
+
+
+
diff --git a/getting-started/xml/src/main/java/log4j.xml b/getting-started/xml/src/main/java/log4j.xml
new file mode 100644
index 00000000..da6411c7
--- /dev/null
+++ b/getting-started/xml/src/main/java/log4j.xml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/getting-started/xml/src/main/java/org/springframework/integration/samples/xml/BookOrderProcessingSample.java b/getting-started/xml/src/main/java/org/springframework/integration/samples/xml/BookOrderProcessingSample.java
new file mode 100644
index 00000000..a53ccd36
--- /dev/null
+++ b/getting-started/xml/src/main/java/org/springframework/integration/samples/xml/BookOrderProcessingSample.java
@@ -0,0 +1,74 @@
+/*
+ * Copyright 2002-2010 the original author or authors.
+ *
+ * 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.
+ */
+
+package org.springframework.integration.samples.xml;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.w3c.dom.Document;
+
+import org.springframework.context.support.AbstractApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+import org.springframework.core.io.ClassPathResource;
+import org.springframework.core.io.Resource;
+import org.springframework.integration.MessageChannel;
+import org.springframework.integration.message.GenericMessage;
+
+/**
+ * This example demonstrates the processing of an order for books using
+ * several of the components provided by the Spring Integration Xml
+ * module for dealing with Xml payloads. This includes:
+ *
+ *
+ *
an XPath based implementation of the splitter pattern to split an
+ * order with multiple items into several order messages for separate
+ * processing.
+ *
XPath expression namespace support to build an XPath expression to
+ * extract the isbn from each order item.
+ *
an XPath router implementation to route messages according to the
+ * evaluation of an XPath expression which tests to see if the order item is in
+ * stock.
+ *
an XSLT transformer implementation to transform the payload of the
+ * order message into a resupply message where the order item is found to be
+ * out of stock.
+ *
+ *
+ * @author Jonas Partner
+ */
+public class BookOrderProcessingSample {
+
+ public static void main(String[] args) throws Exception {
+ AbstractApplicationContext applicationContext = new ClassPathXmlApplicationContext("orderProcessingSample.xml",
+ BookOrderProcessingSample.class);
+ MessageChannel messageChannel = (MessageChannel) applicationContext.getBean("ordersChannel");
+ GenericMessage orderMessage = createXmlMessageFromResource("org/springframework/integration/samples/xml/order.xml");
+ messageChannel.send(orderMessage);
+ applicationContext.close();
+ }
+
+ private static GenericMessage createXmlMessageFromResource(String path) throws Exception {
+ Resource orderRes = new ClassPathResource(path);
+
+ DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
+ builderFactory.setNamespaceAware(true);
+ DocumentBuilder builder = builderFactory.newDocumentBuilder();
+
+ Document orderDoc = builder.parse(orderRes.getInputStream());
+ return new GenericMessage(orderDoc);
+ }
+
+}
diff --git a/getting-started/xml/src/main/java/org/springframework/integration/samples/xml/ExternalResupply.java b/getting-started/xml/src/main/java/org/springframework/integration/samples/xml/ExternalResupply.java
new file mode 100644
index 00000000..3923057e
--- /dev/null
+++ b/getting-started/xml/src/main/java/org/springframework/integration/samples/xml/ExternalResupply.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2002-2010 the original author or authors.
+ *
+ * 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.
+ */
+
+package org.springframework.integration.samples.xml;
+
+import org.w3c.dom.Document;
+
+public class ExternalResupply {
+
+ public void orderResupply(Document resupplyOrder) {
+ System.out.println("Placing resupply order: " + XmlUtil.docAsString(resupplyOrder));
+ }
+
+}
diff --git a/getting-started/xml/src/main/java/org/springframework/integration/samples/xml/StockChecker.java b/getting-started/xml/src/main/java/org/springframework/integration/samples/xml/StockChecker.java
new file mode 100644
index 00000000..f481f1a1
--- /dev/null
+++ b/getting-started/xml/src/main/java/org/springframework/integration/samples/xml/StockChecker.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2002-2010 the original author or authors.
+ *
+ * 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.
+ */
+
+package org.springframework.integration.samples.xml;
+
+import org.w3c.dom.Document;
+
+import org.springframework.xml.xpath.XPathExpression;
+
+/**
+ * @author Jonas Partner
+ */
+public class StockChecker {
+
+ private final XPathExpression isbnSelectingXPath;
+
+ public StockChecker(XPathExpression isbnSelectingXPath) {
+ this.isbnSelectingXPath = isbnSelectingXPath;
+ }
+
+ public Document checkStockLevel(Document doc) {
+ String isbn = isbnSelectingXPath.evaluateAsString(doc);
+ boolean inStock = false;
+
+ // we only carry stock of one book currently
+ if ("0321200683".equals(isbn)) {
+ inStock = true;
+ }
+ doc.getDocumentElement().setAttribute("in-stock", String.valueOf(inStock));
+ return doc;
+ }
+
+}
diff --git a/getting-started/xml/src/main/java/org/springframework/integration/samples/xml/WarehouseDispatch.java b/getting-started/xml/src/main/java/org/springframework/integration/samples/xml/WarehouseDispatch.java
new file mode 100644
index 00000000..832f8f7a
--- /dev/null
+++ b/getting-started/xml/src/main/java/org/springframework/integration/samples/xml/WarehouseDispatch.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2002-2010 the original author or authors.
+ *
+ * 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.
+ */
+
+package org.springframework.integration.samples.xml;
+
+import org.w3c.dom.Document;
+
+public class WarehouseDispatch {
+
+ public void dispatch(Document orderItem){
+ System.out.println("Warehouse dispatching orderItem: " + XmlUtil.docAsString(orderItem));
+ }
+
+}
diff --git a/getting-started/xml/src/main/java/org/springframework/integration/samples/xml/XmlUtil.java b/getting-started/xml/src/main/java/org/springframework/integration/samples/xml/XmlUtil.java
new file mode 100644
index 00000000..c703523a
--- /dev/null
+++ b/getting-started/xml/src/main/java/org/springframework/integration/samples/xml/XmlUtil.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2002-2010 the original author or authors.
+ *
+ * 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.
+ */
+
+package org.springframework.integration.samples.xml;
+
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+
+import org.w3c.dom.Document;
+
+import org.springframework.xml.transform.StringResult;
+
+/**
+ * @author Jonas Partner
+ */
+public class XmlUtil {
+
+ public static String docAsString(Document doc) {
+ try {
+ StringResult res = new StringResult();
+ Transformer transformer = TransformerFactory.newInstance().newTransformer();
+ transformer.transform(new DOMSource(doc), res);
+ return res.toString();
+ }
+ catch (Exception e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+}
diff --git a/getting-started/xml/src/main/java/org/springframework/integration/samples/xml/bigBooksSupplierTransformer.xsl b/getting-started/xml/src/main/java/org/springframework/integration/samples/xml/bigBooksSupplierTransformer.xsl
new file mode 100644
index 00000000..0791aff4
--- /dev/null
+++ b/getting-started/xml/src/main/java/org/springframework/integration/samples/xml/bigBooksSupplierTransformer.xsl
@@ -0,0 +1,18 @@
+
+
+
+
+
+ smallbooks
+ 5
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/getting-started/xml/src/main/java/org/springframework/integration/samples/xml/order.xml b/getting-started/xml/src/main/java/org/springframework/integration/samples/xml/order.xml
new file mode 100644
index 00000000..cb4c48cb
--- /dev/null
+++ b/getting-started/xml/src/main/java/org/springframework/integration/samples/xml/order.xml
@@ -0,0 +1,11 @@
+
+
+
+ 0321200683
+ 2
+
+
+ 1590596439
+ 1
+
+
\ No newline at end of file
diff --git a/getting-started/xml/src/main/java/org/springframework/integration/samples/xml/orderProcessingSample.xml b/getting-started/xml/src/main/java/org/springframework/integration/samples/xml/orderProcessingSample.xml
new file mode 100644
index 00000000..62f391c0
--- /dev/null
+++ b/getting-started/xml/src/main/java/org/springframework/integration/samples/xml/orderProcessingSample.xml
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/getting-started/xml/target/classes/log4j.xml b/getting-started/xml/target/classes/log4j.xml
new file mode 100644
index 00000000..da6411c7
--- /dev/null
+++ b/getting-started/xml/target/classes/log4j.xml
@@ -0,0 +1,32 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/getting-started/xml/target/classes/org/springframework/integration/samples/xml/BookOrderProcessingSample.class b/getting-started/xml/target/classes/org/springframework/integration/samples/xml/BookOrderProcessingSample.class
new file mode 100644
index 00000000..ede83c60
Binary files /dev/null and b/getting-started/xml/target/classes/org/springframework/integration/samples/xml/BookOrderProcessingSample.class differ
diff --git a/getting-started/xml/target/classes/org/springframework/integration/samples/xml/ExternalResupply.class b/getting-started/xml/target/classes/org/springframework/integration/samples/xml/ExternalResupply.class
new file mode 100644
index 00000000..0feb94c4
Binary files /dev/null and b/getting-started/xml/target/classes/org/springframework/integration/samples/xml/ExternalResupply.class differ
diff --git a/getting-started/xml/target/classes/org/springframework/integration/samples/xml/StockChecker.class b/getting-started/xml/target/classes/org/springframework/integration/samples/xml/StockChecker.class
new file mode 100644
index 00000000..07d18e2a
Binary files /dev/null and b/getting-started/xml/target/classes/org/springframework/integration/samples/xml/StockChecker.class differ
diff --git a/getting-started/xml/target/classes/org/springframework/integration/samples/xml/WarehouseDispatch.class b/getting-started/xml/target/classes/org/springframework/integration/samples/xml/WarehouseDispatch.class
new file mode 100644
index 00000000..28bc4383
Binary files /dev/null and b/getting-started/xml/target/classes/org/springframework/integration/samples/xml/WarehouseDispatch.class differ
diff --git a/getting-started/xml/target/classes/org/springframework/integration/samples/xml/XmlUtil.class b/getting-started/xml/target/classes/org/springframework/integration/samples/xml/XmlUtil.class
new file mode 100644
index 00000000..45854e3c
Binary files /dev/null and b/getting-started/xml/target/classes/org/springframework/integration/samples/xml/XmlUtil.class differ
diff --git a/getting-started/xml/target/classes/org/springframework/integration/samples/xml/bigBooksSupplierTransformer.xsl b/getting-started/xml/target/classes/org/springframework/integration/samples/xml/bigBooksSupplierTransformer.xsl
new file mode 100644
index 00000000..0791aff4
--- /dev/null
+++ b/getting-started/xml/target/classes/org/springframework/integration/samples/xml/bigBooksSupplierTransformer.xsl
@@ -0,0 +1,18 @@
+
+
+
+
+
+ smallbooks
+ 5
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/getting-started/xml/target/classes/org/springframework/integration/samples/xml/order.xml b/getting-started/xml/target/classes/org/springframework/integration/samples/xml/order.xml
new file mode 100644
index 00000000..cb4c48cb
--- /dev/null
+++ b/getting-started/xml/target/classes/org/springframework/integration/samples/xml/order.xml
@@ -0,0 +1,11 @@
+
+
+
+ 0321200683
+ 2
+
+
+ 1590596439
+ 1
+
+
\ No newline at end of file
diff --git a/getting-started/xml/target/classes/org/springframework/integration/samples/xml/orderProcessingSample.xml b/getting-started/xml/target/classes/org/springframework/integration/samples/xml/orderProcessingSample.xml
new file mode 100644
index 00000000..62f391c0
--- /dev/null
+++ b/getting-started/xml/target/classes/org/springframework/integration/samples/xml/orderProcessingSample.xml
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/getting-started/xml/target/maven-archiver/pom.properties b/getting-started/xml/target/maven-archiver/pom.properties
new file mode 100644
index 00000000..eb873c1a
--- /dev/null
+++ b/getting-started/xml/target/maven-archiver/pom.properties
@@ -0,0 +1,5 @@
+#Generated by Maven
+#Sat Sep 04 08:22:37 EDT 2010
+version=2.0.0.BUILD-SNAPSHOT
+groupId=org.springframework.integration.samples
+artifactId=xml
diff --git a/getting-started/xml/target/xml-2.0.0.BUILD-SNAPSHOT.jar b/getting-started/xml/target/xml-2.0.0.BUILD-SNAPSHOT.jar
new file mode 100644
index 00000000..b12fabb4
Binary files /dev/null and b/getting-started/xml/target/xml-2.0.0.BUILD-SNAPSHOT.jar differ