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:49:59 UTC
[jira] Created: (ABDERA-55) Add setters & refactor servlet to make
it more spring friendly
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
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.
[jira] Closed: (ABDERA-55) Add setters & refactor servlet to make
it more spring friendly
Posted by "Dan Diephouse (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Updated: (ABDERA-55) Add setters & refactor servlet to make
it more spring friendly
Posted by "Dan Diephouse (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Commented: (ABDERA-55) Add setters & refactor servlet to
make it more spring friendly
Posted by "Dan Diephouse (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/ABDERA-55?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12518287 ]
Dan Diephouse commented on ABDERA-55:
-------------------------------------
I thought I'd attach my spring config in case anyone wanted to see:
<bean id="abderaServiceContext" class="org.apache.abdera.protocol.server.impl.DefaultServiceContext">
<property name="providerManager" ref="providerManager"/>
<property name="defaultTargetResolver" value="foo.MyTargetResolver"/>
</bean>
<bean id="providerManager" class="foo.MyProviderManager">
<property name="provider" ref="provider"/>
</bean>
<bean id="provider" class="foo..MyProvider"/>
> 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.