Git and Social Coding: How to Merge Without Fear

Engineering | Dave Syer | December 21, 2010 | ...

Git is great for social coding and community contributions to open source projects: contributors can try out the code easily, and there can be hordes of people all forking and experimenting with it but without endangering existing users. This article presents some examples with the Git command line that might help build your confidence with this process: how to fetch, pull and merge, and how to back out of mistakes. If you are interested in the social coding process itself, and how to contribute to Spring projects, check out another blog on this site by Keith Donald.

Grails has been on Github for a while and had a great experience with community contributions, so some other projects from SpringSource are starting to migrate over there as well. Some of the migrating projects are new (e.g. Spring AMQP) and some are already established and have migrated from SVN (e.g. Spring Batch). There are also some Spring projects on a SpringSource hosted Gitorious instance, for example Spring Integration

Social Coding in Spring Projects

Engineering | Keith Donald | December 21, 2010 | ...

In the last year, new Spring projects have launched in a number of areas, including social, mobile, data, and integration. I've been doing this for nearly 7 years, and honestly it has never been as exciting for me as it is today. I feel this way because our community understands the importance of raising the bar by building on the foundations you've laid before. That's why we're able to move so quickly, and that's a testament to the quality of the core development team led by Juergen Hoeller.

One thing I'm very excited about is the increasing number of community contributions we're seeing. These have traditionally come in as patches via JIRA, but modern social coding platforms such as Github and Gitorious have opened new opportunities. In this blog entry, I'd like to present a new contribution…

Spring Android and Maven (Part 1)

Engineering | Roy Clarkson | December 17, 2010 | ...

We recently announced the M1 release of Spring Android, and with that release some questions have arisen around how to build an Android application utilizing the Spring Android Rest Template and Spring Android Commons Logging libraries. Google provides several methods for compiling an Android application, including SDK command line tools, and the ADT (Android Development Tools) Plugin for Eclipse. Unfortunately, neither of these methods includes integrated dependency management support.

Overview

As Java developers we have come to appreciate tools such as Maven and Gradle for managing external dependencies. While traditional Java applications run in a JVM, Android applications run on the Dalvik virtual machine.  The Dalvik VM executes files in the Dalvik Executable (.dex) format.  It runs classes compiled by a Java language compiler that have been transformed into the .dex format.  A build tool will need to support this process if it is going to be able to compile a compatible Android application with dependencies.

There are basically two options for including external libraries in your Android application. The first is to manually copy the jars into the libs directory within your project and update the classpath within Eclipse. This is the simplest solution, and the one most supported by the ADT plugin. The disadvantage is that you have to manage the dependencies manually. Alternatively, a third party plugin such as the Maven Android Plugin can be utilized to automatically include the dependencies from a Maven repository.

In this post I will walk through the process of using the Android command line tools, Maven, the Maven Android Plugin, and Android Maven artifacts to compile a sample application that utilizes the Spring Android libraries, and deploy it to the Android emulator. After you have configured Maven, it is easy to create a build, deploy it to the emulator, run tests, and package the app for deployment to the Android Market. Before running the sample code, we will first highlight the configuration settings necessary in the pom.xml. The components used in this example are listed below.

Maven Configuration

This section covers the parts of a pom.xml that are required for developing with Spring Android and the Maven Android Plugin.

Maven Android Plugin

In order to use Maven to build an Android application, you will need to configure the Maven Android Plugin within your pom.xml file. Android applications are deployed to the device as an apk file, not a jar. You must specify this in the the packaging configuration.


<packaging>apk</packaging>

To configure the Maven Android and Maven Compiler Plugins in the build task, set the sdk platform to the desired level. In this example it is set to 9, which corresponds to Android version 2.3.1. The emulator avd value is the name of the AVD (Android Virtual Device) you defined in the AVD Manager. In this case, an AVD with the name "9", but the AVD can be named whatever you like, as long as it matches the name you specified when creating the AVD. This is a basic configuration for the plugin that is needed to build and run an Android application…

vFabric Cloud Application Platform Update

Engineering | Adam Fitzgerald | November 30, 2010 | ...

vFabric
We have recently released updates for several components of the vFabric Cloud Application Platform. As Rod Johnson mentioned in the original announcement, vFabric is designed for fast delivery of next-generation applications that are instantly scalable and cloud-portable. These recent updates further enhance the integration between runtime application services and improve the performance, scalability, monitoring and manageability of modern applications.

vFabric tc Server 2.1

Updates to vFabric tc Server continue to make it the best place to build and run Spring applications: 

  • Spring Insight
    Included with tc Server 2.1, Spring Insight delivers real-time visibility into application behavior and performance for Spring applications during development and pre-production.  Deep real-time visibility into application behavior can now be persisted to view information spanning a previous time range.  Improvements to administration and navigation make it easy to operate and surface useful information more intuitively.
  • Enhanced templating
    A new built-in template mechanism simplifies the configuration of tc Server with the vFabric GemFire HTTP Session Management and Hibernate Cache Modules.  This allows vFabric GemFire to automatically launch with tc Server 2.1 – no application code changes or other manual intervention is required.

vFabric GemFire 6.5

vFabric GemFire is the distributed data management platform for modern applications offering dynamic scalability, very high performance and database-like persistence. Two new modules simplify the integration of GemFire with tc Server and Hibernate delivering sophisticated data management for modern applications. Jags Ramnarayan goes into great detail in his latest blog post but we will provide a quick overview here.

  • vFabric GemFire HTTP Session Management Module
    The vFabric GemFire HTTP Session Management Module offloads and manages HTTP session state for tc Server or Tomcat servers.   Pre-configured and automatically launching with tc Server, GemFire HTTP Session Management provides high performance and scalability.  This is particularly useful for web applications handling many requests and that need to scale-out to meet demand.
    • Decouple session management from tc Server or Tomcat Servlet/JSP container
    • Scale application server and HTTP session handling independently
    • Handle very large sessions without losing sessions
    • Easy to connect to tc Server via new template mechanism or Tomcat via minor configuration modifications
  • vFabric GemFire Hibernate Cache Module
    The vFabric GemFire Hibernate Cache Module provides fast, scalable, distributed L2 caching for Hibernate. Swapnil Bawaskar covers the details in his latest blog post.
    • Dramatically improve Hibernate performance
    • Reduce network traffic (and potential bottlenecks) to the database server
    • Gain all the enterprise class features of GemFire
    • Scalability – partition data across the entire cluster
    • Developer productivity & cloud-scale deployment

vFabric Hyperic  4.5

vFabric Hyperic is the application management and monitoring component of the vFabric Cloud Application Platform and it provides complete and continuous visibility into the entire virtualized application stack. Jennifer Hickey recently described the internal details about the Hyperic 4.5 release

New Groovy Debug Support in STS 2.5.1

Engineering | Andrew Eisenberg | November 30, 2010 | ...

We have included some big improvements to Groovy Debugging in the recent release of the SpringSource Tool Suite 2.5.1. It has always been possible to debug your Groovy applications using Eclipse's vanilla debug support for Java, but due to Groovy's language differences from Java and its metaprogramming, many debug features have not been working as well as they could.

All of the screenshots in this post were taken from a simple Grails app and so the debug features here are implicitly making use of dynamically added Groovy methods and properties.

Step Into

With the enhanced Groovy debug support, the…

Spring Integration 2.0 GA Released

Engineering | Mark Fisher | November 23, 2010 | ...

I am very pleased to announce that Spring Integration 2.0 GA has been released!

Download

The distribution zip containing the Spring Integration JARs, source JARs, and documentation can be downloaded here.

Dependency Configuration

The artifacts should also be available from the Maven central repository at some point later today. In the meantime, you can add the springframework Maven repository to your POM. The following example shows a dependency on "spring-integration-core" and the springframework repository entry. If you plan to use any of our adapters, you can replace "spring-integration-core" with the appropriate adapter…

Spring into Mobile Application Development

Engineering | Keith Donald | November 20, 2010 | ...

At SpringOne2gx we announced exciting new initiatives in the areas of social media and mobile application development. A few weeks ago, Craig Walls released Spring Social. Today, Roy Clarkson released Spring Mobile and Spring Android. In this post, I'd like to highlight these projects and share how Spring aims to simplify mobile application development.

Choices in Mobile Application Development

If you attended SpringOne2gx this year, you've seen Greenhouse, an app we built for our community that also serves as a reference and driver for Spring technology. Craig showed you some of the social elements of Greenhouse, such as the ability to connect your account with Twitter and Facebook. There are also a number of mobile elements. Specifically, Greenhouse doubles as a mobile web app, and sports native Greenhouse for iPhone

Yet Another Flavour of GORM: MongoDB

Engineering | Graeme Rocher | November 15, 2010 | ...

Our crusade to make GORM ubiquitous across NoSQL stores hit another milestones today as we are pleased to announce GORM for MongoDB.

MongoDB is a document database that bridges the gap between key-value stores (which are fast and highly scalable) and traditional RDBMS systems (which provide rich queries and deep functionality).

Like the Redis and Gemfire plugins, GORM for MongoDB has full support for CRUD operations:

def person = new Person(name:"Fred", age: 45)
person.save()

person = Person.get(person.id)
assert person != null

person.delete()

assert Person.get(person.id) == null

Rich querying with dynamic finders

Hyperic 4.5 Released

Engineering | Jennifer Hickey | November 10, 2010 | ...

After many months of development, I am proud to announce the release of Hyperic 4.5. In this release, we migrated Hyperic from an EJB application running on JBoss to a Spring web application running on Tomcat. The detailed migration steps are covered in my Case Study on Migrating Hyperic from EJB to Spring, originally presented at the recent SpringOne 2GX. In this post, I would like to highlight a few of my favorite things about the conversion.

Improved testability

Switching to Spring allowed us to convert our existing Stateless Session EJBs to POJOs with autowired dependencies. This eliminated quite a bit of static JNDI lookup code that made unit testing so difficult. Spring also made integration testing significantly easier. Before the conversion, we had a handful of integration tests that each took several minutes to bootstrap an approximation of an EJB container. This process was cumbersome and error prone. Additionally, the tests often left the database in an inconsistent state, making it necessary to add database setup or tear down code, adding additional overhead to test execution time and occasionally causing inconsistent test results.

After the conversion, we were able to take advantage of Spring's integration testing support to test our new service layer of converted EJBs as…

Green Beans: Putting the Spring in Your Step (and Application)

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

The Spring framework emerged as a de-facto standard in 2003 and has been helping people build bigger, better applications with cleaner code ever since. In this post, we will discuss the options available to you for configuring an application using the Spring component model. We will grow a simple application from the simplest form and rework it to take advantage of some of the many simplifying features in the Spring framework that have made it, and continue to make it, the de-facto standard for applications today.

The modern day enterprise Java application has many collaborating objects that…

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