OSGi Test Stubs 1.0.0.M1

Engineering | Ben Hale | June 23, 2009 | ...

I'm pleased to announce the 1.0.0.M1 release of SpringSource's OSGi Test Stubs.  These stubs offer a way to unit test complex OSGi Framework interactions without needing a full OSGi container.

The Problem

As the dm Server team has been developing, we found that one of the biggest problem areas for testing for us was in BundleActivators.  Our BundleActivators do quite a bit of publishing services to the service registry as well as consuming services using ServiceTrackers.  These kinds of tasks involve many interwoven calls to BundleContexts, Bundles, ServiceRegistrations, and ServiceReferences.  In the beginning, these activators were simple enough that not much unit testing was done on them, and we depended on integration tests to catch any bugs that were introduced.  As time went on though, the activators became more complex and unit testing became a more pressing need.  We started using EasyMock for these tests, but found that they were very complex, hard to maintain, and most importantly hard to understand.
@Test
public void startAndStop() throws Exception {
    BundleActivator bundleActivator = new DumpBundleActivator();
    BundleContext context = createMock(BundleContext.class);
    Filter filter = createMock(Filter.class);
    
    String filterString = "(objectClass=" + DumpContributor.class.getName() + ")";
    
    expect(context.createFilter(filterString)).andReturn(filter);
    context…

dm Server Repository Content via JMX

Engineering | Ben Hale | June 22, 2009 | ...

In the dm Server 2.0.0.M1 release we added support for shared repositories. As a followup to this new functionality, we've added support for browsing those repositories via JMX.

Connecting to a running dm Server instance with a JMX client now shows you a Repository group. Under this group, each configured repository (with the exception of chained repositories) has a bean that returns synopses of all of the artifacts contained inside. The bean also exposes a method for returning the entire, detailed ArtifactDescriptor for a given bean based on it's type, name, and version.

JMX Repository Browsing

Obviously, something like JConsole is mostly useful for displaying small targeted amounts of data.  For larger datasets, the AMS team is currently working on visualization that is a bit easier on the eyes.

Modular Web Applications with SpringSource Slices

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

Updated: added sub module instructions for Git.

I've talked in the past about providing support for truly modular applications, and I'm pleased to announce that you can now access the early prototype code of SpringSource Slices.

Building and Installing

You can access the source code from our Git repository:

git clone git://git.springsource.org/slices/slices.git
git submodule init
git submodule update

To build a packaged version of Slices simply run ant clean jar package from the build-slices directory:

cd slices/build-slices
ant clean jar package

This will result in a zip file in target/artifacts that contains the Slices subsystem which can then be installed on top of dm Server 2.0

Installing Slices is simply a matter of adding the new subsystem to dm Server and then updating dmServer's profile to start the new subsystem. Slices should work with any recent dm Server 2.0 snapshot build. Here I'm using 2.0.0.CI-R326-B274 which I've already downloaded and unzipped on my desktop:

 unzip target/artifacts/springsource-slices-BUILD-20090622083953.zip -d ~/Desktop/springsource-dm-server-2.0.0.CI-R326-B274

Next, dm Server's kernel.properties configuration must be updated to include the new slices subsystem. Open your dm Server installation's config/kernel.properties file, and edit the Profile Configuration section to list the slices subsystem and to give the profile a suitable name (I've called it slices):

#######################
# Profile Configuration
#######################
profile.name=slices…

Exploring Roo's Architecture

Engineering | Ben Alex | June 18, 2009 | ...

Last month we discovered how easy it is to build a fully-fledged enterprise application in just a few minutes using Spring Roo - our new productivity tool for Java developers. While many Java developers have already started evaluating Roo to help save time on their projects, I've received a lot of questions from people curious about how Roo actually works. In this blog entry I will explore Roo's architecture in depth, including its goals, alternatives prototyped, design rationale and implementation details. By the end you'll have a good understanding of what makes Roo tick and why its approach…

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 11, 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…

Spring BlazeDS Integration 1.0.0 Released

Releases | Jeremy Grelle | June 11, 2009 | ...

Dear Spring Community,

I'm pleased to announce that the first GA release of Spring BlazeDS Integration, the open source solution for building Spring-powered RIAs with Adobe Flex, is now available.

Download | Reference Documentation | JavaDocs | Changelog

In response to the community feedback since the release of RC2, we've clarified some of the documentation, made a few minor improvements to the Spring Integration messaging adapter, added some metadata to help with tooling support, and tweaked the ivy and pom files to ensure all dependencies are properly captured. I would like to extend my sincere thanks to all of those who have tried out the early releases and provided feedback, as it has been critical to ensuring that the full 1.0 is solid.

For anyone who is just starting to explore the world of Spring-powered RIAs, be sure to check out Using Spring BlazeDS Integration 1.0 for an introduction and to get up and running.

As always, I encourage anyone interested to get involved by trying out the release and giving us feedback in the community forum and Jira. We've already got a few ideas for what more we can add in the future, and we're always open to hearing your ideas fueled by real-world experience.


Jeremy Grelle
Spring BlazeDS Integration Lead

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…

SpringSource Tool Suite 2.1.0.M2 released

Releases | Christian Dupuis | June 05, 2009 | ...

Dear Spring community,

we are pleased to announce that we released a second milestone of upcoming SpringSource Tool Suite 2.1.0.

Here are the highlights of new features in 2.1.0.M2:

  • Updated to Spring 3.0 including support for @Configuration/@Bean and task:* and jdbc:* namespaces
  • Ability to use external Roo installation with STS; Roo commands are executed in background to not block the UI
  • Integration of VMware Lab Manager
  • Management of and remote application deployment to tc Server instances (groups or single instances)
  • Major performance improvement with the Spring Project Builder

More details about features is available from the New & Noteworthy.

Remember, STS is free. Get your copy at http://www.springsource.com/products/sts.

Christian

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 http://maven.springframework.org/milestone. 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…

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