ApplicationContext Configuration

Abdera comes with Spring 2 configuration support and several classes to make building Spring based applications easier. Most server applications should be able to built by writing a Provider and a small bit of Spring XML.

The first step then is to write a CollectionAdapter. This is the place where your application specific logic goes for creating, editing or deleting resources. Please see the Server Implementation Guide for more information.

package org.example;

import org.apache.abdera.server.CollectionAdapter;

public class FooCollectionAdapter implements CollectionAdapter {

And add it to your beans.xml:

<bean id="employeeCollectionAdapter" class="org.example.EmployeeCollectionAdapter">
  <property name="href" value="employees"/>

Now you'll need to configure the Abdera Provider. The Provider hosts all the workspaces and collections inside Abdera.

<beans xmlns=""

  <!-- Abdera -->
  <a:provider id="provider">
    <a:workspace title="My Atom Workspace">
      <ref bean="fooCollectionAdapter"/>


Servlet Configuration

You'll probably also want set up the AbderaServlet so it can pull the ServiceContext from your ApplicationContext. Here is an example web.xml configuration:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns=""
  xmlns:xsi="" version="2.4"

  <servlet id="abdera">

  <servlet-mapping id="abdera-mapping">
  • No labels