Before a JDBC operation, flush the Hibernate Session (includes TSE example code)

Engineering | Alef Arendsen | January 04, 2008 | ...

Mixing code in one and the same transaction that uses an Object-Relational Mapper with code that doesn't, can cause issues with data not being available in the underlying database when it should be. Since this is a situation I come across once every now and then, I figured it would be helpful for all if I write down my solution to this problem.

In short: what I will present in the remainder of this post is an aspect that triggers the underlying persistence mechanism (JPA, Hibernate, TopLink) to send any dirty data to the database.

I presented this aspect by the way during one of my sessions at The Spring Experience last December and this post also has the source code for those of you…

Spring .NET 1.1 and container configuration

Engineering | Mark Pollack | January 04, 2008 | ...

It has been quite a year for Spring.NET. We have gone through two milestone and two release candidates before the GA release in December. The first chunks of code for the 1.1 release were made way back in late 2004 by Aleks Seovic who started work on the ASP.NET framework. In short, it has been a long time in the making. Being the end of year, a natural time for reflection both past and present, I'd like to say thanks to the other members of the project and the Spring.NET community for all their contributions and support. I'm looking forward to a great 2008!

The feature set of Spring.NET 1.1 is quite broad. An IoC container for Dependency Injection, AOP, ASP.NET framework, declarative transaction management and more. However, the biggest bang for the buck you can get to improve the structure and testability of your code is to add Dependency Injection and AOP into your proverbial developer tool chest. Dependency Injection is the more foundational…

Is it a Tomcat, or the Elephant in the Room?

Engineering | Rod Johnson | December 24, 2007 | ...

Sometimes important changes sneak up. Such changes aren't driven by marketing campaigns, but by many individual decisions; there's no fanfare; by the time they're observed, they have surprising momentum. I mentioned one such development in my opening keynote at the recent Spring Experience conference: the steady rise of Tomcat.

Recently we've begun running polls on SpringFramework.org, and some of the results are interesting. The question Which application server(s) do you use? produced the following results: BEA WebLogic (various versions) and JBoss AS shared first place among Java EE app…

Spring Integration Samples

Engineering | Mark Fisher | December 21, 2007 | ...

In my recent post, I had mentioned that the Subversion repository for Spring Integration would be publicly accessible soon, and I'm pleased to provide that link now. You can checkout the project with the following command:

svn co https://anonsvn.springframework.org/svn/spring-integration/base/trunk spring-integration

If the checkout is successful, you should see the following directory structure:

spring-integration/
  +--build-spring-integration/
  +--spring-build/
  +--spring-integration-core/
  +--spring-integration-samples/

I would like to take this opportunity to walk through a couple of…

Spring Integration: a new addition to the Spring portfolio

Engineering | Mark Fisher | December 14, 2007 | ...

Yesterday morning I presented a 2-part session at The Spring Experience entitled "Enterprise Integration Patterns with Spring". The first presentation included an overview of core Spring support for enterprise integration - including JMS, remoting, JMX, scheduling, and email. That presentation also included a high-level discussion of several of the Enterprise Integration Patterns introduced in the book of the same name by Gregor Hohpe and Bobby Woolf. In the second presentation, I officially unveiled "Spring Integration" - a new addition to the Spring portfolio. Spring Integration builds upon…

What's New in Spring Security 2?

Engineering | Ben Alex | December 06, 2007 | ...

I was cruising the blogosphere today and encountered one of the shortest blogs I've ever read. To quote nearly the entire entry, "Every time you use Acegi, a fairy dies. The sad thing is there really isn't anything better around...".

Between our community forums, developer lists, JIRA, user conference BOFs, training, support, consulting and team blog, we receive a great deal of community feedback. There is little doubt that many people have sought improvements to the Spring Security (formerly Acegi) configuration format, and we've invested a lot of time in making that possible.

As I'll be presenting at next week's Spring Experience conference, Spring Security 2.0.0 M1 features tremendously simplified configuration. You will now be able to add Spring Security to your…

Spring Dynamic Language Support and a Groovy DSL

Engineering | Dave Syer | November 29, 2007 | ...

Since the introduction of Spring dynamic laguage support in Spring 2.0 it has been an attractive integration point for Groovy, and Groovy provides a rich environment for defining Domain Specific Languages (DSL). But the examples of Groovy integration in the Spring reference manual are limited in scope and do not show the features in Spring that are targeted at DSL integration. In this article I show how to use those features and as an example we add bean definitions to an existing ApplicationContext with a Groovy DSL from the Grails distribution.

Groovy Beans

The basic features of Spring dynamic language integration are exposed in the "lang" namespace in XML. The most straightforward thing you can do is to defined a Spring component as a Groovy bean, in a separate file or inline in the XML. This feature is covered in the Spring reference guide (http://static.springframework.org/spring/docs/2.5.x/reference/index.html

Spring Framework Maven Artifacts

Engineering | Ben Hale | November 26, 2007 | ...

By popular demand, the Spring Framework Maven artifacts are now being uploaded to the Spring Snapshot Maven Repository. You can find details about all of the Spring Portfolio Maven repositories in my previous post but I'll reprint the details for the Spring snapshot repository here.

The Spring Snapshot Maven Repository is located at http://s3.amazonaws.com/maven.springframework.org/snapshot. Using this repository requires you to add an entry to the <repositories/> element in your POM. It should look like this:


<repository>
    <id>spring-snapshot</id>
    <name>Spring Portfolio Snapshot…

Interface21 becomes SpringSource

Engineering | Rod Johnson | November 19, 2007 | ...

We're changing our name. This week, Interface21 will become SpringSource.

As we have built the company, Interface21 has earned a reputation for exceptional products, thought leadership, outstanding people, professionalism and top quality support and services. As we continue to deliver all of those things, we believe that changing our name will help our company bring them to a wider audience.

When I founded Interface21 in 2004, I had to pick a name. I believed Spring to be the future of enterprise Java, and "Interface21" reflected those feelings—the framework for the 21st Century. Now we’re…

The Spring Web Flow 2.0 Vision

Engineering | Keith Donald | November 15, 2007 | ...

Spring Web Flow 2.0 M2 has just released. I am particularly excited about this release because it sets the foundation we need to realize the bold vision we have for our community for the future. In this entry, I'll explain what that vision is, and exactly what this foundation will enable. I'll also go into detail about the architecture of Web Flow 2.0, and compare it to the 1.0 version.

The Spring Web Flow 2.0 Vision

The goal of 2.0 is to evolve Spring Web Flow as a controlled navigation engine to offer significantly improved support for JavaServerFaces, flow managed persistence, and asynchronous event handling (Ajax) natively. The new Spring Faces project will build on Web Flow 2.0 to provide first-class support for JSF views in a Spring environment. In addition, Web Flow will continue to provide first-class support for Spring MVC-based views, allowing native JSF and MVC views to be used to full-power, even in the same application if desired.

* UPDATE: The vision above was updated on 1/11/08 after considering large amounts of feedback from the Spring community since The Spring Experience 2007. Based on that feedback, Spring Web Flow 2.…

Get the Spring newsletter

Stay connected with the Spring newsletter

Subscribe

Get ahead

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

Learn more

Get support

Tanzu Spring 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