[
https://issues.apache.org/jira/browse/ABDERA-55?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dan Diephouse closed ABDERA-55.
-------------------------------
Resolution: Fixed
> 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.