(Secure) File Transfer, the Only Way to Fly…err Copy

Engineering | Josh Long | August 23, 2010 | ...

There are many ways to skin a cat. Many applications today rely on messaging (AMQP, JMS) to bridge the gap between disparate systems and data. Others rely on RPC (typically web-services, or REST). For a great many applications, however, file transfer is very much a way of life! There are several common ways of supporting it, but three of the most common are using a shared mount or folder, using a FTP server, and - for more secure exchanges - using SSH (or SFTP). While it's common knowledge that Spring has always provided first-class support for messaging (JMS, AMQP) and RPC (there are far too…

RabbitMQ Plugin for Grails - Early Access

Engineering | Peter Ledbrook | August 23, 2010 | ...

RabbitMQ is a lightweight, reliable, scalable and portable message broker based on the Advanced Message Queueing Protocol (AMQP). It's ideal for heterogeneous systems and cloud platforms, but it can be used for pretty much any messaging requirements, big or small. You don't (typically) access it via the JMS API, and in fact the JMS plugin won't help, but a new plugin is now available that's dedicated to making it easy to use RabbitMQ from Grails applications.

The current version of the plugin (0.2) is relatively limited, but you can already send and receive messages. I encourage you to try it…

Building RabbitMQ apps using Python

Engineering | Greg L. Turnquist | August 19, 2010 | ...

RabbitMQ is a powerful messaging broker based on the Advanced Message Queueing Protocol (AMQP). Thanks to the neutral nature of the AMQP spec, it is easy to connect to it from many platforms, including Python. In this blog entry, we will:

  • Create a simple stock ticker Python application
  • Create a brokerage Python application that decides when to buy and sell.
  • Compare pika, an AMQP library created by the RabbitMQ team, with py-amqplib.
You can find all the source code for this blog at http://github.com/gregturn/amqp-demo. This assumes you have already installed RabbitMQ based on instructions for your platform and fired it up. Personally, I have it running on my Mac OS X machine (snow leopard).

By the way:

The code written in this blog entry is for demonstration purposes only. Do not rely on the algorithms for financial advice.
With that out of the way, let's write some code!

Building the stock ticker

A good example for a messaging solution is a stock ticker system. The stock exchange publishes messages to the broker indicating stock name, price, and time.
import pickle
import random
import time

class Ticker(object):
    def __init__(self, publisher, qname):
        self.publisher = publisher

        # This quickly creates four random stock symbols
        chars = range(ord("A"), ord("Z")+1)
        def random_letter(): return chr(random.choice(chars))
        self.stock_symbols = [random_letter…

Spring 3.0.4 is Now Available

Releases | Adam Fitzgerald | August 19, 2010 | ...

Arjen Poutsma has just announced that Spring 3.0.4 is now available. This release addresses over 80 minor issues and updates Spring's support for some recent third-party releases including Hibernate Core 3.6, Hibernate Validator 4.1, EclipseLink 2.1, and EHCache 2.2.

Download | Documentation | Javadoc API | Change Log | JIRA

All the latest features for Spring as well as advanced technical sessions and roadmap discussion will be happening at SpringOne 2GX 2010 in Chicago, October 19th-21st. Be sure to register now to lock in an early registration discount.

Don't forget that Spring users can ask questions in the community forum and identify issues in JIRA as well.

Simplified Spring Security with Grails

Engineering | Peter Ledbrook | August 11, 2010 | ...

Spring Security is a powerful library for securing your applications that comes with a bewildering number of options. Based on Spring, it can be readily integrated into a Grails application. But why not save the hassle and use the new improved Grails plugin?

The plugin has gone through several evolutionary stages that started with the Acegi plugin. Its most recent incarnation is a complete rewrite for Spring Security 3 and Spring 3. One of the results of this is that the plugin will only work with Grails 1.2.2 and above. Another significant change is that there is no longer just one Spring…

Virgo Milestone M03 Ships

Engineering | Christopher Frost | August 10, 2010 | ...

Virgo 2.1.0.M03-incubator is available from the Virgo website. The changes include:

  • Further performance improvements, especially for Windows users.
  • Update the version of Logback to 0.9.24 and SLF4J to 1.6.1
  • Minor bug fixes

The performance improvement was achieved by adjusting the log level of entry exit tracing.

As a result of the new version of Logback the syntax of the configuration file 'serviceability.xml' has changed slightly. More information can be found here.

We have now published a plan outline for the future of Virgo so you have a better idea of where we are going.

Hyperic Broadens vSphere Support through vCenter APIs in Version 4.4

Engineering | Charles Lee | August 06, 2010 | ...

SpringSource Hyperic 4.4 was released earlier this week that brings enhanced management of VMware virtualized environments through integration with VMware vCenter.  While Hyperic has long had support for VMware technologies (a.k.a. VMware Infrastructure or VI), the availability of the VI Java API (http://vijava.sf.net) made our jobs much easier, because the power SDK streamlined how a Java application can interact with VI back then.  By adopting the VI Java API, we were able to keep up with VMware's evolution easily from VI to VMware vSphere, as it is known today.  This also allowed us to…

Spring Web Flow 2.2.0.M1 Released

Engineering | Rossen Stoyanchev | August 05, 2010 | ...

I'm pleased to announce the first milestone of Spring Web Flow 2.2 is now available for download. The release is also available through the Maven milestone repository at http://maven.springframework.org/milestone. As with Spring Web Flow 2.1, this release requires JDK 1.5, Spring 3 and Spring Security 3.

The main focus of the release is to address the needs of JSF users by extending the list of supported JSF 2 features. Not long ago Web Flow 2.1 made it possible to use JSF 2 dependencies without the need for the separate Sun Facelets jar that is commonly used with JSF 1.2 today.

In Spring Web…

Spring GemFire 1.0.0.M1 released for Java and .NET

Engineering | Costin Leau | August 03, 2010 | ...

I am happy to announce the first milestone release of the Spring GemFire project, the newest member in the Spring family. Spring GemFire (for short SGF) brings the Spring concepts and programming model to GemFire, SpringSource's distributed data management platform. The release is available for both Java and .NET.

The features in 1.0.0.M1 include:

  • declarative dependency injection style configurations for the GemFire infrastructure (such as Cache, Region, Interest, etc)
  • exception translation to Spring's portable DataAccess exception hierarchy
  • Template and callback support for easy native API access
  • transaction management support
  • Spring-backed wiring for GemFire managed objects
  • auto-generation of non-reflection based Instantiators
Note that some of these features are currently available only in the Java version.
Through SGF, Spring users should feel right at home when interacting with GemFire while developers familiar with GemFire will see the benefits and flexibility of the Spring container, its powerful AOP integration, and versatile service abstractions. But don't take my word for it - download the project and take the sample application for a spin. It's a console based 'shell' which allows for ad-hoc interaction with the data grid; one can start and stop nodes and see the information shared transparently between multiple clients.

We look forward to your feedback!

Spring Security in Google App Engine

Engineering | Luke Taylor | August 02, 2010 | ...

Spring Security is well-known for being highly customizable, so for my first attempt at working with Google App Engine, I decided to create a simple application which would explore the use of GAE features by implementing some core Spring Security interfaces. In this article we'll see how to:

  • Authenticate using Google Accounts.
  • Implement "on-demand" authentication when a user accesses a secured resource.
  • Supplement the information from Google Accounts with application-specific roles.
  • Store user account data in an App Engine datastore using the native API.
  • Setup access-control restrictions based on the roles assigned to users.
  • Disable the accounts of specific users to prevent access.

You should already be familiar with deploying applications to GAE. It doesn't take long to get a basic application up and running and you'll find lots of guidance on this on the GAE website.

Sample Application

The application is very simple and is built using Spring MVC. There is a welcome page deployed at the application root, and you can progress to a "home page", but only after authenticating and registering with the application. You can try out a version deployed in GAE here.

The registered users are stored as GAE datastore entities. On first authenticating, new users are redirected to a…

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