You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@olingo.apache.org by "Michael Bolz (JIRA)" <ji...@apache.org> on 2015/06/21 17:08:00 UTC

[jira] [Commented] (OLINGO-709) Support injection of ODataServiceFactory instance

    [ https://issues.apache.org/jira/browse/OLINGO-709?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14595071#comment-14595071 ] 

Michael Bolz commented on OLINGO-709:
-------------------------------------

Created a proposal (PoC) (see [branch: OLINGO-709-InjectODataServiceFactory|https://git-wip-us.apache.org/repos/asf?p=olingo-odata2.git;a=shortlog;h=refs/heads/OLINGO-709-InjectODataServiceFactory] and [commit|https://git-wip-us.apache.org/repos/asf?p=olingo-odata2.git;a=commit;h=f1ca1a20492c4a6d2e74bda0c1a21d0996a24c32].

With the introduced request parameter {{ODataServiceFactory.FACTORY_INSTANCE_LABEL}} an instance of an {{ODataServiceFactory}} could be attached (injection) to an {{HttpServletRequest}}. 
Furthermore with the split of the {{ODataServlet}} in an abstract {{AbstractODataServlet}} and a concrete class and making the {{getServiceFactory(...)}} {{abstract protected}} the _open close principle_ is more respected.


> Support injection of ODataServiceFactory instance
> -------------------------------------------------
>
>                 Key: OLINGO-709
>                 URL: https://issues.apache.org/jira/browse/OLINGO-709
>             Project: Olingo
>          Issue Type: Improvement
>          Components: odata2-core
>    Affects Versions: V2 2.0.4
>            Reporter: Michael Bolz
>            Assignee: Michael Bolz
>            Priority: Minor
>
> Support injection of {{ODataServiceFactory}} instance in addition to creation of a new instance on every request.
> Currently the {{createServiceFactory(HttpServletRequest req):ODataServiceFactory}} method of the {{org.apache.olingo.odata2.core.servlet.ODataServlet}} only allows that an {{ODataServiceFactory}} instance is created for each request.
> It should be possible to attach (inject) an already created {{ODataServiceFactory}} instance to the request.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)