Deploying WARs to the OSGi Web Container is now even easier

Engineering | Andy Wilkinson | June 16, 2009 | ...

As Rob mentioned in his introduction to the OSGi Web Container, dm Server automatically imports system packages into Web bundles. This has proved very useful, especially when deploying existing WAR files into an OSGi environment. I've recently spent some time moving this functionality from dm Server's Web subsystem into the OSGi Web Container RI. This blog describes the new functionality, and how to make use of it.

Enabling import of the system packages

There are two ways in which you can instruct the RI to import all of the exported system packages.

When you install a Web bundle, you can now use the SpringSource-SystemPackages…

Using Spring BlazeDS Integration 1.0

Engineering | Jeremy Grelle | June 10, 2009 | ...

Today we announced the public availability of the 1.0 GA release of the newest member of the open source Spring project portfolio, Spring BlazeDS Integration. Corresponding with this event, I thought it time to bring my previous getting started post up to date. To recap:

This project's purpose is to make it easier to build Spring-powered Rich Internet Applications using Adobe Flex as the front-end client. It aims to achieve this purpose by providing first-class support for using the open source Adobe BlazeDS project and its powerful remoting and messaging facilities in combination with the familiar Spring programming model.

Taking Spring BlazeDS Integration for a Test Drive

We have really expanded the feature set since that first M1 release to include:
  • full Spring Security integration
  • asynchronous messaging support (with 3 different message destination types)
  • a complete XML configuration namespace
  • annotation-based configuration options for remoting
  • numerous advanced customization hooks

Now included with the project distribution is a thorough collection of samples built in collaboration with Adobe that demonstrate use of the various features, known as the Spring BlazeDS Integration Test Drive. These samples are a great way to get up and running with the project, and here I'm going to give you a quick…

Cloning in dm Server 2.0 M3

Engineering | Glyn Normington | June 10, 2009 | ...

Cloning is the feature in dm Server 2.0 which copies certain bundles and libraries into a scoped application (that is, a PAR or a scoped plan) as described in the roadmap.

The support for cloning in dm Server has progressed steadily over the last few sprints. The fundamental mechanisms were in place in M1: cloning may be triggered:

  • manually by specifying the directive sharing:=clone on import-library or import-bundle
  • automatically when a scoped application fails to resolve because of a uses constraint violation.

Since then the code was tidied up somewhat, a major performance optimisation was added for the common case of Spring framework being cloned, log messages were added to indicate which bundles have been cloned, tracing was improved, and a few bugs were fixed.

We have noticed that manual cloning is a relatively safe operation as it is completely under the user's control. However, automatic cloning is always speculative. It is driven by OSGi resolver failures, in particular violations of uses constraints (as explained in an earlier blog). Some uses constraint violations cannot be avoided by cloning, but we can't tell until automatic cloning has been attempted and the uses…

Red Hat Reacts to SpringSource's Leadership

Engineering | Rod Johnson | June 03, 2009 | ...

As the Register and several bloggers have noted, Red Hat recently announced a defensive move motivated by trying to play catch-up with SpringSource. Clearly the momentum of SpringSource tc Server and dm Server has Red Hat worried, along with the continued advance of the Spring Framework as the de facto standard component model for enterprise Java.

The “JBoss Open Choice strategy” appears to be a repackaging, rather than new technology, which attempts to position JBoss as still relevant in a brave new world of changing requirements. Not only is the repackaging obviously reactive, but much of…

Spring Security 3.0.0.M1 Released

Engineering | Luke Taylor | June 03, 2009 | ...

We're pleased to announce that the first milestone of Spring Security 3.0 is now available for download. The release is also available through the Maven milestone repository at As with Spring 3.0, this is the first release which requires a minimum JDK 1.5 to run and also require Spring 3.0, so you should get hold of the Spring 3.0.0.M3 release if you aren't already using it. So what's new and what has changed in this release?

Expression–Based Access Control

This release is the first to include a preview of our Spring-EL based authorization support. You can now use expressions both in method annotations and for web security. This opens up many new possibilities when compared to the familiar attributes and voter–based mechanism. A simple example will probably be a good start. Here's one for a web application, using the security namespace:

  <http use-expressions="true">
     <intercept-url pattern="/secure/**" access="hasRole('ROLE_SUPERVISOR') and hasIpAddress…

What the OSGi Web Container means for dm Server

Engineering | Rob Harrop | June 01, 2009 | ...

Following my previous entry many people have been asking about the impact that the move to the OSGi Web Container will have on dm Server. The most common questions being asked are:

  • What is being added?
  • What is staying the same?
  • What is changing?
  • How do I keep up to date?

I'll address each of these questions independently. If you have any more questions, please feel free to comment.

What is being added?

Integrating with the Web Container RI will give dm Server access to all the features of the OSGi Web Container standard. This includes a standard model for how WARs are handled, support for the webbundle URL scheme and support for the Web Container extender.

I'm exploring some nice value-added features for the RI including dynamic configuration using ConfigAdmin, a comprehensive MBean interface to introspect deployed web bundles and EventAdmin integration to monitor lifecycle events. All of these features will be added to dm Server as well as to the RI.

What is staying the same?

You'll be pleased to know that much of what you have learnt about web applications in dm Server remains the same.

Using the dm Server deployer

In addition to support for webbundle URLs, WAR files can still be deployed using the dm Server deployer. All paths into the deployer are supported including the pickup directory, deployer MBean and Admin Console.

When deploying using the dm Server deployer, WAR file dependencies will be automatically installed from the bundles available in the configured repository chain.

WAR deployment patterns

All the WAR types mentioned in the Programmer's Guide remain - in fact they are part of the Web Container standard.

System package imports

WARs deployed using dm Server will auto-import all the configured system packages even if this feature doesn't make it into the standard. If deploying using a webbundle URL you can trigger system package import using a URL parameter. I'm hopeful that the spec will include some standard behaviour in this area

What is changing?

We are aiming to keep the most features the same in dm Server, but the move to the Web Container does necessitate some changes. At the same time, we're taking advantage of the code rework to integrate some of the more popular feature requests we see from our users.

Web modules are being removed

The biggest change is the removal of web modules. Our preference is to support standards-based approaches, and now that we've been able to work with the OSGi Alliance to create a standards-based approach to web applications on OSGi, we are moving to it in preference to a dm Server-specific solution.

For those of you who are using web modules today, I'm really interested to hear what features you like the most and would be sad to lose. There is no reason why important web modules features cannot be reworked on top of Web Container web bundles.

Switch to Tomcat config format

In the 1.0.x line, the Tomcat instance embedded in dm Server is configured using the JSON configuration file format. Many of our users have requested that we switch back to using Tomcat's XML format. The Web Container RI uses the standard Tomcat format and when dm Server switches to the Web Container it will switch configuration file formats as well.

I'm still finalizing the exact details of where the configuration files will be stored. I'm hoping to be able to parameterize the Tomcat configuration file with placeholders that can be populated from ConfigAdmin

How do I keep up to date?

The easiest way to stay abreast of the progress is to track the SVN repos for the Web Container and for dm Server Web. You can access these repos at the URLs below:

I'll be blogging here regularly and you can follow progress on Twitter with #osgi and #dmserver.

Introduction to the OSGi Web Container

Engineering | Rob Harrop | May 27, 2009 | ...

Updated: added version control instructions for Git.

For the last few months I've been working with Subbarao Meduri, Graham Charters, Hal Hildebrand and others from the OSGi Enterprise Expert Group on the RFC66 Web Container specification. The Web Container specification defines how WAR files can be deployed on an OSGi service platform in a standard way.

This is extremely interesting for us, because dm Server has supported WAR files for nearly 18 months now and we are excited to be able to work towards a standard model. As an end user, you'll be able to deploy WAR files on OSGi without…

Getting Started with Spring Roo

Engineering | Ben Alex | May 27, 2009 | ...

Update: The third installment of the "Introducing Spring Roo" blog series is now available and covers Roo's internal architecture in detail.

I have a confession to make. While many of you would know I've been busily working away on Spring Roo in recent months, I also have a separate project that hasn't made it into Subversion. The other project is planning our wedding, as next month my fiancée and I are traveling overseas to get married. So as I pondered what I could show you in this blog entry about Roo, it struck me that I should take the opportunity to build our wedding's RSVP site using Roo! So today we'll be learning how to build a wedding RSVP site using Roo, which some of my colleagues have commented is an enterprising example of pursuing work-life balance. :-)

Progress Update

If you missed the first installment in the Spring Roo blog series on 1 May 2009, in brief I introduced the vision of SpringSource's new open source productivity tool for those wanting to rapidly build best practice Spring applications in Java. As many people discovered who played around with the alpha releases, Spring Roo offers a powerful and easy-to-use approach to productive application development, with much of the motivation behind Roo emerging in the first Jira issue, ROO-1 (logged by Rod Johnson, Father of Spring and CEO of SpringSource).

Today I am pleased to announce that we have just released Spring Roo 1.0.0.M1. This release not only features numerous fixes, enhancements and a 31% performance improvement, but also an exciting range of new capabilities including email services, JMS, Spring Web Flow, simplified installation and automatic Selenium support. That's on top of those many capabilities already present in the alpha releases, as mentioned in my earlier blog entry.

In addition to working on the first milestone release, over the last month we've also established the public project infrastructure typical of open source projects. We now have available a community support forum, Jira issue tracking, public Subversion repository, FishEye source monitoring and so on. Some of the comments reported on the #roo Twitter

dm Server 2.0 M2

Engineering | Andy Wilkinson | May 19, 2009 | ...

dm Server 2.0.0.M2 has been released, and is now available for download. In the two sprints since 2.0.0.M1, we've made significant progress towards the final release, both in terms of new features, and in defect fixes. Take a look at the M2 release notes if you're interested in seeing everything that we've been working on. Please keep your feedback coming as comments on our blog, in the forums, and on JIRA.

New and noteworthy

Spring 3 support

In the milestone, we've upgraded dm Server to run on Spring 3. As we move towards the final release of dm Server 2.0, we'll be upgrading the version of Spring 3 as new milestones and snapshots become available.

Improvements to cloning

We've made some significant improvements in our support for auto-cloning. For example, you can now run Spring 2.5.6 and Spring 3-based applications side-by-side in the same dm Server.

Watched repositories

Support for watched repositories has been added. A watched repository is configured to watch a directory on your filesystem and, as artifacts are added to the directory, they will become available to dm Server's provisioning system. Equally, as artifacts are removed from the directory, they will no longer be available to dm Server's provisioning system.

Here's some example configuration for a watched repository:

"watched-repo" : {
    "type" : "watched",
    "watchDirectory" : "repository/watched",
    "watchInterval" : 5

Using an OSGi Profile with Bundlor

Engineering | Ben Hale | May 18, 2009 | ...

When managing and transforming as many bundles as are included in the the SpringSource Enterprise Bundle Repository, it becomes very difficult to remember what packages are boot delegated, exported from the system bundle, or from other bundles in your system. This information is important because you probably don't want to import packages that are boot delegated, you probably do want to import system bundle packages at "0", and you want to define custom imports for all others. Remembering which packages are in each of these categories ends up being a bit error prone and defining template…

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

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