Use of Springframework.org software in a commercial product

materialisticrampantInternet and Web Development

Nov 10, 2013 (3 years and 9 months ago)

95 views

Publishers’ Note



Use of Springframework.org software in a commercial product

The Sakai Project is considering use of the Spring software in their development of Sakai
software. The Sakai software license permits subsequent users to incorporate the Sakai
software into commercial products without requiring that the additional code be made
public. For this reason the Sakai developers must ensure the software incorporated into
their development permits this use.

One of the developers used Spring software in the Tool Preview Release 1 (TP1)
distributed to Sakai Educational Partners Program participants March 12, 2004.

The question was whether the Spring “Apache” license was valid.

As it turns out, the Spring license is a variant of the Apache license. And the publisher
Wrox may hold a copyright on some of the code. If so, that code could not be used for
commercial purposes without some evidence of permission from Wrox or the authors or
both.

This document collection was provided to the Sakai developers for their review.

Jim Farmer
Sakai Community Liaison

1
Jim Farmer
From:
Jim Farmer [jxf@immagic.com]
Sent:
Tuesday, February 17, 2004 3:35 PM
To:
Severance Chuck
Cc:
Carl W. Jacobson
Subject:
Possible Legal Steps for the Use of the Spring Framework
Sprin
g
FrameworkLe
gal.pdf
Because the following information is sensitive, I have not sent copies to
anyone yet except Carl Jacobson.
The phrase “Spring is a J2EE application framework based on code published in Expert One-
on-One J2EE Design and Development by Rod Johnson” on the SpringFramework.org Website
raised the possibility of licensing issues. My conversation last year with The Apache
Foundation’s Brian Behlendorf about the legal effort required to obtain clear title to
source code donated to the Foundation suggested it would be worthwhile to review the chain
of ownership.
I believe it is clear that Rod Johnson and his colleagues want Spring to be used in
commercial products; it is not clear all of the steps have been taken to make this
certain.
In the attached document, I have included excerpts that I reviewed.
The Spring Framework Website observes that Spring was built on the code from Rod Johnson’s
book “J2EE Expert One-on-One Design and Development,” which means part of the current
Spring code could be a derivative work. (Exhibit A).
The Spring Framework Project writes they are using the Apache License. Yet the “Apache
License” accompanying the Release Candidate for the first version (Exhibit B) is different
from the Apache Software Foundation’s version (Exhibit C).
As one way to learn whether SpringFramework.org represents a legal entity—and capacity to
license software—I checked their Internet registration (Exhibit D). The name was
registered by an individual with no indication of “doing business as” Spring Framework
Project or something similar.
The Spring Framework release notes claims the code is released under the Apache License
and cites three sources, none include the authors of the framework code itself. (Exhibit
E)
The Wrox Press page says the code in Wrox books is either owned by Wrox and limited in use
or available under the GNU (Exhibit F). In either case this creates a problem for
commercial use of derivative works.
I checked several examples of code downloaded from Wrox; in most cases an author’s name is
included. (Exhibits F-I)Unless there is other documentation that would assign rights, the
authors would own the copyright and it would have been assigned to Wrox as part of the
authors’ agreement.
The Source Forge download page again reports the Apache Software License is at least
intended (Exhibit J). Java code included in the distribution again lists authors (Exhibits
K-M). This is not source code for the framework, but rather for the application used to
illustrate or test the framework. The source code to the framework was located at another
site—monkeymachine.co.uk—and does state the Apache Software Foundation license is intended
(Exhibit N).
While the good intentions of Rod Johnson and other contributors can be inferred, some
documentation may be required to make their “Apache Software License” valid.
Since this is similar to the issues that Caldera Systems, Inc., d/b/a The SCO Group, has
presented to the courts, a review by legal counsel may be helpful.
2
Jim Farmer
uPortal Project Administrator
+1-202-296-2807
Exhibit A
From http://www.springframework.org/
1
15 February 2004
Home
ANNOUNCEMENT: We are pleased to announce that Spring Framework 1.0 Release
Candidate 1 has just been released. This release finally covers all features targeted for
1.0.

Changes since 1.0 M4 include:
• restructured core, beans and util packages
• reworked PropertyPlaceholderConfigurer, now also able to resolve system
properties
• new ReloadableResourceBundleMessageSource, supporting hot reloading of
message definition files
• support for transaction suspension, via new propagation behaviors
REQUIRES_NEW and NOT_SUPPORTED
• javax.transaction.TransactionManager support in JtaTransactionManager, for
transaction suspension
• support for local JOTM and XAPool instances
• support for CLOB handling in DefaultLobCreator and OracleLobCreator
• new "evict", "saveOrUpdateCopy" and overloaded "delete" and "update" methods
in HibernateTemplate
• revised Hibernate-JTA synchronization, respecting a registered Hibernate
TransactionManagerLookup
• support for Hessian and Burlap 3.x
• removed deprecated "beanName" property from BaseCommandController
• various refinements and minor renamings in the web support
• revised distribution JAR files, now one full spring.jar and various fine-grained
module-specific JARs
• refined framework build process to work standalone
• new sample application "imagedb", illustrating BLOB/CLOB support, multipart
file upload, Velocity view

As usual, see the changelog
for details.

The release can be downloaded here
[2004-02-11]
Spring is a J2EE application
framework based on code published in Expert One-on-One J2EE
Design and Development
by Rod Johnson.
[Emphasis added].

Spring includes:
• Powerful JavaBeans-based configuration management. This makes wiring up
applications quick and easy. No more singletons littered throughout your
codebase; no more arbitrary properties file. One consistent and elegant approach
everywhere.
• JDBC abstraction layer, that offers a meaningful exception hierarchy (no more
pulling vendor codes out of SQLException), simplifies error handling and greatly
Exhibit A
From http://www.springframework.org/
2
15 February 2004
reduces the amount of code you'll need to write. You'll never need to write
another finally block to use JDBC again.
• Similar abstraction layer for transaction management, making it easy to delimit
transactions without dealing with low-level JTA issues.
• Flexible MVC web application framework, built on core Spring functionality.
This framework is highly configurable and accommodates multiple view
technologies.
• AOP functionality, fully integrated into Spring configuration management. You
can AOP-enable any object managed by Spring, adding aspects such as
declarative transaction management. With Spring, you can have declarative
transaction management without EJB...even without JTA, if you're using a single
database in Tomcat or another web container without JTA support.
• Integration with Hibernate, JDO and other important APIs.

You can use all of Spring's functionality in any J2EE server, or outside a server.

Spring has a layered architecture. All its functionality builds on lower levels. So you can
use the JavaBeans configuration management without using the MVC framework or AOP
support, but if you use the MVC framework or AOP support you'll find they build on the
configuration framework and you can apply your knowledge about it immediately.


Exhibit B

1
17 February 2004
Downloaded from sourceforge.net/project/showfiles.php?group_id=7335715
/*
* All source code, binaries, documentation and other files distributed
* with the Spring Framework - except the third-party libraries in the "lib"
* directory - are subject to the following license terms, and are held under
* the following copyright notice.
*
* ============================================================================
* The Apache Software License, Version 1.1
* ============================================================================
*
* Copyright (C) 2003 The Spring Framework Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modifica-
* tion, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. The end-user documentation included with the redistribution, if any, must
* include the following acknowledgment: "This product includes software
* developed by the Spring Framework Project
(http://www.springframework.org)."
* Alternately, this acknowledgment may appear in the software itself, if
* and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Spring" and "Spring Framework Project" must not be used to
* endorse or promote products derived from this software without prior
* written permission. For written permission, please contact
* <rod.johnson@interface21.com>.
*
* 5. Products derived from this software may not be called "Spring", nor may
* "Spring" appear in their name, without prior written permission of the
* Spring Framework Project.
*
* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* SPRING FRAMEWORK PROJECT OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
* on behalf of the Spring Framework Project. For more information on the
* Spring Framework Project, please see <http://www.springframework.org>.
*/
Exhibit C

1
From www.apache.org/licenses/LICENSE-2.0.txt 17 February 2004
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitions.

"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.

"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).

"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Exhibit C

2
From www.apache.org/licenses/LICENSE-2.0.txt 17 February 2004
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."

"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:

(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and

(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and

(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and

(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
Exhibit C

3
From www.apache.org/licenses/LICENSE-2.0.txt 17 February 2004
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.

You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.

5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
Exhibit C

4
From www.apache.org/licenses/LICENSE-2.0.txt 17 February 2004
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Exhibit D
From 1 17 February 2004
www.networksolutions.com/en_US/whois/results.jhtml;jsessionid=5JIHTWEATCWJYCWLEAMC
FEY?_requestid=1263889


springframework.org


Registrant:
Risberg, Thomas (WOPQJNMPOD
)
4870 Green Heather Ct
Doylestown, PA 18901
US

Domain Name: SPRINGFRAMEWORK.ORG

Administrative Contact:
Risberg, Thomas (SSIXTMVKII
) trisberg@yahoo.com
4870 Green Heather Ct
Doylestown, PA 18901
US
215-489-1866 fax: 123 123 1234

Technical Contact:
Network Solutions, Inc. (HOST-ORG
) customerservice@networksolutions.com
13200 Woodland Park Drive
Herndon, VA 20171-3025
US
1-888-642-9675 fax: 571-434-4620

Record expires on 31-May-2004.
Record created on 31-May-2003.
Database last updated on 17-Feb-2004 08:41:47 EST.

Domain servers in listed order:

NS1.SIXGEEKS.ORG 66.77.29.168
NS2.MYDYNDNS.ORG 209.69.32.138
NS3.MYDYNDNS.ORG 64.152.102.42
NS4.MYDYNDNS.ORG 212.100.224.176
NS5.MYDYNDNS.ORG 66.151.188.46
Exhibit E

1
February 2004
Downloaded from sourceforge.net/project/showfiles.php?group_id=7335715

THE SPRING FRAMEWORK, release 1.0 RC1 (February 2004)
-----------------------------------------------------
http://www.springframework.org


1. INTRODUCTION

Spring is a layered Java/J2EE application framework, based
on code published in "Expert One-on-One J2EE Design
and Development" by Rod Johnson (Wrox, 2002). Spring
includes:

* Powerful JavaBeans-based configuration management,
applying Inversion-of-Control principles. This makes
wiring up applications quick and easy. No more singletons
littered throughout your codebase, no more arbitrary
properties files: one consistent and elegant approach
everywhere. This core bean factory can be used in any
environment, from applets to J2EE containers.

* Generic abstraction layer for transaction management,
allowing for pluggable transaction managers, and making
it easy to demarcate transactions without dealing with low-
level issues. Generic strategies for JTA and a
single JDBC DataSource are included. In contrast to plain
JTA or EJB CMT, Spring's transaction support is not
tied to J2EE environments.

* JDBC abstraction layer that offers a meaningful exception
hierarchy (no more pulling vendor codes out of
SQLException), simplifies error handling, and greatly
reduces the amount of code you'll need to write.
You'll never need to write another finally block to use JDBC
again. The JDBC-oriented exceptions comply to
Spring's generic DAO exception hierarchy.

* Integration with Hibernate, JDO, and iBATIS SQL Maps: in
terms of resource holders, DAO implementation
support, and transaction strategies. First-class Hibernate
support with lots of IoC convenience features,
addressing many typical Hibernate integration issues. All of
these comply to Spring's generic transaction
and DAO exception hierarchies.

* AOP functionality, fully integrated into Spring
configuration management. You can AOP-enable any object
managed
by Spring, adding aspects such as declarative transaction
management. With Spring, you can have declarative
transaction management without EJB... even without JTA, if
you're using a single database in Tomcat or another
web container without JTA support.

Exhibit E

2
February 2004
Downloaded from sourceforge.net/project/showfiles.php?group_id=7335715

* Flexible MVC web application framework, built on core
Spring functionality. This framework is highly configurable
via strategy interfaces, and accommodates multiple view
technologies like JSP, Velocity, Tiles, iText, and POI.
Note that a Spring middle tier can easily be combined with a
web tier based on any other web MVC framework,
like Struts, WebWork, or Tapestry.

You can use all of Spring's functionality in any J2EE
server, and most of it also in non-managed environments.
A central focus of Spring is to allow for reusable business
and data access objects that are not tied to specific
J2EE services. Such objects can be reused across J2EE
environments (web or EJB), standalone applications, test
environments, etc without any hassle.

Spring has a layered architecture. All its functionality
builds on lower levels. So you can e.g. use the
JavaBeans configuration management without using the MVC
framework or AOP support. But if you use the web MVC
framework or AOP support, you'll find they build on the
configuration framework, so you can apply your knowledge
about it immediately.


2. RELEASE INFO

The Spring Framework requires J2SE 1.3 and J2EE 1.3 (Servlet
2.3, JSP 1.2, JTA 1.0, EJB 2.0). J2SE 1.4 is
required for building the framework. Note that J2EE 1.2
(Servlet 2.2, JSP 1.1) is good enough if not using
Spring's web MVC or EJB support. Integration is provided
with Log4J 1.2, CGLIB 1.0, Jakarta Commons Attributes,
Hibernate 2.1, JDO 1.0, iBATIS SQL Maps 1.3, JAX-RPC 1.1,
Caucho's Hessian and Burlap 2.1/3.0, JSTL 1.0,
Velocity 1.3, Struts-Tiles 1.1, Jakarta Commons FileUpload,
Jason Hunter's COS, etc.

Release contents:
* "src" contains the Java source files for the framework
* "test" contains the Java source files for Spring's test
suite
* "dist" contains various Spring distribution JAR files
* "lib" contains all third-party libraries needed for
running the samples and/or building the framework
* "docs" contains general documentation and API javadocs
* "samples" contains demo applications and skeletons

The "lib" directory is just included in the "-with-
dependencies" download. Make sure to download this full
distribution ZIP file if you want to run the sample
applications and/or build the framework yourself.
Ant build scripts for the framework and the samples are
provided. The standard samples can be built with
Exhibit E

3
February 2004
Downloaded from sourceforge.net/project/showfiles.php?group_id=7335715

the included Ant runtime by invoking the corresponding
"build.bat" files (see samples subdirectories).

Latest info is available at the public website:
http://www.springframework.org
Project info at the SourceForge site:
http://sourceforge.net/projects/springframework

The Spring Framework is released under the terms of the
Apache Software License (see license.txt).
This product includes software developed by the Apache
Software Foundation (http://www.apache.org).
This product includes software developed by Clinton Begin
(http://www.ibatis.com).


3. DISTRIBUTION JAR FILES

The "dist" directory contains the following distinct JAR
files for use in applications. Both module-specific
JAR files and a JAR file with all of Spring are provided.
The following list specifies the respective contents
and third-party dependencies. Libraries in brackets are
optional, i.e. just necessary for certain functionality.

* "spring-core" (~170 KB)
- Contents: bean container, core utilities
- Dependencies: Commons Logging, (Log4J)

* "spring-aop" (~110 KB)
- Contents: AOP framework, source-level metadata support
- Dependencies: spring-beans, AOP Alliance, (CGLIB, Commons
Attributes)

* "spring-context" (~135 KB)
- Contents: application context, validation framework, UI
support, JNDI, mail, remoting, EJB
- Dependencies: spring-beans, (JavaMail, EJB, JAX-RPC,
Hessian, Burlap)

* "spring-dao" (~175 KB)
- Contents: DAO support, transaction infrastructure, JDBC
support
- Dependencies: spring-beans, (spring-aop, spring-context,
JTA)

* "spring-orm" (~90 KB)
- Contents: Hibernate support, JDO support, iBATIS SQL Maps
support
- Dependencies: spring-jdbc, (Hibernate, JDO, iBATIS SQL
Maps)

* "spring-web" (~60 KB)
Exhibit E

4
February 2004
Downloaded from sourceforge.net/project/showfiles.php?group_id=7335715

- Contents: web application context, multipart resolver, web
utilities
- Dependencies: spring-context, Servlet, (Commons
FileUpload, COS)

* "spring-webmvc" (~130 KB)
- Contents: web MVC framework, web controllers, web views
- Dependencies: spring-web, (JSP, JSTL, Velocity, iText,
POI)

* "spring" (~870 KB)
- Contents: all of the above
- Dependencies: all of the above

Note: The above lists of third-party libraries assume J2SE
1.4 as foundation. For J2SE 1.3, an XML parser like
Xerces, the JDBC 2.0 standard extension interfaces, and JNDI
have to be added when using XML bean definitions,
JDBC DataSource setup, and JNDI lookups, respectively.

Note: To use the JSP expression language for arguments of
Spring's web MVC tags, the Jakarta implementation of
the JSTL (standard.jar) has to be available in the class
path. Else, any JSTL implementation will do.


4. WHERE TO START?

Documentation can be found in the "docs" directory:
* the Spring reference documentation
* "The Spring Framework - A Lightweight Container"
* "Data Access and Transaction Abstraction with the Spring
Framework"
* "Container Resources vs Local Resources"
* "Web MVC with the Spring Framework"
* "Developing a Spring Framework MVC application step-by-
step"
* various configuration and integration tutorials

Documented sample applications and skeletons can be found in
"samples":
* "countries"
* "imagedb"
* "jpetstore"
* "petclinic"
* "tiles-example"
* "webapp-minimal"
* "webapp-typical"

Release 1.0 M2 introduced a reworked version of Petclinic,
now featuring alternative DAO implementations and
application configurations for JDBC and Hibernate, on HSQL
and MySQL. The default Petclinic configuration is
Exhibit E

5
February 2004
Downloaded from sourceforge.net/project/showfiles.php?group_id=7335715

Hibernate on HSQL; to be able to build and run it, the
Spring distribution comes with Hibernate JAR files now.

Release 1.0 M4 introduced the Spring JPetStore, an adapted
version of Clinton Begin's JPetStore (as available
at http://www.ibatis.com). It leverages Spring's new support
for the iBATIS Database Layer to improve the
original JPetStore in terms of internal structure and
wiring. On top of a Spring-managed middle tier, it offers
two alternative web tier implementations: one on Spring's
web MVC plus JSTL, and one on Struts 1.1 plus JSTL.

"Expert One-on-One J2EE Design and Development" discusses
many of Spring's design ideas in detail.
Note: The code examples in the book refer to the original
framework version that came with the book.
Thus, they need to be adapted for the current Spring
release.

Exhibit F
1
From www.wrox.com/dynamic/books/download.aspx 17 February 2004






HOME
|
P2P FORUM
|
DOWNLOAD CODE
|
BOOK LIST
|
WROX PRESS NEWSLETTER





Search Wrox.com:





Code Downloads from Wrox Press
TM

What happened to the code downloads for the rest of the Wrox books?
Previously, we had maintained the code downloads for all the Wrox titles as a public
service to the Wrox reader community. However, we own the rights only to the code
that goes with the works we purchased (see the Code List
below) and new works that
we will publish. Please contact Apress
for information about obtaining code downloads
and support for any other former Wrox books.
I'm ready to post a question to P2P asking where to find some Wrox book
code I can't find. What should I do first?
Stop and please read the answer
before posting this question.
Why do I have to download code rather than get a CD with the book?
We provide downloadable code for many of our books. Adding CDs to a book costs a lot

of money, and that cost would have to be passed on to you. By providing downloadable

code, we can lower the cost of a book, thereby saving you money. It also enables us to
easily update the code to correct errors or to respond to changes to operating systems
and so on.
Do I need to register before I can download code?
The short answer is no. You paid for the book, so you are entitled to get the code that
goes with it.
What are the terms and conditions for using the code?
We try to make using the code as open as possible; however, for commercial reasons,
we do have to assert a few simple Terms and Conditions. By downloading the code,
you agree to the following:

Wrox Press, the authors, and distributors cannot be held responsible for any
loss, damage, or other claim caused by using the executable code or other
files.

You may not redistribute the code to any other person, nor make it available
on any Web site, forum, newsgroup, or other facility without prior permission
from Wrox Press, except for sample programs released under the terms of the
GNU General Public License (GPL), in which case those terms apply.

You may, however, use and modify the code in any way you wish, and
incorporate it into any of your own projects, except for sample programs
released under the terms of the GNU General Public License (GPL), in which
case those terms apply.

Wrox cannot provide technical support for the code after you've modified it, or
when used in any way other than described in the original book or article.
Exhibit F
2
From www.wrox.com/dynamic/books/download.aspx 17 February 2004
And finally, how do I get the code?
Just find the title of your book in the list below. If your book has downloadable code,
you will see options to download it via HTTP or FTP. For help with your downloaded
code, visit our Help Center
.

ASP.NET Website Programming: Problem - Design - Solution, C# Edition

A backup of the database for users of SQL Server 7. Please follow
the instructions given in index.htm in the main code download,
but use this backup instead. (195 KB)

HTTP

FTP


Download code samples for this book (1.20MB)

HTTP
FTP


VB.NET version of the example, from the VB.NET edition of the
book.

HTTP

FTP


ASP.NET Website Programming: Problem - Design - Solution, VB.NET Edition

Complete VB.NET sample code

HTTP

FTP


Beginning Access 2000 VBA

Order.dot file is in this zip file (we left it off the CD - sorry!) (4 kB)

HTTP

FTP


Exhibit F
3
From www.wrox.com/dynamic/books/download.aspx 17 February 2004

Download source code for Chapter 15 example (52 Kb)

HTTP
FTP


Download source code for Chapter 16 examples (142 Kb)

HTTP

FTP


Download source code for Chapter 17 examples (19 Kb)

HTTP
FTP


Download source code for Chapter 18 examples (17 Kb)

HTTP

FTP


Download source code from Appendix F (34 Kb)

HTTP
FTP


Download a copy of Movie2000 for users with previous versions
of Access

HTTP

FTP


Download a copy of Bank.mdb (from Chapter 16) for owners of
Office97 or earlier

HTTP
FTP


Download a copy of Reports.mdb (from Chapter 18) for owners
of Office 97 or earlier

HTTP

FTP


Download Exercises Chapters 1 - 13

HTTP
FTP


Download a copy of Movie 2000 (inc. missing stored procedure)

HTTP

FTP


Beginning ASP.NET 1.0 with C#.NET

How to Configure Your Environment Variables

HTTP

FTP


Download code samples for Chapters 1-10 (45.6KB)

HTTP
FTP


Download code samples for Chapters 11-20 (1.53MB)

HTTP

FTP


Beginning ASP.NET 1.0 with VB.NET

Download code samples for this book (967KB)

HTTP

FTP


Beginning ASP.NET 1.1 with VB .NET 2003

Download all the code samples for the book

HTTP

FTP


Beginning ASP.NET Databases Using VB.NET

Code for all of the examples in the book, archived in ZIP format
(451Kb)

HTTP

FTP


Beginning Dreamweaver MX

Download code

HTTP

FTP


Beginning Dreamweaver MX 2004

Download code for Chapters 1-6

HTTP

FTP


Download code for Chapters 7-13

HTTP
FTP


Download code for Chapters 14-18

HTTP

FTP


Download code for Appendices A, B, C, D, and F

HTTP
FTP


Beginning Java 2 SDK 1.4 Edition

Download Exercise Code samples for this book (996KB)

HTTP

FTP


Exhibit F
4
From www.wrox.com/dynamic/books/download.aspx 17 February 2004

Download code for book (540K)

HTTP
FTP


Beginning JavaScript

Download code sample for this book (597KB)

HTTP

FTP


Beginning Linux Programming, 2nd Edition

Download source code tarball - gunzip, then tar -xvf to extract
(432KB)

HTTP

FTP


Beginning Linux Programming, 3rd Edition

Download the 544977_code.tgz file into a suitable directory, then
use "tar zxvf 544977_code.tgz" to extract the contents.

HTTP

FTP


Beginning PHP4

Download Linux code files for this book (201KB)

HTTP

FTP


Download Windows code files for this book (259KB)

HTTP
FTP


Additional files for using ODBC databases with PHP4

HTTP

FTP


Beginning Red Hat Linux 9

There are no code downloads for this book.

Beginning VB.NET, 2nd Edition

Code for Beginning VB.NET 2nd Edition

HTTP

FTP


Beginning Visual C++ 6

Download the example code for the entire book here (516 KB)

HTTP

FTP


Download the "Advanced Process List" case study here - Word
version

HTTP
FTP


Download the "Advanced Process List" case study here - HTML
version

HTTP

FTP


Download the "Advanced Process List" source code here

HTTP
FTP


Beginning Visual C#

All of the code for Beginning Visual C# (5 MB)

HTTP

FTP


Code for chapters 1 to 12 (700K)

HTTP
FTP


Code for chapters 13 to 24 (4.3MB)

HTTP

FTP


The Missing Icons and Font for Chapter 13

HTTP
FTP


Beginning XML, 2nd Edition

Download source code for this book (3.82MB)

HTTP

FTP


Dave Sussman's Beginning Dynamic Websites with ASP.NET Web Matrix

Sample code and database (4.94Mb)

HTTP

FTP


Exhibit F
5
From www.wrox.com/dynamic/books/download.aspx 17 February 2004

Sample music for Chapter 11 (536Kb)

HTTP
FTP


Dreamweaver MX: PHP Web Development

There are no code downloads for this book.

Excel 2000 VBA Programmer's Reference

Download code samples for this book

HTTP

FTP


Be sure to check out Stephen Bullen's website.

You can also download the VBE Tools 2000.exe mentioned in Chapter 17.


Excel 2002 VBA Programmer's Reference

Download VBA code in text files (226 KB)

HTTP

FTP


Download Excel Spreadsheets (1.86 MB)

HTTP
FTP


Expert One on One J2EE Design and Development

This zip (1,757Kb) contains all the source code for the book -
does not contain binaries for some of the supporting libraries
such as XMLC etc. See readme for details.

HTTP

FTP


Rename this zip file to ear to get a compiled version of the
sample application and the associated frameworks for immediate
deployment. (1,753Kb)

HTTP
FTP


This zip (4560Kb) contains the third-party libraries mentioned in
Appendix A. The directories under "lib" in this zip file should be
copied to the "lib" folder for the application.

HTTP

FTP


This zip file contains the "i21-web-demo" (examples from this
application have been discussed in Chapter 14). This download
can also be used as a skeleton for web applications using the
framework.

HTTP
FTP


Photoshop Elements 2: Zero to Hero

Download code

HTTP

FTP


Professional Apache Tomcat

Deployment descriptors and code (132 kB)

HTTP

FTP


Professional ASP.NET 1.0, Special Edition

Download all code samples for this book - C# version (1.6 MB)

HTTP

FTP


Download all code samples for this book - VB.NET version (1.6
MB)

HTTP
FTP


Download upgrade pack for the First Edition of this book
(1.27MB)

HTTP

FTP


Professional Crystal Reports for Visual Studio .NET

Download code samples for this book

HTTP

FTP


Professional C#, 2nd Edition
Exhibit F
6
From www.wrox.com/dynamic/books/download.aspx 17 February 2004

Download all code samples for this book (4.89MB)

HTTP

FTP


Download code samples for chapters 1 to 12 and Appendix A
(2.14MB)

HTTP
FTP


Download code samples for chapters 13 to 23 (2.77MB)

HTTP

FTP


Download the C# for VB6 developers appendix

HTTP
FTP


Download the C# for Java developers appendix

HTTP

FTP


Download the C# for C++ developers appendix

HTTP
FTP


Professional IBM WebSphere 5.0 Application Server

Additional code - Chapter 4 (3.2Mb)

HTTP

FTP


Code for Chapter 5 (3.3Mb)

HTTP
FTP


Code for Chapter 6 (3.5Mb)

HTTP

FTP


Code for Chapter 7 (3.6Mb)

HTTP
FTP


Code for Chapter 8 (3.6Mb)

HTTP

FTP


Code for Chapter 9,10,11, and 14 (730Kb)

HTTP
FTP


Code for Cloudscape Database (2.8Mb)

HTTP

FTP


EAR for Chapter 4 (3.2MB)

HTTP
FTP


Professional Portal Development with Open Source Tools

Download the companion code and materials for the book.

HTTP

FTP


Professional Jakarta Struts

Download sample applications and code from the book (4.34MB)

HTTP

FTP


Professional SQL Server 2000 DTS (Data Transformation Services)

Download code sample - ETL customer error handler (67 kB)

HTTP

FTP


Download code sample - ETL Step 1 (145 kB)

HTTP
FTP


Download code sample - ETL Step 2 (421 kB)

HTTP

FTP


Download code sample - ETL Step 3 (303 kB)

HTTP
FTP


Download code sample - ETL Step 4 (209 kB)

HTTP

FTP


Download code sample - Northwind DW CAB (199 kB)

HTTP
FTP


Download code samples (111 kB)

HTTP

FTP


Professional SQL Server 2000 Programming

Download the source code for Professional SQL Server 2000
Programming (646.6K)

HTTP

FTP


Download an amended version of the sp_DBLocks stored
procedure for chapter 14 (1.3K)

HTTP
FTP


Exhibit F
7
From www.wrox.com/dynamic/books/download.aspx 17 February 2004
Professional UML with Visual Studio .NET: Unmasking Visio for Enterprise Architects

Chapter 5 - Reverse Engineering

HTTP

FTP


Chapter 3 - Diagramming Business Objects

HTTP
FTP


Chapter 4 - Generating Code from the Visio Model (Employee
class)

HTTP

FTP


Chapter 8 - Database Modeling with Visio for Enterprise
Architects

HTTP
FTP


All the Diagram and Code Examples

HTTP

FTP


Professional VB.NET, 2nd Edition

Code Download for Professional VB.NET 2nd Edition

HTTP

FTP


Professional XML Development with Apache Tools

Download complete source code and all applications from the book

HTTP

FTP


VBScript Programmer's Reference

Complete source code for VBScript Programmers Reference

HTTP

FTP


Always responsive to customer feedback, Wrox now has Appendix
A indexed (Word doc).

HTTP
FTP


XSLT Programmer's Reference, 2nd Edition

Download source code for this book (428KB)

HTTP

FTP


Saxon XSLT parser (4.7MB)

HTTP
FTP







Wrox — Programmer to Programmer
TM





WRITE FOR WROX
|
ABOUT WROX
|
HELP CENTER
|
CONTACT US







Copyright © 2004 & Trademark
by Wiley Publishing, Inc.
All rights reserved. Please read our Privacy Policy
.

Exhibit G
1
From www.wrox.com/dynamic/books/download.aspx February 17, 2003

package com.interface21.context;

import com.interface21.beans.factory.ListableBeanFactory;


/** Interface to provide configuration for a web application. This is
* read-only while the application is running, but may be reloaded if the
* implementation supports this.
* <p/>Can construct with a no arg constructor, then setServletContext()
* <p/>The configuration consists of:
* <ul>A set of WebApplicationListeners defined
* <ul>A set of config objects, identified by name. This will
* avoid the need for applications to use singletons.
* <ul>Access to the BeanFactory in which listeners and config objects
* are defined. This allows particular application objects to look for
* their own well-known objects by name.
* <li>
* </ul>
* @author Rod Johnson
* @since January 19, 2001
* @version $Revision: 1.1.1.1 $
*/
public interface ApplicationContext extends MessageSource, ListableBeanFactory {

/** Name of options bean. If none is supplied, DEFAULT_OPTIONS will be
used
*/
String OPTIONS_BEAN_NAME = "ApplicationContext.options";

/** Return the parent context, or null if there is no parent,
* and this is the root of the context hierarchy.
* @return the parent context, or null if there is no parent
*/
ApplicationContext getParent();

/** Friendly name for context
* @return a display name for the context
*/
String getDisplayName();


/** Notify all listeners registered with this application of
* a web application event. Events may be framework events (such as
RequestHandledEvent)
* or application-specific events.
* @param e event to publish
*/
void publishEvent(ApplicationEvent e);

/** Load or refresh the persistent representation of the configuration,
which
* might for example be an XML file, properties file or relational
database schema.
* @param servletConfig if the config is invalid
* @throws IOException if the config cannot be loaded
*/
Exhibit G
2
From www.wrox.com/dynamic/books/download.aspx February 17, 2003
void refresh() throws ApplicationContextException;


/** Return the timestamp when this context was first loaded
* @return the timestamp (ms) when this context was first loaded
*/
long getStartupDate();


/**
* Return context options. These control reloading etc.
* ApplicationContext implementations may subclass ContextOptions to
* add additional properties. It must always be a bean.
* @return context options. Never returns null. Context may be
* supplied as a bean in the default bean factory. If it is
* not supplied, the ApplicationContext implementation must supply
* a context.
*/
ContextOptions getOptions();

/**
* Put an object available for sharing. Note that this
* method is not synchronized. As with Java 2 collections,
* it's up to calling code to ensure thread safety.
* Also, this doesn't work in a cluster. It's
* analogous to putting something in a ServletContext.
* @param key object key
* @param o object to put
*/
void shareObject(String key, Object o);

/**
* Retrieve a shared object added with a call to shareObject().
* @return the object, or null if no object is known under
* this name (this is not an error).
*/
Object sharedObject(String key);

/**
* Remove a shared object added with a call to shareObject().
* Does nothing if the object was null.
* @param key the object was added with
* @return the object if it was found; or null.
*/
Object removeSharedObject(String key);

} // interface ApplicationContext

Exhibit H
1
From www.wrox.com/dynamic/books/download.aspx 15 February 2004

package com.interface21.context;

import com.interface21.beans.factory.ListableBeanFactory;


/** Interface to provide configuration for a web application. This is
* read-only while the application is running, but may be reloaded if the
* implementation supports this.
* <p/>Can construct with a no arg constructor, then setServletContext()
* <p/>The configuration consists of:
* <ul>A set of WebApplicationListeners defined
* <ul>A set of config objects, identified by name. This will
* avoid the need for applications to use singletons.
* <ul>Access to the BeanFactory in which listeners and config objects
* are defined. This allows particular application objects to look for
* their own well-known objects by name.
* <li>
* </ul>
* @author Rod Johnson
* @since January 19, 2001
* @version $Revision: 1.1.1.1 $
*/
public interface ApplicationContext extends MessageSource, ListableBeanFactory {

/** Name of options bean. If none is supplied, DEFAULT_OPTIONS will be
used
*/
String OPTIONS_BEAN_NAME = "ApplicationContext.options";

/** Return the parent context, or null if there is no parent,
* and this is the root of the context hierarchy.
* @return the parent context, or null if there is no parent
*/
ApplicationContext getParent();

/** Friendly name for context
* @return a display name for the context
*/
String getDisplayName();


/** Notify all listeners registered with this application of
* a web application event. Events may be framework events (such as
RequestHandledEvent)
* or application-specific events.
* @param e event to publish
*/
void publishEvent(ApplicationEvent e);

/** Load or refresh the persistent representation of the configuration,
which
* might for example be an XML file, properties file or relational
database schema.
* @param servletConfig if the config is invalid
* @throws IOException if the config cannot be loaded
*/
Exhibit H
2
From www.wrox.com/dynamic/books/download.aspx 15 February 2004
void refresh() throws ApplicationContextException;


/** Return the timestamp when this context was first loaded
* @return the timestamp (ms) when this context was first loaded
*/
long getStartupDate();


/**
* Return context options. These control reloading etc.
* ApplicationContext implementations may subclass ContextOptions to
* add additional properties. It must always be a bean.
* @return context options. Never returns null. Context may be
* supplied as a bean in the default bean factory. If it is
* not supplied, the ApplicationContext implementation must supply
* a context.
*/
ContextOptions getOptions();

/**
* Put an object available for sharing. Note that this
* method is not synchronized. As with Java 2 collections,
* it's up to calling code to ensure thread safety.
* Also, this doesn't work in a cluster. It's
* analogous to putting something in a ServletContext.
* @param key object key
* @param o object to put
*/
void shareObject(String key, Object o);

/**
* Retrieve a shared object added with a call to shareObject().
* @return the object, or null if no object is known under
* this name (this is not an error).
*/
Object sharedObject(String key);

/**
* Remove a shared object added with a call to shareObject().
* Does nothing if the object was null.
* @param key the object was added with
* @return the object if it was found; or null.
*/
Object removeSharedObject(String key);

} // interface ApplicationContext
Exhibit H
3
From www.wrox.com/dynamic/books/download.aspx 15 February 2004

package com.interface21.load;

import com.interface21.util.ResponseTimeMonitor;

/**
* run() from Runnable interface actually runs the test
* @author Rod Johnson
* @since February 9, 2001
*/
public interface Test extends Runnable {

void setName(String name);

// Init
void setTestSuite(AbstractTestSuite ts);

void setInstances(int count);

int getInstances();

void setFixture(Object context) ;

// These methods can be queried during work
int getTestsCompletedCount();
String getName();
int getErrorCount();
boolean isComplete();
int getPasses();

void setLongReports(boolean flag);

long getMaxPause();
void setMaxPause(long p);

void setPasses(int count);

double getTestsPerSecondCount();

long getElapsedTime();
long getTotalWorkingTime();

TestFailedException[] getFailureExceptions();

long getTotalPauseTime();
//ResponseTimeMonitoringAuditedResource getTargetResponse();

ResponseTimeMonitor getTargetResponse();

void reset();
}


Exhibit I
1
From www.wrox.com/dynamic/books/download.aspx 15 February 2004


package com.interface21.load;

import com.interface21.util.ResponseTimeMonitor;

/**
* run() from Runnable interface actually runs the test
* @author Rod Johnson
* @since February 9, 2001
*/
public interface Test extends Runnable {

void setName(String name);

// Init
void setTestSuite(AbstractTestSuite ts);

void setInstances(int count);

int getInstances();

void setFixture(Object context) ;

// These methods can be queried during work
int getTestsCompletedCount();
String getName();
int getErrorCount();
boolean isComplete();
int getPasses();

void setLongReports(boolean flag);

long getMaxPause();
void setMaxPause(long p);

void setPasses(int count);

double getTestsPerSecondCount();

long getElapsedTime();
long getTotalWorkingTime();

TestFailedException[] getFailureExceptions();

long getTotalPauseTime();
//ResponseTimeMonitoringAuditedResource getTargetResponse();

ResponseTimeMonitor getTargetResponse();

void reset();
}

Exhibit J
From sourceforge.net/projects/springframework/ 1 17 February 2004



: Shop ThinkGeek - Read Slashdot - freshmeat Downloads - Newsletters - TechJobs - Personals

Search »






my sf.net
software map
donate to sf.net
about sf.net

Login via SSL
New User via SSL

Search

Software/Group





SF.net Subscription
∙ Subscribe Now
∙ Manage Subscription
∙ Advanced Search
∙ Direct Download
∙ Priority Tech Support
∙ Project Monitoring

SF.net Resources
∙ Site Docs
∙ Site Status
(02/16)

∙ Site Map
∙ SF.net Supporters
∙ Compile Farm
∙ Foundries
∙ Project Help Wanted
∙ New Releases
∙ Get Support

Site Sponsors







Project: Spring Framework: Summary







Summary | Admin | Home Page | Forums | Tracker | Lists | CVS |
Files |


Java/J2EE application framework based on
[Expert One-on-One J2EE Design and
Development] by Rod Johnson. Includes
JavaBeans-based configuration, an AOP
framework, declarative transaction management,
JDBC and Hibernate support, and a web MVC
framework.
:Java Foundry
• Development Status: 5 -
Production/Stable
• Environment: Web Environment
• Intended Audience: Developers
• License: Apache Software License
• Natural Language: English
• Operating System: OS Independent
• Programming Language: Java
• Topic: Software Development


Developer Info

Project Admins:
jhoeller
johnsonr

Developers:
12 [View Members]




Exhibit J
From sourceforge.net/projects/springframework/ 2 17 February 2004

Most Active

1 Gaim
2 guliverkli
3 BZFlag - Multiplayer
3D Tank Game
4 Azureus - BitTorrent
Client
5 AWStats
6 phpMyAdmin
7 eGroupWare:
Enterprise
Collaboration
8 Compiere ERP +
CRM Business
Solution
9 ScummVM
10 Webmin
More Activity>>

Top Downloads

More Statistics>>

SF.net Services

∙ Personals
∙ Tech Jobs
∙ Books Online
∙ Comparison Shop
∙ Partner Product
Offers

Sponsored Content





Project UNIX name: springframework
Registered: 2003-02-05 14:24
Activity Percentile (last week): 98.7341%
View project activity statistics
View list of RSS feeds available for this project
Need support? See the support instructions
provided by this project.
Latest File Releases

Package
Version

Date
Notes /
Monitor
Download
springframework
1.0
RC1
February 10,
2004
-

Download
[View ALL Project Files]
Public Areas

Project Home Page

Tracker
There are no public trackers available

Public Forums ( 1530 messages in 2 forums )

Mailing Lists ( 2 total )

CVS Repository ( 1,721 commits, 995 adds )
- Browse CVS



Powered by SourceForge(tm) collaborative software development tools from VA Software
© Copyright 2004 - OSDN Open Source Development Network, All Rights Reserved
About SourceForge.net • About OSDN • Privacy Statement • Terms of Use • Advertise • Self Serve
Ad System • Get Support


Exhibit K

1

Downloaded from sourceforge.net/projects/springframework/ 15 February 2004
package org.springframework.samples.petclinic;

/**
* Simple JavaBean domain object representing an person.
*
* @author Ken Krebs
*/
public class Person extends Entity {

/** Holds value of property firstName. */
private String firstName;

/** Holds value of property lastName. */
private String lastName;

/** Holds value of property address. */
private String address;

/** Holds value of property city. */
private String city;

/** Holds value of property telephone. */
private String telephone;

/** Getter for property firstName.
* @return Value of property firstName.
*/
public String getFirstName() {
return this.firstName;
}

/** Setter for property firstName.
* @param firstName New value of property firstName.
*/
public void setFirstName(String firstName) {
this.firstName = firstName;
}

/** Getter for property lastName.
* @return Value of property lastName.
*/
public String getLastName() {
return this.lastName;
}

/** Setter for property lastName.
* @param lastName New value of property lastName.
*/
public void setLastName(String lastName) {
this.lastName = lastName;
}

/** Getter for property address.
* @return Value of property address.
*/
public String getAddress() {
return this.address;
Exhibit K

2

Downloaded from sourceforge.net/projects/springframework/ 15 February 2004
}

/** Setter for property address.
* @param address New value of property address.
*/
public void setAddress(String address) {
this.address = address;
}

/** Getter for property city.
* @return Value of property city.
*/
public String getCity() {
return this.city;
}

/** Setter for property city.
* @param city New value of property city.
*/
public void setCity(String city) {
this.city = city;
}

/** Getter for property telephone.
* @return Value of property telephone.
*/
public String getTelephone() {
return this.telephone;
}

/** Setter for property telephone.
* @param telephone New value of property telephone.
*/
public void setTelephone(String telephone) {
this.telephone = telephone;
}

}
Exhibit L
1

Downloaded from sourceforge.net/projects/springframework/ 15 February 2004

package org.springframework.samples.petclinic;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import org.springframework.beans.support.MutableSortDefinition;
import org.springframework.beans.support.PropertyComparator;

/**
* Simple JavaBean business object representing a pet.
*
* @author Ken Krebs
* @author Juergen Hoeller
*/
public class Pet extends NamedEntity {

private Date birthDate;

private PetType type;

private Owner owner;

private Set visits;

public void setBirthDate(Date birthDate) {
this.birthDate = birthDate;
}

public Date getBirthDate() {
return this.birthDate;
}

public void setType(PetType type) {
this.type = type;
}

public PetType getType() {
return type;
}

protected void setOwner(Owner owner) {
this.owner = owner;
}

public Owner getOwner() {
return owner;
}

protected void setVisitsInternal(Set visits) {
this.visits = visits;
}

protected Set getVisitsInternal() {
Exhibit L
2

Downloaded from sourceforge.net/projects/springframework/ 15 February 2004

if (this.visits == null) {
this.visits = new HashSet();
}
return this.visits;
}

public List getVisits() {
try {
List sortedVisits = new ArrayList(getVisitsInternal());
PropertyComparator.sort(sortedVisits, new
MutableSortDefinition("date", false, false));
return Collections.unmodifiableList(sortedVisits);
}
catch (RuntimeException ex) {
ex.printStackTrace();
throw ex;
}
}

/**
* Method to add a visit to the List of visits.
* @param visit New visit to be added to the List of visits
*/
public void addVisit(Visit visit) {
getVisitsInternal().add(visit);
visit.setPet(this);
}

}
` Exhibit M
1

Downloaded from sourceforge.net/projects/springframework/ 15 February 2004

package org.springframework.samples.jpetstore.web.spring;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.support.PagedListHolder;
import org.springframework.samples.jpetstore.domain.Category;
import org.springframework.samples.jpetstore.domain.logic.PetStoreFacade;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.Controller;

/**
* @author Juergen Hoeller
* @since 30.11.2003
*/
public class ViewCategoryController implements Controller {

private PetStoreFacade petStore;

public void setPetStore(PetStoreFacade petStore) {
this.petStore = petStore;
}

public ModelAndView handleRequest(HttpServletRequest request,
HttpServletResponse response) throws Exception {
Map model = new HashMap();
String categoryId = request.getParameter("categoryId");
if (categoryId != null) {
Category category = this.petStore.getCategory(categoryId);
PagedListHolder productList = new
PagedListHolder(this.petStore.getProductListByCategory(categoryId));
productList.setPageSize(4);

request.getSession().setAttribute("ViewProductAction_category", category);

request.getSession().setAttribute("ViewProductAction_productList",
productList);
model.put("category", category);
model.put("productList", productList);
}
else {
Category category = (Category)
request.getSession().getAttribute("ViewProductAction_category");
PagedListHolder productList = (PagedListHolder)
request.getSession().getAttribute("ViewProductAction_productList");
if (category == null || productList == null) {
throw new IllegalStateException("Cannot find pre-loaded
category and product list");
}
String page = request.getParameter("page");
if ("next".equals(page)) {
productList.nextPage();
}
else if ("previous".equals(page)) {
` Exhibit M
2

Downloaded from sourceforge.net/projects/springframework/ 15 February 2004

productList.previousPage();
}
model.put("category", category);
model.put("productList", productList);
}
return new ModelAndView("Category", model);
}

}
Exhibit N
From monkeymachine.co.uk/spring/xref/index.html
1
17 February 2004
1
/*
2
* The Spring Framework is published under the terms
3
* of the Apache Software License.
4
*/
5

6
package org.springframework.aop
;
7

8
/***
9
* Tag interface for Advisors that work through interception.
10
* Mainly used for framework purposes.
11
* @author Rod Johnson
12
* @version $Id: InterceptionAdvisor.java,v 1.1 2003/11/15 15:29:55
johnsonr Exp $
13
*/
14
public interface InterceptionAdvisor
extends Advisor
{
15

16
}


Exhibit N
From monkeymachine.co.uk/spring/xref/index.html
2
17 February 2004
1
/*
2
* The Spring Framework is published under the terms
3
* of the Apache Software License.
4
*/
5

6
package org.springframework.web.servlet.mvc
;
7

8
import javax.servlet.http.HttpServletRequest;
9
import javax.servlet.http.HttpServletResponse;
10

11
import org.springframework.validation.BindException;
12
import org.springframework.web.bind.ServletRequestDataBinder;
13
import org.springframework.web.servlet.ModelAndView;
14

15
/***
16
* <p>Abstract base class for custom command controllers.
Autopopulates a
17
* command bean from the request. For command validation, a
validator
18
* (property inherited from BaseCommandController) can be used.</p>
19
*
20
* <p>This command controller should preferrable not be used to
handle form
21
* submission, because functionality for forms is more offered in
more
22
* detail by the {@link
org.springframework.web.servlet.mvc.AbstractFormController
23
* AbstractFormController} and its corresponding
implementations.</p>
24
*
25
* <p><b><a name="config">Exposed configuration properties</a>
26
* (<a href="AbstractController.html#config">and those defined by
superclass</a>):</b><br>
27
* <i>none</i> (so only those available in superclass).</p>
28
*
29
* <p><b><a name="workflow">Workflow
30
* (<a name="BaseCommandController.html#workflow">and that defined
by superclass</a>):</b><br>
31
*
32
* @author Rod Johnson
33
* @author Juergen Hoeller
34
* @see #setCommandClass
35
* @see #setCommandName
36
* @see #setValidator
37
*/
38
public abstract class AbstractCommandController
extends
BaseCommandController
{
39

40
/***
41
* Create a new AbstractCommandController.
42
*/
43
public AbstractCommandController
() {
44
}
45

46
/***
47
* Create a new AbstractCommandController.
48
* @param commandClass class of the command bean
Exhibit N
From monkeymachine.co.uk/spring/xref/index.html
3
17 February 2004
49
*/
50
public AbstractCommandController
(Class commandClass) {
51
setCommandClass(commandClass);
52
}
53

54
/***
55
* Create a new AbstractCommandController.
56
* @param commandClass class of the command bean
57
* @param commandName name of the command bean
58
*/
59
public AbstractCommandController
(Class commandClass, String
commandName) {
60
setCommandClass(commandClass);
61
setCommandName(commandName);
62
}
63

64
protected final ModelAndView

handleRequestInternal(HttpServletRequest request, HttpServletResponse
response)
65
throws Exception {
66
Object command = getCommand(request);
67
ServletRequestDataBinder binder =
bindAndValidate(request, command);
68
return handle(request, response, command,
binder.getErrors());
69
}
70

71
/***
72
* Template method for request handling, providing a populated
and validated instance
73
* of the command class, and an Errors object containing binding
and validation errors.
74
* <p>Can invoke <code>errors.getModel()</code> to populate the
ModelAndView model
75
* with the command and the Errors instance, under the specified
command name.
76
* @param request current HTTP request
77
* @param response current HTTP response
78
* @param command the populated command object
79
* @param errors validation errors holder
80
* @return a ModelAndView to render, or null if handled directly
81
* @see org.springframework.validation.Errors
82
*/
83
protected abstract ModelAndView
handle(HttpServletRequest
request, HttpServletResponse response,
84
Object command,
BindException errors) throws Exception;
85

86
}

Exhibit N
From monkeymachine.co.uk/spring/xref/index.html
4
17 February 2004
1
/*
2
* The Spring Framework is published under the terms
3
* of the Apache Software License.
4
*/
5

6
package org.springframework.jndi
;
7

8
import java.util.Properties;
9

10
import javax.naming.Context;
11
import javax.naming.InitialContext;
12
import javax.naming.NamingException;
13

14
import org.apache.commons.logging.Log;
15
import org.apache.commons.logging.LogFactory;
16

17
/***
18
* Helper class that simplifies JNDI operations. It provides
methods to lookup
19
* and bind objects, and allows implementations of the
ContextCallback interface
20
* to perform any operation they like with a JNDI naming context
provided.
21
*
22
* <p>This is the central class in this package. It is analogous to
the
23
* JdbcTemplate class. This class performs all JNDI context
handling.
24
*
25
* @author Rod Johnson
26
* @author Juergen Hoeller
27
* @see ContextCallback
28
* @see org.springframework.jdbc.core.JdbcTemplate
29
* @version $Id: JndiTemplate.java,v 1.4 2004/02/09 10:46:09
jhoeller Exp $
30
*/
31
public class JndiTemplate
{
32

33
protected final Log logger = LogFactory.getLog(getClass());
34

35
private Properties environment;
36

37
/***
38
* Create a new JndiTemplate instance.
39
*/
40
public JndiTemplate
() {
41
}
42

43
/***
44
* Create a new JndiTemplate instance, using the given
environment.
45
*/
46
public JndiTemplate
(Properties environment) {
47
this.environment = environment;
48
}
49

50
/***
Exhibit N
From monkeymachine.co.uk/spring/xref/index.html
5
17 February 2004
51
* Set the environment for the JNDI InitialContext.
52
*/
53
public void setEnvironment(Properties environment) {
54
this.environment = environment;
55
}
56

57
/***
58
* Return the environment for the JNDI InitialContext.
59
*/
60
public Properties getEnvironment() {
61
return environment;
62
}
63

64
/***
65
* Execute the given JNDI context callback implementation.
66
* @param contextCallback ContextCallback implementation
67
* @return a result object returned by the callback, or null
68
* @throws NamingException thrown by the callback implementation
69
* @see #createInitialContext
70
*/
71
public Object execute(ContextCallback
contextCallback) throws
NamingException {
72
Context ctx = createInitialContext();
73
try {
74
return contextCallback.doInContext(ctx);
75
}
76
finally {
77
try {
78
ctx.close();
79
}
80
catch (NamingException ex) {
81
logger.warn("Could not close JNDI
InitialContext", ex);
82
}
83
}
84
}
85

86
/***
87
* Create a new JNDI initial context. Invoked by execute.
88
* The default implementation use this template's environment
settings.
89
* Can be subclassed for custom contexts, e.g. for testing.
90
* @return the initial Context instance
91
* @throws NamingException in case of initialization errors
92
*/
93
protected Context createInitialContext() throws NamingException
{
94
return new InitialContext(getEnvironment());
95
}
96

97
/***
98
* Lookup the object with the given name in the current JNDI
context.
99
* @param name the JNDI name of the object
100
* @return object found (cannot be null; if a not so well-
behaved
Exhibit N
From monkeymachine.co.uk/spring/xref/index.html
6
17 February 2004
101
* JNDI implementations returns null, a NamingException gets
thrown)
102
* @throws NamingException if there is no object with the given
103
* name bound to JNDI
104
*/
105
public Object lookup(final String name) throws NamingException {
106
return execute(new ContextCallback
() {
107
public Object doInContext(Context ctx) throws
NamingException {
108
logger.debug("Looking up JNDI object with
name '" + name + "'");
109
Object located = ctx.lookup(name);
110
if (located == null) {
111
throw new NamingException("JNDI
object not found: JNDI implementation returned null");
112
}
113
return located;
114
}
115
});
116
}
117

118
/***
119
* Bind the given object to the current JNDI context, using the
given name.
120
* @param name the JNDI name of the object
121
* @param object the object to bind
122
* @throws NamingException thrown by JNDI, mostly name already
bound
123
*/
124
public void bind(final String name, final Object object) throws
NamingException {
125
execute(new ContextCallback
() {
126
public Object doInContext(Context ctx) throws
NamingException {
127
logger.info("Binding JNDI object with
name '" + name + "'");
128
ctx.bind(name, object);
129
return null;
130
}
131
});
132
}
133

134
/***
135
* Remove the binding for the given name from the current JNDI
context.
136
* @param name the JNDI name of the object
137
* @throws NamingException thrown by JNDI, mostly name not found
138
*/
139
public void unbind(final String name) throws NamingException {
140
execute(new ContextCallback
() {
141
public Object doInContext(Context ctx) throws
NamingException {
142
logger.info("Unbinding JNDI object with
name '" + name + "'");
143
ctx.unbind(name);
144
return null;
145
}
Exhibit N
From monkeymachine.co.uk/spring/xref/index.html
7
17 February 2004
146
});
147
}
148

149
}