You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@abdera.apache.org by Giovanni Tusa <gi...@gmail.com> on 2009/06/29 15:26:29 UTC

How to handle ServiceContext in abdera 1.0

Hi all,
some time ago I've implemented an abdera atom server by using the abdera 0.3
incubating release. Now I would like to upgrade my application in order to
use abdera 1.0.
Being not yet an expert with Abdera, I have some problems.
With abdera-0.3, following some examples found on old posts, I used the
DefaultServiceContext class to construct my own service Context and say to
Abdera how to find my Provider Manager and Target Resolver, in the following
way:

import org.apache.abdera.protocol.server.impl.DefaultServiceContext;

/*
 * Used to define the ProviderManager and TargetResolver for
 * this service
 */
public final class MyOwnServiceContext
  extends DefaultServiceContext {

  public MyOwnServiceContext() {
    this.defaultprovidermanager = MyOwnProviderManager.class.getName();
    this.defaulttargetresolver = MyOwnTargetResolver.class.getName();
  }
}

Then I implemented MyOwnProviderManager and MyOwnTargetResolver.

The problem I have now is that in abdera-1.0 it seems the
DefaultServiceContext class is no longer supported, therefore, how can I
update my implementation in order to achieve the same result (i.e. define a
service context and so on)?

I am beginning to improve my old sample application to create a more
powerful server which should go in production, so it is very important for
me to start this process with the latest update version of abdera.

Any help/suggestion will be very very appreciated.

Many thanks
Giovanni