Beginning Spring Framework 2


The Spring Framework is designed from the ground up to make it easier than ever to develop server-side applications with Java Enterprise Edition. With this book as your guide, you’ll quickly learn how to use the latest features of Spring 2 and other open-source tools that can be downloaded for free on the web. With each subsequent chapter, you’ll explore an area of Spring application design and development as you walk through the steps involved in building a larg ...

See more details below
Available through our Marketplace sellers.
Other sellers (Paperback)
  • All (14) from $1.99   
  • New (3) from $5.41   
  • Used (11) from $1.99   
Sort by
Page 1 of 1
Showing All
Note: Marketplace items are not eligible for any coupons and promotions
Seller since 2009

Feedback rating:



New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.

2007-12-10 Paperback 1 New 047010161X Ships Within 24 Hours. Tracking Number available for all USA orders. Excellent Customer Service. Upto 15 Days 100% Money Back Gurantee. Try ... Our Fast! ! ! ! Shipping With Tracking Number. Read more Show Less

Ships from: Bensalem, PA

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
Seller since 2008

Feedback rating:


Condition: New

Ships from: BAY SHORE, NY

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
Seller since 2008

Feedback rating:


Condition: New

Ships from: Chicago, IL

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
Page 1 of 1
Showing All
Sort by
Sending request ...


The Spring Framework is designed from the ground up to make it easier than ever to develop server-side applications with Java Enterprise Edition. With this book as your guide, you’ll quickly learn how to use the latest features of Spring 2 and other open-source tools that can be downloaded for free on the web. With each subsequent chapter, you’ll explore an area of Spring application design and development as you walk through the steps involved in building a larg production-scale example.

Read More Show Less

Product Details

  • ISBN-13: 9780470101612
  • Publisher: Wiley
  • Publication date: 12/10/2007
  • Series: Wrox Beginning Guides Series
  • Edition number: 1
  • Pages: 472
  • Product dimensions: 7.40 (w) x 9.30 (h) x 1.14 (d)

Meet the Author

Thomas Van de Velde has extensive experience developing high-traffic public-facing web sites across a wide range of industries. As a consultant and project manager for one of the leading global technology consulting firms, he has worked on delivering the French online tax declaration and one of the United States’ largest sports sites. Thomas is passionate about finding ways to leverage open source in the enterprise, and in his free time tries to catch a wave in southern California where he lives with his wife and daughter.

Bruce Snyder is a veteran of enterprise software development and a recognized leader in open-source software. Bruce has experience in a wide range of technologies including Java EE, messaging, and serviceoriented architecture. In addition to his role as a principal engineer for IONA Technologies, Bruce is also a founding member of Apache Geronimo and a developer for Apache ActiveMQ, Apache ServiceMix, and Castor, among other things. Bruce serves as a member of various JCP expert groups and is the co-author of Professional Apache Geronimo from Wrox Press. Bruce is also a frequent speaker at industry conferences, including the Colorado Software Summit, TheServerSide Java Symposium, Java in Action, JavaOne, ApacheCon, JAOO, SOA Web Services Edge, No Fluff Just Stuff, and various Java users groups. Bruce lives in beautiful Boulder, Colorado with his family.

Christian Dupuis is working for one of the world’s leading consulting companies and is a member of the Technical Architecture capability group. Christian has been working as a technical architect and implementation lead to design and implement multi-channel, mission-critical financial applications that leverage Spring and other open-source frameworks across all tiers. Christian is co-lead of the Spring IDE open-source project (, providing tool support for the Spring Portfolio.

Sing Li (who was bitten by the microcomputer bug in the late 1970s) has grown up in the Microprocessor Age. His first personal computer was a $99 do-it-yourself Netronics COSMIC ELF computer with 256 bytes of memory, mail-ordered from the back pages of Popular Electronics magazine. A 25-year industry veteran, Sing is a system developer, open-source software contributor, and freelance writer specializing in Java technology and embedded and distributed systems architecture. He regularly writes for several popular technical journals and e-zines, and is the creator of the Internet Global Phone, one of the very first Internet phones available. He has authored and co-authored a number of books across diverse technical disciplines including Geronimo, Tomcat, JSP, servlets, XML, Jini, media streaming, device drivers, and JXTA.

Anne Horton has worked in the software industry for 24 years as a software engineer, textbook technical editor, author, and Java architect. She currently works for Lockheed Martin and spends her weekends working with Sing Li (author) and Sydney Jones (editor) in developing bleeding-edge books such as this one. You can email her at

Naveen Balani works as an architect with IBM India Software Labs (ISL). He leads the design and development activities for the WebSphere Business Service Fabric product out of ISL. He likes to research upcoming technologies and is a regular contributor to IBM developer works covering such topics as web services, ESB, JMS, SOA, architectures, open-source frameworks, semantic web, J2ME, persuasive computing, the Spring series, AJAX, and various IBM products. You can e-mail him at

Read More Show Less

Table of Contents

Acknowledgments x

Introduction xix

Chapter 1: Jump Start Spring 2 1

All About Spring 2

Focus on Simplicity 2

Applying Spring 2

Creating a Modularized Application 3

Using Spring to Configure a Modularized Application 8

Wiring Beans Automatically by Type 14

Understanding Spring’s Inversion of Control (IoC) Container 16

Adding Aspect-Oriented Programming to the Mix 20

Adding a Logging Aspect 21

Beyond Plumbing — Spring API Libraries 25

Using Spring APIs To Facilitate Application Creation 26

Summary 27

Chapter 2: Designing Spring Applications 29

Overview of the PIX Album-Management System 30

The PIX System Requirements 31

Discovering the Domain Model 33

The PixUser POJO 33

The Affiliate POJO 35

The Picture Object 36

The Album POJO 37

The Comment POJO 38

The POJO Relationships 39

The Importance of Unit Testing 45

POJO-Based Design and Containerless Unit Testing 46

Regression Testing 46

Working with a Unit-Testing Framework 47

Summary 52

Chapter 3: Spring Persistence Using JPA 53

Java Persistence 54

JDBC Architecture 54

Traditional JDBC Approach 56

DAO — Unifying Data Access 64

Spring DAO Support 64

Spring Exception Translation 73

Spring and JPA 74

Entities 74

Spring as a JPA Container 81

About JPA APIs 81

JPA the Easy Way — Using Annotations 81

SPRING JPA Exception Translation 82


Spring JPA Configuration 84

Persistence and the PIX Domain Model 87

Persisting The PixUser POJO 87

Implementing PixUser Repository DAO 89

Implementing the Album Repository DAO 90

Testing the Persistence Layer 91

Spring Test Support 92

Executing the Persistence Test Suite 92

Testing the PIX Repositories 92

Summary 93

Chapter 4: Using Spring MVC to Build Web Pages 95

The MVC Architectural Pattern 95

The Sample Application’s Architecture 96

Spring MVC Development 99

Processing Web Requests with Controllers 99

Presenting the Model with a View 105

Getting Data from the User with Forms 109

A Basic Form-Submission Workflow 109

Using the Form View 112

When Things Go Wrong 123

Summary 124

Chapter 5: Advanced Spring MVC 125

Submitting a Form Across Multiple Pages 126

Adding Pictures to an Album 126

Developing Wizard Form Pages 127

Implementing Wizard Form Actions 131

Validating Data Submitted Through a Wizard 132

Uploading Files 133

Getting More Stuff Done with the Same Controller 134

Creating a Different View 137

Your First View 138

Saving an Album to PDF 139

Generating an RSS Feed 142

Personalization 146

Retrieving Text Labels from a Message Source 146

Displaying Application Labels in a Different Language 148

Changing the Application’s Language Settings 150

Allowing the User to Personalize the Application 151

Summary 154

Chapter 6: Spring Web Flow 155

Examining a Sample Work Flow for Loan Applications 156

Introducing Spring Web Flow 157

How SWF Works with Spring MVC 158

Launching Flows 159

Implementing SWF in the PixWeb Application 161

The Login Flow 161

The Album Creation Flow 176

Implementing Actions 178

Implementing Views 181

Testing Flows 183

Architectural Overview 185

Advanced Topics 186

REST-Style URLs 187

Flow Execution Repositories 188

Flow Execution Repository Implementations 189

Subflows and Attribute Mappers 189

Flow Execution Listeners 189

Exception Handlers 190

Summary 190

Chapter 7: Ajax and Spring: Direct Web Remoting Integration 191

Web 2.0: The World of Ajax 192

Ajax Basics 192

Client-Side Ajax Development with JavaScript 194

The XMLHttpRequest Object 194

Introducing Direct Web Remoting 2 199

Downloading DWR 2 201

Working with DWR 2 202

Integrating Spring and DWR 2 210

Summary 229

Chapter 8: Spring and JMS — Message-Driven POJOs 231

JMS Concepts 232

JMS Messaging Domains 232

Point-To-Point Messaging 232

Publish/Subscribe Messaging 233

Persistence versus Durability 234

The JMS Message 234

Message Header 234

Message Properties 235

Message Selectors 235

Message Body 235

Producing JMS Messages 236

Consuming JMS Messages 236

Synchronous Message Consumption 236

Asynchronous Message Consumption 237

The Spring JMS Framework 238

The Spring JMS Packages 238

The JmsTemplate Class 239

Message Listener Containers 240

Destinations 241

Transactions 241

Configuring Message-Driven POJOS 241

Realizing the JMS Use Case 242

Modeling Message-Driven POJOs 242

The PIX Web POJOS 242

Changing the PIX Web POJOs Into Message-Driven POJOs 245

A JMS Provider — Apache ActiveMQ 247

The JMS Template in the PIX Web Application 253

Summary 256

Chapter 9: Spring Web Services and Remoting 259

Web Service Benefits 260

Introducing Web Services 260

Web Services Architecture 261

The Network Layer 261

XML 261

SOAP 262

WSDL 262

UDDI 264

Web Services Interactions 265

Web Services Interoperability 266

Java Web Service Technologies 266

Java Web Application Web Services 266

Spring Remoting 268

SOAP Frameworks 268

Java-to-XML Bindings 269

XFire 269

Spring Web Services with XFire 270

Realizing the PIX AffiliateManagement Use Case 270

Invoking Web Services 277

SOAP Handlers 278

Testing SOAP Handlers with XFire 278

Summary 284

Chapter 10: Web Service Consumer and Interoperation with .NET 285

Creating Web Service Consumers — Overview 286

Describing Web Services with WSDL 286

Creating a Web Service Consumer with XFire 287

The XFire Maven Plugin 287

Invoking Web Service Methods via XFire-Generated Stubs 287

Understanding the E-Mail-Validation Web Service Consumer in PIX 288

Examining a WSDL Document 290

WSDL Description of a Web Service Endpoint 291

Generating Web Service Stubs from WSDL Using XFire 292

The XFire WsGen Tool 294

Generated Interface for Invocation of Web Service 295

Creating a Web Service Consumer with XFire-Generated Stubs 295

Add a Web Service Consumer to PIX 300

Web Service Interoperability 304

WS-I and Web Service Interoperability 304

Expose PIX Service for .NET Web Service Consumers 304

Summary 313

Chapter 11: Rapid Spring Development with Spring IDE 315

Brief Feature Overview 316

Installing and Setting Up Your Eclipse Environment 317

Installing Spring IDE 317

Preparing an Eclipse Project 319

Support for Spring Beans Configuration Files 325

Viewing Spring Bean Definitions 325

Validating Spring Bean Definition Files 328

XML Editing 332

Searching for and Navigating to Bean Definitions 335

Visual Support for Spring AOP Configurations 337

Enabling AOP Support for Spring Projects 338

Working with Spring IDE’s AOP Support 339

Integration with the AspectJ Development Tools 343

Web Flow Development with Spring IDE 344

Setting Up Your Spring Web Flow Project 344

Validating Spring Web Flow Definition Files 348

Editing Spring Web Flow Definition Files 350

Graphical Editor for Web Flow Definitions 351

Summary 353

Chapter 12: Spring AOP and AspectJ 355

Comparing Aspect-Oriented Programming to Object-Oriented Programming 355

What Is AOP? 357

Crosscutting Concerns 357

AOP in Spring 361

XML Schema-Based Support 362

The AOP Namespace Explored 362

Advice Parameters 367

AspectJ Support 368

@AspectJ Explored 368

@AspectJ-Style Advice 372

Performance Monitoring with AOP and JETM 376

Summary 379

References 380

Chapter 13: More AOP: Transactions 381

Understanding Transactions 382

Understanding Spring Transaction Management 383

Spring Transaction Abstraction 384

Applying AOP to Transactions 387

Adding Spring Transaction Support to PIX 38

Selecting the Transaction Manager 389

Coding Spring Transactions 397

Global Transactions 405

Summary 406

Appendix A: Maven 2 Basics 407

Appendix B: Spring and Java EE 439

Appendix C: Getting Ready for the Code Examples 451

Index 453

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star


4 Star


3 Star


2 Star


1 Star


Your Rating:

Your Name: Create a Pen Name or

Barnes & Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation


  • - By submitting a review, you grant to Barnes & and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Terms of Use.
  • - Barnes & reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing 1 Customer Reviews
  • Anonymous

    Posted April 26, 2008

    Could Have Been a Good Book

    Could Have Been A Good Book, April 26, 2008 By Robert Skorskovic - See all my reviews I feel this book could have been good because the authors attempt a broad-sweeping introduction in a short and to-the-point manner. Sadly, however, I nearly gave up on this book when I realized the authors/editors hadn't gone through and unit-tested each chapter's code and content for reasonable logical soundness from a pedagogical perspective. I ran into issues running simple tests because data tables were not created in the outlined setup process. More than just the issues with the code though, I felt from the onset that the authors did a poor job with the writing itself. These guys gloss over some concepts as if in haste to complete the book. The authors and editors, I feel, just did a poor job of creating an effective instructional instrument. To further its demise, the book's forum is poorly supported by the authors. There are barely any solutions to posted problems and the readers are struggling to help themselves one bug at a time with the poorly tested code and book instructions. I am of the frame of mind that learning a framework should be fun and interesting. The shoddy editorial work on this project makes learning painful and agonizingly annoying. Onto a better book for me...

    Was this review helpful? Yes  No   Report this review
Sort by: Showing 1 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)