You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@abdera.apache.org by "Dan Diephouse (JIRA)" <ji...@apache.org> on 2007/08/08 01:51:59 UTC
[jira] Updated: (ABDERA-55) Add setters & refactor servlet to make
it more spring friendly
[ https://issues.apache.org/jira/browse/ABDERA-55?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dan Diephouse updated ABDERA-55:
--------------------------------
Attachment: patch
> Add setters & refactor servlet to make it more spring friendly
> --------------------------------------------------------------
>
> Key: ABDERA-55
> URL: https://issues.apache.org/jira/browse/ABDERA-55
> Project: Abdera
> Issue Type: Improvement
> Affects Versions: 0.2.2
> Reporter: Dan Diephouse
> Fix For: 0.3.0
>
> Attachments: patch
>
>
> I'm attaching a patch which makes it possible to extend the AbderaServlet to provide your own pre-inited ServiceContext like this:
> public class MyAbderaServlet extends org.apache.abdera.protocol.server.servlet.AbderaServlet {
>
> protected ServiceContext createServiceContext() {
> System.out.println("initing service context");
> WebApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(getServletContext());
>
> ServiceContext sc = (ServiceContext) ctx.getBean("abderaServiceContext");
> sc.init(getAbdera(), getProperties(getServletConfig()));
> return sc;
> }
> }
> It also adds some setters to make Abdera easier to use from Spring (although not as easy as it could be... I still have to create my own servlet, my own TargetResolver, and my own ProviderManager. I should just be able to embed these in Spring config. I may submit a patch for this in the future, but it would require a little more refactoring)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.