Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Apress
committed
Oct 16, 2016
0 parents
commit 7142554
Showing
783 changed files
with
42,286 additions
and
0 deletions.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Freeware License, some rights reserved | ||
|
||
Copyright (c) 2011 Josh Long, Dr Mark Lui, Mario Gray, and Andy Chan | ||
|
||
Permission is hereby granted, free of charge, to anyone obtaining a copy | ||
of this software and associated documentation files (the "Software"), | ||
to work with the Software within the limits of freeware distribution and fair use. | ||
This includes the rights to use, copy, and modify the Software for personal use. | ||
Users are also allowed and encouraged to submit corrections and modifications | ||
to the Software for the benefit of other users. | ||
|
||
It is not allowed to reuse, modify, or redistribute the Software for | ||
commercial use in any way, or for a user�s educational materials such as books | ||
or blog articles without prior permission from the copyright holder. | ||
|
||
The above copyright notice and this permission notice need to be included | ||
in all copies or substantial portions of the software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS OR APRESS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#Apress Source Code | ||
|
||
This repository accompanies [*Pro Spring Integration*](http://www.apress.com/9781430233459) by Josh Long, Dr Mark Lui, Mario Gray, and Andy Chan (Apress, 2011). | ||
|
||
![Cover image](9781430233459.jpg) | ||
|
||
Download the files as a zip using the green button, or clone the repository to your machine using Git. | ||
|
||
##Releases | ||
|
||
Release v1.0 corresponds to the code in the published book, without corrections or updates. | ||
|
||
##Contributions | ||
|
||
See the file Contributing.md for more information on how you can contribute to this repository. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Contributing to Apress Source Code | ||
|
||
Copyright for Apress source code belongs to the author(s). However, under fair use you are encouraged to fork and contribute minor corrections and updates for the benefit of the author(s) and other readers. | ||
|
||
## How to Contribute | ||
|
||
1. Make sure you have a GitHub account. | ||
2. Fork the repository for the relevant book. | ||
3. Create a new branch on which to make your change, e.g. | ||
`git checkout -b my_code_contribution` | ||
4. Commit your change. Include a commit message describing the correction. Please note that if your commit message is not clear, the correction will not be accepted. | ||
5. Submit a pull request. | ||
|
||
Thank you for your contribution! |
47 changes: 47 additions & 0 deletions
47
prospringintegration_src/alternatives/j2ee-example/ear/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<project> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>root.project</groupId> | ||
<artifactId>ear</artifactId> | ||
<packaging>ear</packaging> | ||
<version>1.0</version> | ||
<name>alternatives : j2ee : ear assembly</name> | ||
<parent> | ||
<groupId>root</groupId> | ||
<artifactId>project</artifactId> | ||
<version>1.0</version> | ||
</parent> | ||
<dependencies> | ||
<dependency> | ||
<groupId>root.project</groupId> | ||
<artifactId>ejbs</artifactId> | ||
<type>ejb</type> | ||
</dependency> | ||
<dependency> | ||
<groupId>root.project.servlets</groupId> | ||
<artifactId>servlet</artifactId> | ||
<type>war</type> | ||
</dependency> | ||
<dependency> | ||
<groupId>root.project</groupId> | ||
<artifactId>primary-source</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>root.project.projects</groupId> | ||
<artifactId>logging</artifactId> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-ear-plugin</artifactId> | ||
<configuration> | ||
<archive> | ||
<manifest> | ||
<addClasspath>true</addClasspath> | ||
</manifest> | ||
</archive> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
16 changes: 16 additions & 0 deletions
16
...tegration_src/alternatives/j2ee-example/ear/src/main/application/META-INF/application.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE application PUBLIC | ||
"-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" | ||
"http://java.sun.com/dtd/application_1_3.dtd"> | ||
<application> | ||
<display-name>ear</display-name> | ||
<module> | ||
<ejb>ejbs-1.0.jar</ejb> | ||
</module> | ||
<module> | ||
<web> | ||
<web-uri>servlet-1.0.war</web-uri> | ||
<context-root>/servlet</context-root> | ||
</web> | ||
</module> | ||
</application> |
73 changes: 73 additions & 0 deletions
73
prospringintegration_src/alternatives/j2ee-example/ejbs/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<project> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>root.project</groupId> | ||
<artifactId>ejbs</artifactId> | ||
<packaging>ejb</packaging> | ||
<version>1.0</version> | ||
<name>alternatives : j2ee : enterprise java beans</name> | ||
<parent> | ||
<groupId>root</groupId> | ||
<artifactId>project</artifactId> | ||
<version>1.0</version> | ||
</parent> | ||
<dependencies> | ||
<dependency> | ||
<groupId>root.project</groupId> | ||
<artifactId>primary-source</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>root.project.projects</groupId> | ||
<artifactId>logging</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>jboss</groupId> | ||
<artifactId>jboss-ejb3x</artifactId> | ||
<version>4.2.3.GA</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>jboss</groupId> | ||
<artifactId>jboss-j2ee</artifactId> | ||
<version>4.2.3.GA</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>javax.jms</groupId> | ||
<artifactId>jms</artifactId> | ||
<version>1.1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>jboss</groupId> | ||
<artifactId>jbossmq-client</artifactId> | ||
<version>4.0.2</version> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<configuration> | ||
<source>1.6</source> | ||
<target>1.6</target> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-ejb-plugin</artifactId> | ||
<version>2.3</version> | ||
<configuration> | ||
<ejbVersion>3.0</ejbVersion> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
<repositories> | ||
<repository> | ||
<id>jboss</id> | ||
<url>https://repository.jboss.org/nexus/content/groups/public</url> | ||
<releases> | ||
</releases> | ||
<snapshots> | ||
<enabled>false</enabled> | ||
</snapshots> | ||
</repository> | ||
</repositories> | ||
</project> |
53 changes: 53 additions & 0 deletions
53
...s/j2ee-example/ejbs/src/main/java/com/apress/prospringintegration/ejb/JmsMessageBean.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* | ||
* Copyright 2002-2011 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 com.apress.prospringintegration.ejb; | ||
|
||
import javax.annotation.Resource; | ||
import javax.ejb.ActivationConfigProperty; | ||
import javax.ejb.MessageDriven; | ||
import javax.ejb.MessageDrivenContext; | ||
import javax.jms.Message; | ||
import javax.jms.MessageListener; | ||
import javax.jms.TextMessage; | ||
|
||
@MessageDriven(name = "JmsMessageBean", activationConfig = { | ||
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"), | ||
@ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/examples/ExampleQueue") | ||
}) | ||
public class JmsMessageBean implements MessageListener { | ||
|
||
@Resource | ||
private MessageDrivenContext context; | ||
|
||
@Override | ||
public void onMessage(Message message) { | ||
try { | ||
if (message instanceof TextMessage) { | ||
TextMessage objMessage = (TextMessage) message; | ||
String textMessage = objMessage.getText(); | ||
System.out.println("****************************************************"); | ||
System.out.println("Received JMS message. message: " + textMessage); | ||
System.out.println("****************************************************"); | ||
} else { | ||
System.err.println("Expecting Text Message"); | ||
} | ||
} catch (Throwable t) { | ||
t.printStackTrace(); | ||
context.setRollbackOnly(); | ||
} | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
...ingintegration_src/alternatives/j2ee-example/ejbs/src/main/resources/META-INF/MANIFEST.MF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Manifest-Version: 1.0 | ||
Class-Path: | ||
|
62 changes: 62 additions & 0 deletions
62
prospringintegration_src/alternatives/j2ee-example/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<project> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>root</groupId> | ||
<version>1.0</version> | ||
<artifactId>project</artifactId> | ||
<packaging>pom</packaging> | ||
<name>alternatives : j2ee</name> | ||
<modules> | ||
<module>projects</module> | ||
<module>primary-source</module> | ||
<module>servlets</module> | ||
<module>ejbs</module> | ||
<module>ear</module> | ||
<!--module>site</module--> | ||
</modules> | ||
<build> | ||
<pluginManagement> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-site-plugin</artifactId> | ||
<!--configuration> | ||
<unzipCommand>/usr/bin/unzip -o > err.txt</unzipCommand> | ||
</configuration--> | ||
</plugin> | ||
</plugins> | ||
</pluginManagement> | ||
</build> | ||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>root.project.projects</groupId> | ||
<artifactId>logging</artifactId> | ||
<version>1.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>root.project</groupId> | ||
<artifactId>primary-source</artifactId> | ||
<version>1.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>root.project.servlets</groupId> | ||
<artifactId>servlet</artifactId> | ||
<version>1.0</version> | ||
<type>war</type> | ||
</dependency> | ||
<dependency> | ||
<groupId>root.project</groupId> | ||
<artifactId>ejbs</artifactId> | ||
<version>1.0</version> | ||
<type>ejb</type> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
<distributionManagement> | ||
<site> | ||
<id>site</id> | ||
<name>project website</name> | ||
<url>scp://local.company.com/websites/project.company.com/</url> | ||
</site> | ||
</distributionManagement> | ||
</project> |
3 changes: 3 additions & 0 deletions
3
prospringintegration_src/alternatives/j2ee-example/primary-source/META-INF/MANIFEST.MF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Manifest-Version: 1.0 | ||
Class-Path: | ||
|
38 changes: 38 additions & 0 deletions
38
prospringintegration_src/alternatives/j2ee-example/primary-source/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<project> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>root.project</groupId> | ||
<artifactId>primary-source</artifactId> | ||
<packaging>jar</packaging> | ||
<name>alternatives : j2ee : core project classes</name> | ||
<parent> | ||
<groupId>root</groupId> | ||
<artifactId>project</artifactId> | ||
<version>1.0</version> | ||
</parent> | ||
<dependencies> | ||
<dependency> | ||
<groupId>root.project.projects</groupId> | ||
<artifactId>logging</artifactId> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<plugins> | ||
<plugin> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<configuration> | ||
<encoding>iso-8859-1</encoding> | ||
<source>1.6</source> | ||
<target>1.6</target> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-javadoc-plugin</artifactId> | ||
<configuration> | ||
<minmemory>128m</minmemory> | ||
<maxmemory>512m</maxmemory> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
3 changes: 3 additions & 0 deletions
3
prospringintegration_src/alternatives/j2ee-example/projects/logging/META-INF/MANIFEST.MF
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Manifest-Version: 1.0 | ||
Class-Path: | ||
|
12 changes: 12 additions & 0 deletions
12
prospringintegration_src/alternatives/j2ee-example/projects/logging/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<project> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>root.project.projects</groupId> | ||
<artifactId>logging</artifactId> | ||
<packaging>jar</packaging> | ||
<name>alternatives : j2ee : sub projects : logging</name> | ||
<parent> | ||
<groupId>root.project</groupId> | ||
<artifactId>projects</artifactId> | ||
<version>1.0</version> | ||
</parent> | ||
</project> |
16 changes: 16 additions & 0 deletions
16
prospringintegration_src/alternatives/j2ee-example/projects/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<project> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>root.project</groupId> | ||
<version>1.0</version> | ||
<artifactId>projects</artifactId> | ||
<packaging>pom</packaging> | ||
<name>alternatives : j2ee : sub projects</name> | ||
<parent> | ||
<groupId>root</groupId> | ||
<artifactId>project</artifactId> | ||
<version>1.0</version> | ||
</parent> | ||
<modules> | ||
<module>logging</module> | ||
</modules> | ||
</project> |
Oops, something went wrong.