Using JPA in Spring without referencing Spring

Engineering | Ben Hale | August 07, 2006 | ...

Spring 2.0 has added support for the JPA data access standard with all of the standard Spring support classes one would expect. Mark Fisher has a great post on how to use this new support. However one of the questions that we keep getting is why one would want to use a Spring class (JpaTemplate) to access an EntityManager. The best answer for this question lies in the value add that JpaTemplate provides. In addition to providing the one-liner convenience methods that are a hallmark of Spring data access, it also provides automatic participation in transactions and translation from

10 Common Misconceptions About Spring

Engineering | Mark Fisher | August 04, 2006 | ...

Yesterday there were a few posts related to the forthcoming Beginning Spring 2 book, and I wanted to point those out here.

First, since this book will be of interest to those new to Spring - or even those who are simply curious at this point, we decided that it would be a good idea to include some discussion of common misconceptions about Spring. These have been posted here:
http://www.oreillynet.com/onjava/blog/2006/08/ten_common_misconceptions_abou.html
and on the Apress blog: http://ablog.apress.com/?p=1221.



Second, Interface21's Steven Devijver, the book's tireless lead author, has posted a great overview:
http://blog.interface21.com/main/2006/08/03/finishing-beginning-spring-2-from-novice-to-professional/.


The book, Beginning Spring 2: from Novice to Professional, will be in stores this October. While it aims to provide a gentle introduction appropriate for new Spring users, it will also be very useful for "filling in the gaps" even if you have been using the Spring Framework for a while. In other words, the book covers a lot of ground: the Spring container, AOP, data acess, MVC, and more. The coverage includes many new Spring 2.0 features - most notably an entire chapter exploring Spring's new and improved approach to AOP such as the XSD-based AOP namespace, integration with the AspectJ pointcut expression language, and @AspectJ integration! (Don't worry Spring 2 is backwards compatible - and the migration path is easy too). Throughout, the book provides a pragmatic balance of theory and examples. Those examples are backed by an interesting sample application (not overly simplistic). I personally was delighted when Steven asked me to contribute some exercises - yet another of his great ideas for providing an excellent resource to beginners. The first set of exercises walk through several techniques of dependency injection from basic wiring to the use of FactoryBeans and externalizing properties files. The second set of exercises are focused on AOP - including the new namespace and the @AspectJ style.

We are looking forward to an active companion site after the book's release, and of course you can continue to find many great discussions and examples of Spring 2.0 features here at the Interface21 team blog.

Finishing \"Beginning Spring 2: from Novice to Professional\"

Engineering | admin | August 03, 2006 | ...

To celebrate the launch of the new i21 team blog I take this opportunity to introduce a new Spring book that's coming up shortly. It's titled "Beginning Spring 2: from Novice to Professional" and is published by Apress. I've co-authored this book with Mark Fisher (i21), Bram Smeets (of DWR fame) and Seth Ladd (of "Expert Spring MVC and Web Flow" fame). Rob Harrop is the technical reviewer.

The book is targeted - as you might have guessed - to beginning users of the Spring Framework. Now the funny thing about Spring is that you're always a beginner in some areas. The framework offers so much…

AOP Configuration Choices in Spring 2.0

Engineering | Ben Hale | August 03, 2006 | ...

There are a lot of reasons to love working at Interface21, but by far the best has to be working with the leaders of the industry. For example, one of Spring 2.0's major focus points has been on improving AOP support. We've added a new configuration namespace, the AspectJ pointcut language and support for @AspectJ aspects. But this leaves a big question; what is the preferred way of writing Aspects in Spring 2.0? Since I'm an I21 employee, I have the luck of getting the answer straight from the horse's mouth.

I posited the question to Adrian Colyer, the Chief Scientist at Interface21 and…

Experience Spring in December in Hollywood, Florida

Engineering | Keith Donald | August 03, 2006 | ...

Over the last month Jay Zimmerman and I have been working hard planning The Spring Experience 2006 (TSE). Creating a first-class technical conference is no easy task--it takes hour upon hours to arrive at the perfect mix of speakers and content.

I am proud to say we are now ready to roll with an unprecedented event. Check it out:

The Spring Experience 2006

I hope to see you there. Here is what I believe sets this show apart:
  • 55 ninety-minute sessions across 5 tracks over 3-full days, all at a five-star beach resort.
  • Exclusive premium technical content on Spring 2.0. Half of the sessions are led by core Spring developers who apply the latest Spring capabilities inside and out. This includes Rod Johnson, Juergen Hoeller, Adrian Colyer, Rob Harrop, Colin Sampaleanu, Ben Alex, Arjen Poutsma, Erwin Vervaet, and yours truly.
  • Cutting edge sessions from leading Java software innovators. This includes Jeff McCaffer, lead of the Eclipse RCP and Equinox projects; Guilluame LaForge, Groovy project lead; Eamonn McManus, JMX Lead; Patrick Linskey, BEA Kodo JPA lead, and Mike Keith, lead of the Java Persistence Architecture (JPA).
  • Privileged access to synced-audio slideshows for all sessions following the show, so you don't miss a beat.
  • Full-course breakfast, lunch, and dinner included with registration.
  • "Meet the Gurus" user BOFs. A great opportunity for Spring users to interact with Spring project leads.
  • Two kick ass parties, one Friday night, and a Saturday afternoon party on the beach complete with a Spring users vs. developers volleyball game.
  • Cool conference schwag. And lots of it. Registered experiencers' receive an all access conference pass, a custom (and very cool) TSE laptop bag, a custom-designed notebook binder, a limited-edition TSE 2006 shirt, and even an official TSE 2006 beach towel. You'll have chances to win an iPod and XBox 360.
  • Diversity. Whether you are a hard core enterprise developer, a web application developer, or a leading software architect, this conference has something for you. Last year's show brought 250 people from 20 countries. This year we expect 500 attendees from over 25. It's going to be a lot of fun, and a great learning and networking opportunity.
There is no better place to be than Hollywood, Florida in December. See you and your team at The Spring Experience 2006!

What are you looking forward to in Spring 2.0?

Engineering | Ben Hale | August 02, 2006 | ...

Spring 2.0 is coming and I for one am excited. I can still remember the first time that I heard about all of the new features that would be in the release at last year's The Spring Experience. The asynchronous JMS message reception and the AOP integration with AspectJ excited me the most (a bit of drooling involved actually), but even then there were many other improvements and the list has only grown since.

Alas, I know that most of you aren't middle-tier nerds like me, so what are you excited about? The new XML dialects and XSD support? The improved JSP taglib? How about that <tx:annotation-driven />? Maybe you love that Groovy…

Sydney Spring User Group Meeting #2 Planned

Engineering | Ben Alex | July 29, 2006 | ...
In my last blog entry I promised to advise details of our next user group meeting. After hunting around for a suitable venue, it’s now organised for Monday 7 August 2006 at Cliftons, 200 George Street, Sydney. We have two presentations planned. First up I will be talking about Spring 2.0 namespaces, and then Ramon Buckland from Infocomp will be presenting SOA and JBI with Spring.Visit Springframework.org for full details.

Hope to see you there.

Welcome to the Interface21 Team Blog

Engineering | Keith Donald | July 07, 2006 | ...

As Interface21 grows as a global company one thing has become more and more clear to me everyday:

we really have some damn talented, highly motivated leaders who have a lot to say on both business and technology.
Having said that, one of the things we want to do is give our people a convenient, easily accessible channel to share their insights, experiences, ideas, and innovations. And after a little hard work behind the scenes, I think we are there. Welcome to the Interface21 Team Blog.

Here you will gain insight into what's going on at i21, from what we're working on, to what problems we're solving, to where we're going, to what we've learned along the way. You'll see a lot of diversity, as our company is doing a lot of things, from leading the development of the Spring Framework and the Spring family of products to expanding operations in five major international markets.

This entire blog is subscribable via RSS. In addition, you can follow your favorites by subscribing to…

Spring 2.0 RC2 Released

Releases | Juergen Hoeller | July 06, 2006 | ...

Dear Spring community,

We are pleased to announce that Spring 2.0 RC2 has been released.  Download | Documentation | Changelog

This is the second release candidate on the way to Spring 2.0 final. It introduces a number of bug fixes and minor refinements, in particular in the AOP framework and in the JPA support. Please see the changelog for details. A number of further known issues will be addressed in the upcoming 2.0 RC3 release; see our JIRA road map for details.

Please give this release a try with your applications and let us know about any problems that you might encounter! It is important to emphasize that Spring 2.0 provides backwards compatability with the Spring 1.x series.  Spring 2.0 also continues to support JDK 1.3+ and J2EE 1.3+ (even J2EE 1.2+ except for the JSP tags and the EJB support). Compatability is critically important to our user base and we are committed to providing it. Hence, we're also interested in learning about potential compatibility issues on any such platform.

Thank you for all of the feedback leading up to this release.  We look forward to more of the same towards the big 2.0 GA launch date!

Enjoy,

Juergen Hoeller
Lead, Spring 2.0 Product Development

Spring Web Flow 1.0 RC3 Released

Releases | Keith Donald | June 26, 2006 | ...
 

Dear Spring Community,

We are pleased to announce that Spring Web Flow (SWF) 1.0 RC3 (Release Candidate 3) has been released.  Download | Documentation | Changelog

This stable release contains bug fixes and minor improvements.   At this time we expect this to be the last release candidate before Spring Web Flow 1.0 final, which is just around the corner.  The noteworthy include...

NOTEWORTHY IMPROVEMENTS

Improved flow exception hierarchy.  Overall the exception hierarchy now more clearly organizes the categories of failure from flow definition access (FlowLocatorException) to runtime flow execution (FlowExecutionException) and execution persistence (FlowExecutionRepositoryException).

 

Improved support for BACK button use within a Portlet environment.  Combined with a continuation-based repository SWF supports full use of browser navigational buttons (back, refresh) within a Portlet environment while the flow remains active.  When a flow execution terminates a browser refresh will trigger a new execution to be launched automatically.

Simpler default JSF view mapping.  Now by default SWF view names are expected to correspond to JSF view ids exactly. You'll see this default in play within the sellitem-jsf sample--note how views are referenced like "/priceAndItemCountForm.jsp" like a standard JSF navigation handler.  This allows natural support for other JSF view technologies such as Facelets and is a more natural default for JSF developers.  If you require a custom mapping SWF to JSF view mapping, plug a custom ViewIdMapper into your FlowPhaseListener.

Sample application simplifications.  We've simplified the fileupload, flowlauncher, birthdate, and sellitem samples to take advantage of the latest features and best practices of Spring Web Flow.

POTENTIAL USER AFFECTING CHANGES

With 1.0 RC3 there are a few potential user-affecting changes on the road to 1.0 final.  The following section notes them:

The FormAction property "validateUsingValidatorMethod" was removed for simplicity.  Experience has shown this property to be a source of confusion for new users.  As a better alternative, to execute a data binding operation without validation simply invoke the "bind" action method from your flow definition.  When you require piecemeal Validator validation, simply invoke "bindAndValidate" or "validate" with the "validatorMethod" attribute set to the specific validator method.  See sellitem for an example.

StateExceptionHandler was renamed "FlowExecutionExceptionHandler". This affects custom handler implementations.  To upgrade, simply implement the new interface; the signature is logically the same.

FlowExecutorImpl's "redirectOnPause" attribute now accepts a boolean value instead of a RedirectType enum.  There is only one redirect type in SWF as of 1.0 RC2--the flow execution redirect.  Setting this flag to 'true' triggers it each time a flow execution pauses by entering a view state.  See Numberguess or sellitem for an example.
--------

One of the best ways to get started with Spring Web Flow is to review and walkthrough the sample applications.  We recommend reviewing all samples, supplementing with reference manual material as needed from the start. Ten sample applications ship with the 1.0 RC3 release, each demonstrating a distinct set of product features.  These samples are:

1. Phonebook - the original sample demonstrating most features (including subflows)
2. Sellitem - demonstrates a wizard with conditional transitions, flow execution redirects, conversational scope, and continuations
3. Flowlauncher - demonstrates all the possible ways to launch and resume flows
4. Itemlist - demonstrates REST-style URLs and inline flows
5. Shippingrate - demonstrates Spring Web Flow together with Ajax technology (thanks to Steven Devijver)
6. NumberGuess - demonstrates stateful beans and "single key" flow execution redirects.
7. Birthdate - demonstrates Struts integration
8. Fileupload - demonstrates multipart file upload
9. Phonebook-Portlet - the phonebook sample in a Portlet environment
(notice how the flow definitions do not change)
10. Sellitem-JSF - the sellitem sample in a JSF environment

Enjoy!

The Spring Web Flow Team

Keith Donald
Erwin Vervaet
Juergen Hoeller
Colin Sampaleanu
Rob Harrop

Get the Spring newsletter

Thank you for your interest. Someone will get back to you shortly.

Get ahead

VMware offers training and certification to turbo-charge your progress.

Learn more

Get support

Tanzu Spring Runtime offers support and binaries for OpenJDK™, Spring, and Apache Tomcat® in one simple subscription.

Learn more

Upcoming events

Check out all the upcoming events in the Spring community.

View all