This Week in Spring, November 8th, 2011

Engineering | Josh Long | November 09, 2011 | ...

Another fantastic week in the Spring community. Can you guys believe it's already the 8th of November? Where does the time go?

If you blink, we'll be in 2012 already! 
No time to waste - the year might change out from underneath us! - let's dive right into this week's roundup!

  1. Ramnivas Laddad, senior engineer on the Cloud Foundry project and a hero world wide to those who - like me - enjoy the use of AspectJ in their Spring applications, has put together a fantastic post shining a light on the specific support for services (like MySQL, PostgreSQL, and RabbitMQ) in Cloud Foundry. This is the second post in a series. Read the first one to learn about the basics of services on Cloud Foundry. Awesome posts with great details.
  2. This next post is among the posts that made me smile this week. Roy Clarkson and I did a talk at SpringOne 2GX a few weeks ago on native Android development practices with Spring. We sat down the night before our talk and ran through our deck and demonstrations, only to realize that - in the interim weeks since everything was originally prepared, the delicate spider's web of configuration required to get Eclipse (SpringSource Tool Suite), Maven, and Android all speaking to each other and working correctly had been... disturbed. We did the talk with a non-Maven build with great success, but it still irked us that we had to switch to a regular Eclipse build so that the talk could proceed. Roy, always intrepid and fearless, has since figured out the right permutations of configurations required to get this all working again and - generous guy that he is - he has documented everything in this blog. Check it out! (I know I did!)
  3. Tomcat Expert has another practical column on administering and developing with Apache Tomcat 7. The post explains how to take the default security configuration Apache Tomcat 7 to the next level with a bit of background on the configuration options available.
    </LI> 
    
    
    
    <LI> Roger Hughes <a href="http://java.dzone.com/articles/using-jsr-250s-postconstruct">introduces how to use JSR 250's <CODE>@PostConstruct</CODE> and <CODE>@PreDestroy</CODE> annotations</A> to replace the use of the corresponding Spring  callback interfaces, <CODE>InitializingBean</CODE> and <CODE>DisposableBean</CODE>.   </LI> 
    
    <LI>Michal Huniewicz explains <a href= "http://blog.m1key.me/2011/10/wizard-form-with-spring-mvc…

Using Cloud Foundry Services with Spring: Part 3 - the <cloud> namespace

Engineering | Thomas Risberg | November 09, 2011 | ...

We saw in the previous blog post Using Cloud Foundry Services with Spring: Part 2 - Auto-reconfiguration that when you deploy a Spring application, your use of data services will be detected, and your application will automatically be re-configured to use the cloud services available to your application. This works great for simple applications and demos, but if you have a serious production application you probably want to have more control. You also need more control if you have multiple services of the same type. Ramnivas hinted at this saying that you can opt out of auto-reconfiguration by…

Updated Maven Support for Android Projects

Engineering | Roy Clarkson | November 07, 2011 | ...

It has been a while since my initial posts on using Maven with Spring Android, and the state of the tools has changed somewhat. With the recent release of the SDK for Android 4.0 and revision 14 of the Android Development Tools (ADT), Google made several changes that impacted the third party Maven plugin support for building Android projects. Fortunately, the teams behind the Android Maven Plugin, and the Android Configurator for M2E have been hard at work to support these latest changes in the Android tools. If you have tried to run the Spring Android Samples recently, then you probably noticed the projects would not build. In this post, I will illustrate the configuration changes necessary to utilize the latest Maven plugins and Eclipse support in the Spring Android Showcase project.

Android Maven Plugin

As of version 3.0.0-alpha-11, The Maven Android Plugin now has a new name, and is now called the Android Maven Plugin. The latest version, 3.0.0-alpha-13 fixes the build issue with Android SDK r14.

Update the Plugin

To update your plugin version, make the following changes to the artifactId and version.


<plugin>
    <groupId>com.jayway.maven.plugins.android.generation2</groupId>
    <artifactId>android-maven-plugin</artifactId>
    <version>3.0.0-alpha-13</version>
    <configuration>
        <sdk>
            <platform>${android-platform}</platform>
        </sdk>
        <deleteConflictingFiles>true</deleteConflictingFiles>
        <undeployBeforeDeploy>true</undeployBeforeDeploy>
    </configuration>
    <extensions>true</extensions>
</plugin>

Once modified, you can now run maven from the command line to build your project.

mvn clean install

Potential Build Errors

It is possible that your project will receive a few build errors when you try to build with the new plugin.

java.lang.OutOfMemoryError

When I updated the Spring Android Showcase client, the build failed with the following:

[INFO] UNEXPECTED TOP-LEVEL ERROR:
[INFO] java.lang.OutOfMemoryError: Java heap space
[INFO] 	at com.android.dx.ssa…

Using Cloud Foundry Services with Spring: Part 2 - Auto-reconfiguration

Engineering | Ramnivas Laddad | November 04, 2011 | ...

If you watched the video for the Cloud Foundry launch event, you saw that we deployed the Spring Travel application downloaded from Spring Web Flow samples, bound a MySQL service to it, and dragged and dropped the application to the Cloud Foundry server in STS, without making a single line of change in the application itself. How’s that possible since the application is configured to use a local database? That’s when auto-reconfiguration comes into play.

Cloud Foundry strives to keep your initial investment low. Beyond dollars and cents, a real investment comes from the time that a developer…

This Week in Spring: November 1st, 2011

Engineering | Adam Fitzgerald | November 02, 2011 | ...

Wow! Last week's SpringOne 2GX event was sensational. It was an amazing time, and it was - as usual - great to see the Spring community going so strong. I can't wait until the videos from the event start to appear on InfoQ.com.

We've got a lot to cover this week, though, so let's get into it!
 </P> 
    <Li> 
    

    Don't tell anyone, but even if you missed SpringOne 2GX, the decks for all the talks should be on SpringOne2GX.com, and the videos for all the talks will be on InfoQ.com soon.

    To tide you over in the short term, the deck from SpringSource CTO Adrian Colyer's keynote - "Spring yesterday, today, and tomorrow" - is available online. Thanks Adrian!

     <LI>
     One of the many big announcements that came from the SpringOne2GX event was	 that of <a href= "http://neo4j.org/spring/">Neo4j 2.0</a>. 
            If you're…

This Week in Spring, October 18th, 2011

Engineering | Josh Long | October 19, 2011 | ...

What a week! If you're an enterprise Java developer, then you've no doubt heard the news - Spring 3.1 RC1 has just been released! Read on for more details and be sure to sound off on the forums if you have questions or feedback!

And, of course, if you're at SpringOne2GX 2011 next week, you can look forward to hearing a lot more on Spring 3.1 as well as the latest and greatest from all the Spring technologies. We look forward to seeing you all there!

 </P>  

  
  1. Spring 3.1.0.RC1 was released last week! And so begins the march to Spring 3.1 GA. Chris Beams kicked things off with this announcement. Then, Juergen Hoeller, Spring project lead, followed up with this blog post detailing the new features. The first release candidate of Spring 3.1 is now available from the Spring milestone repository or for direct download via community download page. This release includes new features such as:
    Support for Hibernate 4.0 (up to date with 4.0 CR4), 
    Complete <CODE>TestContext</CODE> framework support for <CODE>@Configuration</CODE> classes,
    Flash scope for Spring MVC, 
    Support for Quartz 2.0,  
    77 bug fixes, 16 new features, and 66 improvements. Wow! To learn more about what's new in Spring 3.1, be sure to <a href="http://static.springsource.org/spring/docs/3.1.0.RC1/spring-framework-reference/html/new-in-3.1.html">check out this document.</a>
     </LI> 
      <LI> 
      Martin Lippert today announced the <a  href="http://www.springsource.org/node/3287">release of SpringSource…

Upgrading Maven integration for SpringSource Tool Suite 2.8.0

Engineering | Andrew Eisenberg | October 18, 2011 | ...

UPDATE, Nov 23: We have released STS 2.8.1, that fixes many of the install/uninstall of m2eclipse issues that people were having. Read the release announcement. Now, it is possible to upgrade/downgrade m2eclipse easily. STS 2.8.1 fully supports both versions of m2eclipse.

Today, we released version 2.8.0 of the SpringSource Tool Suite. Along with an update to Eclipse Indigo SR1 (which brings you full IDE support for Java7), we also updated the Maven integration from the old and unmaintained m2eclipse versions 0.12.x to the latest version m2e 1.0 – which is now shipping as part of the…

Using Cloud Foundry Services with Spring: Part 1 - The Basics

Engineering | Ramnivas Laddad | October 13, 2011 | ...

Services offered in Cloud Foundry make writing efficient and effective applications possible. Developers can now choose just the right kind of services without worrying about operating those services. For example, a portion of an application can choose Postgres for the parts where transactional access is crucial, MongoDB where interacting with data as a collection of documents makes sense, Redis where key-value is the right abstraction, and RabbitMQ where messaging helps create effective architecture. In this four-part blog series, we will explore how Spring applications can use Cloud Foundry…

Spring Framework 3.1 RC1 released

Engineering | Juergen Hoeller | October 12, 2011 | ...

It is my pleasure to announce that the first Spring Framework 3.1 release candidate has - finally - been released this week! We have been working on this release for several months, completing our milestone work and recently adding support for Java SE 7 and for Hibernate 4.0 to the feature list.

Spring Framework 3.1 RC1 completes the 3.1 feature set:

  • The environment abstraction and the environment profile mechanism for bean definitions.

  • Comprehensive Java-based application configuration based on @Enable* annotations on @Configuration classes.

  • An overhaul of the TestContext framework with first-class support for @Configuration classes and for environment profiles.

  • Our new "c:" namespace for conveniently specifying constructor arguments by name in a concise inline style.

  • The cache abstraction with our declarative caching solution (@Cacheable etc) on top.

  • The Servlet 3.0 based WebApplicationInitializer mechanism for bootstrapping a Spring web application without web.xml!

Rapid Cloud Foundry Deployments with Maven

Engineering | Gunnar Hillert | September 22, 2011 | ...

Apache Maven is a very popular choice in the Java community for building and deploying applications.  The Cloud Foundry team has released the Cloud Foundry Maven Plugin to integrate with applications’ development lifecycle, including deployment to the cloud.  The same Maven plugin can be used to manage application pushes and updates to any Cloud Foundry instance.

One of Cloud Foundry’s main promises is to make your life as a developer a whole lot easier without limiting available choices. Cloud Foundry not only supports a plethora of languages (Java, Groovy, Scala, Ruby etc.) and frameworks (Spring, Grails, Rails, Sinatra, Lift etc.) but it also allows you to deploy your applications to different environments. This includes public clouds, such as Cloudfoundry.com and AppFog.compartner-provided cloud offerings, single VM Micro Cloud Foundry

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