jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chetan Mehrotra (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (JCR-3420) Improving Jackrabbit integration within OSGi and other managed environment
Date Wed, 12 Sep 2012 14:11:07 GMT

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

Chetan Mehrotra edited comment on JCR-3420 at 9/13/12 1:09 AM:
---------------------------------------------------------------

ya thinking more about it we can get rid of extra attribute. So the logic would be

1. Check for all the classNames as part of BeanConfigVisitor. 
  a) If the class object corresponding to that className is an interface or an abstract class
then corresponding instance for that bean MUST be obtained via factory. 
  b) If the class object is not an interface then no DI would be done and bean instance would
be directly instantiated as per current logic. 
2. Once all such dependencies are determined use that to control when the repository should
be started
3. When newInstance call is done look for a service from managing container (like Service
Registry in OSGi) which implements that interface and use that. If no such service is found
fail the startup.

In current JR impl all such cases involve interfaces and such an approach should work fine
                
      was (Author: chetanm):
    ya thinking more about it we can get rid of extra attribute. So the logic would be

1. Check for all the classNames as part of BeanConfigVisitor. 
  a) If the class object corresponding to that className is an interface then corresponding
instance for that bean MUST be obtained via factory. 
  b) If the class object is not an interface then no DI would be done and bean instance would
be directly instantiated as per current logic. 
2. Once all such dependencies are determined use that to control when the repository should
be started
3. When newInstance call is done look for a service from managing container (like Service
Registry in OSGi) which implements that interface and use that. If no such service is found
fail the startup.

In current JR impl all such cases involve interfaces and such an approach should work fine
                  
> Improving Jackrabbit integration within OSGi and other managed environment
> --------------------------------------------------------------------------
>
>                 Key: JCR-3420
>                 URL: https://issues.apache.org/jira/browse/JCR-3420
>             Project: Jackrabbit Content Repository
>          Issue Type: New Feature
>          Components: config, jackrabbit-core
>    Affects Versions: 2.5.1
>            Reporter: Michael Dürig
>         Attachments: JCR-3420-osgi-factory.patch
>
>
> While using jackrabbit in managed environment like Sling, Spring etc
> its easy for other components to access the Repository service.
> However its tricky to use managed components of those env within
> Jackrabbit as it creates the instances on its own. To simplify such
> integration it would be helpful if JR exposes a factory service which
> is used to create the various beans from the JR configuration.
> See http://markmail.org/message/johbo2dnepwtjogm for Chetan's initial proposal and POC
implementation. 

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message