SpringSource Seminar Day in Central Europe

Engineering | Juergen Hoeller | June 29, 2008 | ...

SpringSource is organizing its first dedicated seminar day in central Europe: the SpringSource Seminar Day in Linz, Austria, on September 8th, 2008. This is a full-day seminar about current hot topics in the Spring portfolio: a rare chance to hear about what's brand-new and upcoming right from the Spring project leads! The agenda is planned as follows:

8:30 ... Open for registration
9:30 ... Welcome and introduction (by Juergen Hoeller)
9:45 ... Keynote: The Spring Portfolio (by Rod Johnson and Adrian Colyer)
11:00 ... Introducing the SpringSource Application Platform (by Rob Harrop and Eberhard Wolff)
12:00 ... Lunch break (lunch buffet provided on site)
13:00 ... Tools for Enterprise Development and Management (by Christian Dupuis and Jennifer Hickey)
14:15 ... Developing Rich Web Applications with Spring (by Keith Donald and Agim Emruli)
15:15 ... Coffee break (coffee and cookies provided on site)
15:45 ... Spring Framework 3.0 – The Next Generation (by Juergen Hoeller and Mike Wiesner)
17:00 ... Spring.NET 1.2 (by Mark Pollack and Erich Eichinger)
18:00 ... Meet & Greet at the SpringSource booth (including drinks and snacks)
19:00 ... End of the seminar

UPDATE: SpringSource's CEO Rod Johnson now to co-present the seminar keynote with CTO Adrian Colyer! Also note that we are organizing a concluding Meet & Greet session at the SpringSource booth.

The speaker list includes SpringSource's CEO Rod Johnson, CTO Adrian Colyer as well as project leads Rob Harrop, Christian Dupuis, Jennifer Hickey, Keith Donald, Juergen Hoeller and Mark Pollack. This is your chance to get in touch with SpringSource's project leads and European consultants for first-hand insight into Spring. The presentation language will be English; the overall event will be moderated in English as well as German.

The seminar will be held at the beautiful Bergschloessl Linz and allows for convenient travelling on a day trip basis (e.g. from Vienna, Salzburg and Munich). Of course, you might prefer to stay for the weekend in order to visit the city of Linz, the European Capital of Culture 2009... Tip: The famous Linzer Klangwolke happens to be scheduled for Saturday, September 6th - the weekend right before the seminar!

Linz is easy to reach by car, train and plane. The main train station is close to the venue, with direct connections from e.g. Vienna, Wels, Salzburg, Nuremberg and Frankfurt. The Blue Danube Airport Linz (LNZ) - providing direct connections from Vienna, Frankfurt, Duesseldorf, Munich and Zurich - is a 20 minutes drive away.

The admission fee for this unique opportunity is EUR 150, to be paid on arrival at the venue. Advance registration before August 11th is required: please send an email to Eva Hoeller (eva.hoeller AT springsource DOT com), stating your contact details as well as the number of seats that you would like to reserve for your company. Seating is limited, so register early!

UPDATE: This seminar is booked out at the already extended level of 145 attendees. See you there!

Juergen Hoeller
VP & Distinguished Engineer
SpringSource

Pumping it dry: $200 a barrel and $25,000 per CPU

Engineering | Rod Johnson | June 25, 2008 | ...

When Oracle acquired BEA systems, I and others noted the significance of the loss of the only independent Java middleware vendor. With Oracle's recent announcement of a price hike for their products, including WebLogic Server, this is no longer a theoretical issue. They have the oil, and they think they have existing customers over a barrel. The need for alternatives is now even more painfully clear.

In fairness, Oracle's move is partly driven by the weakness of the US dollar, but the increases in WebLogic pricing are far greater than those affecting other products.

Some applications previously priced at $3,995 are now listed at $4,595 -- up 13.1 percent -- while database software prices increased 18.75 percent from $40,000 to $47,500 per CPU. Other prices increased approximately 15 percent, according to Wang's report. The price for BEA's WebLogic application server is now $25,000 per CPU, up 47.1 percent from its $17,000-per-CPU price prior to Oracle's $6.7 billion acquisition of the middleware software vendor in April.
This decision probably indicates two things: that Oracle justified the high cost of acquiring BEA (actually, over $8 bn) through its belief that it can make more money from BEA customers by raising prices; and Oracle's expectation that, with no independent vendor left, there is not enough competition left in the Java EE application server market for customers to resist such a price hike. From the same article:
Some industry observers have worried that the acquisitions could give Oracle a near-monopoly in some markets. The Forrester report says the price increase for BEA WebLogic could reflect Oracle's dominant position in the application server market.
In a two-horse race in the legacy app server market between Oracle and IBM, both vendors might well take that view, effectively creating the OPEC of application server vendors. IBM Senior Vice President and Software Group General Manager Steve Mills recently commented that he is “not particularly concerned with competition" in this space, “particularly from open source offerings.”

Fortunately, for customers…

Running a Spring Batch Job in The SpringSource Application Platform

Engineering | Dave Syer | May 30, 2008 | ...

In this article I will show you how to run a Spring Batch job in the SpringSource Application Platform. I ran an early version of this up as a little demo for JavaOne, and then again at the London Spring User Group, and thought it might be a good thing to share. The sample code is here.

The Bundles

First we'll do a quick tour of the bundles in the sample code. Start the server now, or at any point after you have installed some bundles.

Bundle: hsql-server

This one is useful to have around for development and testing. All it does is launch an instance of HSQLDB in server mode, so that you can connect to it and inspect the database using SQL statements. You can just drag and drop it into the Platform Server instance in the Servers View. Do this first, because the Platform remembers the order in which bundles were installed, and starts them in that order. This one has to be started first because other bundles will try to connect to the database server.

The bundle configuration is in META-INF/spring/module-context.xml (this is conventional for Platform bundles) - Spring DM picks up all XML files from META-INF/spring. This one just uses Spring to configure and launch an instance of the HSQL Server.

There is an integration test that can be used to check the…

Open Source, Open Strategy: The SpringSource Manifesto

Engineering | Rod Johnson | May 27, 2008 | ...

As an open source software provider, we think we should be open about our strategy, too. We'd like to share how we got here, where we're going and why the journey will be good for Spring, good for Spring users and good for SpringSource.

Our History

The Spring story began in 2001, when I began working on the 30,000 lines of framework code I published along with Expert One-on-One J2EE Design and Development in 2002. My objective was to help others to avoid the pitfalls that I had encountered completing J2EE projects since 1999.

It quickly became clear that others liked the ideas in that code - such as Dependency Injection and the Spring data access abstraction - and benefited from putting them into practice. I was approached by readers who requested that I publish the code and who wanted to contribute.

I quickly came to see some important benefits of open source.

  • Most users get the functionality they need for free
  •     	<li> It…

Implementing Enterprise Integration Patterns part 0

Engineering | Iwein Fuld | May 19, 2008 | ...

After my talk on Spring Integration I've been getting quite some questions on clarification and samples. To meet the demand I will start a small series on implementing different integration patterns using Spring Integration. This first article will focus on the basics. It will show you how to get up and running and walk through one of the samples.

If you never heard about Spring Integration before it might be a good idea to familiarize yourself with it reading the introductory blog Mark Fisher wrote about it or by browsing the project website. In general

Let me start with a disclaimer: the…

Why should I care about OSGi anyway?

Engineering | Adrian Colyer | May 15, 2008 | ...

InfoQ has a discussion thread summarizing the reactions to the announcement of the SpringSource Application Plaform. Michael Burke asked a great question on that thread which can be paraphrased as "forgetting the hype surrounding OSGi, what benefits can I expect to see if I port an application currently packaged as an EAR to OSGi bundles?".

I started answering this question on the InfoQ thread, but my answer was growing too long for a comment so instead I'll address it here.

The question is a good one. The main difference you will see in an OSGi-based application versus a traditional JEE EAR-based application is improved modularity. So the question becomes, does this improved modularity bring me any benefits, and if so what are they? The book "Design Rules, The Power of Modularity" gives a very thorough treatment of the question. It's great background but I get that feeling that Michael may be looking for something a little less theoretical than what you'll find in that book…

Portability, Fish and Chips

Engineering | Rod Johnson | May 09, 2008 | ...

It's been great to hear so much discussion on the SpringSource Application Platform, online and on the floor here at JavaOne. One of the most insightful comments is from WebSphere transaction architect Ian Robinson:

Does any of this affect WebSphere? Well, nothing has changed in the core Spring framework. Regardless of what the future holds for the SpringSource Application Platform, the core Spring framework project remains complimentary to WebSphere. Like fish and chips.
Ian is exactly right. The SpringSource Application Platform is another choice for Spring deployment. Nothing has changed in…

Working with SpringSource Application Platform's provisioning repository

Engineering | Andy Wilkinson | May 09, 2008 | ...

One of the main advantages of the SpringSource Application Platform is its ability to provision dependencies on an as-needed basis. The benefits of this are two-fold: it ensures that the Platform's memory footprint is as small as possible and it allows applications to be deployed without encapsulating all of their dependencies in a monolithic deployment unit, e.g. a WAR file. To take advantage of these capabilities you will require an understanding of the Platform's provisioning repository and this blog intends to provide just that.

Where is the provisioning repository and how does it work?

By default the Platform's provisioning repository can be found in the repository directory at the root of the installation: Directory structure of the provisioning repository As you can see, there are three main directories: bundles, installed and libraries. installed is for the Platform's internal use so we'll focus on the bundles and libraries directories here. Each contains a number of subdirectories to separate the different types of dependencies:
  • ext contains external dependencies that are provided with the Platform but are not part of the Platform itself.
  • subsystems contains all of the subsystems that comprise the Platform.
  • usr is initially empty and is intended to contain user-added dependencies, i.e. anything upon which your applications depend that is not already provided by the Platform.
The Platform searches the repository directory structure for both bundles and libraries during its initial startup. I'll talk about how this searching can be configured later on in this entry. As bundles and libraries are found within the repository, details of their symbolic names, exported packages etc. are added to an in-memory index of the repository. Upon completing the scan the in-memory indexes are cached to disk. Minimising the Platform's startup time was a priority for us during development. This caching allows the Platform to save some time during startup: it can skip the scan unless it detects that the contents of the repository have changed.

Runtime provisioning

In a plain OSGi environment a bundle's dependencies can only be satisfied by other bundles which have already been installed in the environment. For example, installing and starting a bundle that imports the org.apache.commons.dbcp package will fail if no bundle which exports that package has already been installed. This can be a real pain for users as they have to manually install all of a bundle's dependencies. Thankfully, the SpringSource Application Platform improves upon this significantly by dynamically installing dependencies on an as-needed basis.

When a deployed application is started by the Platform its…

SpringSource Application Platform Manifest Headers

Engineering | Glyn Normington | May 08, 2008 | ...

The SpringSource Application Platform is constructed from OSGi bundles and supports applications which are also constructed from OSGi bundles. The Platform supports the standard features of OSGi, but it also supports some additional manifest headers. Several people have asked Why did SpringSource add proprietary headers? and What are the semantics of the new headers?, so this post explains the background motivation and the semantics of Import-Library and Import-Bundle.

Standard OSGi Bundle Support

The Platform is built on the OSGi R4.1 standard, or JSR 291 if you prefer, and uses Equinox as its OSGi implementation. The result is that you can develop standard OSGi bundles using the Platform's tooling and deploy those bundles on the Platform, as a number of users have been doing since the Platform's launch.

So OSGi savvy developers can use the Platform as a standard OSGi container and benefit from Platform features such as:

  • the ability to deploy bundles using the Admin Console or by dropping bundles in the Platform's pickup directory,
  • diagnostics such as resolution failure diagnosis, application specific trace, and automatic deadlock detection,
  • strong integration with Spring and Spring Dynamic Modules, for developers who want to use these frameworks, and
  • automatic provisioning of dependencies from a repository.
However, the Platform also aims to make it easy for enterprise application developers with little or no prior exposure to OSGi to benefit from OSGi, which places some extra requirements on the Platform.

Additional Requirements of Enterprise Applications

As Sam's recent blog on the Platform's deployment options explains, you can deploy existing monolithic WAR files on the Platform with no need to understand OSGi - the Platform takes care of everything for you. But to benefit from shared libraries, shared services and, ultimately, PAR file scoping, it is necessary to break monolithic WAR files into OSGi bundles. How hard can that be?

Well, some steps in the process are relatively easy, especially if good software engineering practices have been followed and the code has been organised into service, domain, and infrastructure components. These components can be converted into bundles and the dependencies between them expressed using standard OSGi Import-Package and Export-Package headers in META-INF/MANIFEST.MF.

A more difficult step is expressing dependencies on enterprise frameworks such as Spring and Hibernate. It is entirely possible to express these dependencies using standard OSGi Import-Package and Require-Bundle headers, and this is exactly what you should do if your aim is to create OSGi bundles which will run in other OSGi containers, but this approach has some hidden costs.

Firstly, the developer has to decide precisely which packages comprise a given framework. It isn't sufficient merely to import the packages the application code uses, as several enterprise frameworks weave further dependencies into the bytecode of the application when the application is loaded. The developer has to discover, probably by trial and error, which additional implementation packages to import to ensure correct behaviour of the woven application.

Then there is the chore of migrating from one version of a framework to the next where the precise set of packages comprising the framework has changed. The additional packages required for weaving are typically not defined by a public contract and so are subject to change.

Additionally, the resultant package imports don't properly capture the design intent, which makes maintaining or extending the application more difficult in the future.

We really don't want to impose these burdens on our users, so we created some additional SpringSource Application Platform specific manifest headers, Import-Library and Import-Bundle, as convenient ways of expressing dependencies on enterprise frameworks. As you'll see below, these headers are really just syntactic sugar which are expressed in terms of standard OSGi package imports.

Import-Library

The basic syntax is similar to that of other manifest headers:
    Import-Library: <librarySymbolicName>;version=<versionRange>
where <librarySymbolicName> is the symbolic name of the library and <versionRange> is a range of acceptable versions of the library using OSGi version range notation. A library definition specifies the library's symbolic name and version and these together uniquely identify the library to the Platform.

If you are unfamiliar with OSGi version range notation, by far the most commonly used forms are minimum version ranges such as 2, meaning version 2 or later, and half-open ranges such as [2.2.1,2.2.2), meaning any version between 2.2.1 inclusive and 2.2.2 exclusive. If version=<versionRange> is omitted, together with the semicolon delimiter of course, then the default range includes all versions.

For each library import, the Platform selects the library with the given symbolic name and the highest version in the given version range available in the Platform's repository. The Platform then replaces the library import with a set of package imports which match all the packages exported by the bundles of the library. The Platform detects the situation where a bundle imports two or more libraries which export a common package, issues an appropriate log message, and fails to install the importing bundle.

So, for example, the following header imports some version of the Spring Framework library between 2.5.4 inclusive and 2.5.5 exclusive:

    Import-Library: org.springframework.spring;version="[2.5.4,2.5.5)"

Optional Library Import

You can indicate that a library import is optional using the following syntax. Note the special separator := which indicates a directive that modifies the semantics of the manifest header, as opposed to the separator = which indicates a matching attribute, like version.
    Import-Library: <librarySymbolicName>;version=<versionRange>;resolution:=optional

If resolution is not specified, or is specified as mandatory, the bundle containing the import library header will fail to install if there is no library with the given symbolic name and a version in the given range. But if resolution:=optional is specified, the library import will be ignored if no suitable library is available.

So, for example, the following header imports some version of the Spring Framework library from 2.5 onwards, but is ignored if no suitable library is available:

    Import-Library: org.springframework.spring;version="2.5";resolution:=optional

Importing More than One Library

If you need to import more than one library, then specify a comma-separated list of library imports in a single Import-Library manifest header as in the following example:
    Import-Library: org.foo.p;version="[1,2)",org.bar.q;version="[2,3)"

Import-Bundle

Import-Bundle is a further convenience for cases where a library would consist of only a single bundle and a library definition is inconvenient to create. The syntax is very similar to that of Import-Library except that it refers to a bundle's symbolic name and version instead of those of a library.

As you would expect, for each imported bundle, the Platform selects the bundle with the given symbolic name and the highest version in the given version range available in the Platform's repository. The Platform then replaces the bundle import with a set of package imports matching the packages exported by the bundle.

So, for example, the following header imports the Hibernate Object-Relational Mapper bundle:

    Import-Bundle: com.springsource.org.hibernate;version="[3.2.6,3.2.7)"

Why not Overload Require-Bundle?

If you are familiar with OSGi, you may be asking yourself why we didn't overload Require-Bundle instead of introducing Import-Bundle.

Well, we wanted Require-Bundle to retain its standard semantics, including the ability to marry together pieces of a split package. But we wanted Import-Library and Import-Bundle to have the same underlying semantics as Import-Package which avoid the complexities of split packages.

We also anticipate that, as the Platform evolves over time, we'll need to add further directives to Import-Library and Import-Bundle which would not be appropriate to add to Require-Bundle.

What Next?

The Platform beta program is in progress and we'll be listening to all feedback on Platform features, including the new manifest headers.

For users who want to take advantage of the Platform's headers, but who need to produce bundles which will run on other OSGi containers, we plan to produce a tool which will replace the Import-Library and Import-Bundle

SpringSource Application Platform Deployment Options

Engineering | Sam Brannen | May 06, 2008 | ...

Since we released the SpringSource Application Platform last Wednesday, numerous developers have downloaded the 1.0.0 beta and started taking the Platform for a test drive. As a result, people have begun asking, "How can I deploy my apps on the Platform, and what kind of deployment and packaging options do I have?" Moreover, developers are eagerly requesting to see working samples. In response, the S2AP team will be releasing several sample applications over the coming weeks demonstrating these features and more, but before you get your hands on these samples, I'd like to give you a high-level…

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