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

Mark Struberg commented on OWB-652:
-----------------------------------

The following is from my notebook:

*) Each ClassLoader needs his own BeanManagerImpl forming an acyclic dependent 
tree.
*) BeanManager delegates to his parent first for
        - #getBeans()
        - #getPassivationCapableBean()
        - tbc
*) An important point is the classpath scanning. This has to be done in 
analogue to the ClassLoader hierarchy.
   It's not possible anymore to just scan the whole classpath but the container 
must first scan all beans which are contained in the parent ClassLoader and 
only afterwards must scan his own beans.
   A child ScannerService must first delegate the scanning of a certain class 
to it's parent BeanManagers ScannerService to detect if it is responsible for a 
certain class. 

Thus I guess we need a HierarchicBeanManager and a HierarchicScannerService 
which goes hand-in-hand.
                
> Introduce HierarchicBeanManager
> -------------------------------
>
>                 Key: OWB-652
>                 URL: https://issues.apache.org/jira/browse/OWB-652
>             Project: OpenWebBeans
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.1.3
>            Reporter: Mark Struberg
>            Assignee: Mark Struberg
>             Fix For: 1.1.4
>
>
> The currently implemented BeanManager cannot properly deal with multiple 
> ClassLoaders forming an isolation hierarchy.
> This mainly hits EAR deployment in Java EE servers. The spec is not really 
> clear about this scenario and in fact no existing EE server currently solves 
> this problem sattisfyingly. 
> I already explained quite a few times how we can overcome this problem:
> http://mail-archives.apache.org/mod_mbox/openwebbeans-dev/201202.mbox/%3c1329169509.62085.yahoomail...@web171506.mail.ir2.yahoo.com%3E
> GERONIMO-6005
> https://issues.jboss.org/browse/CDI-142
> https://issues.jboss.org/browse/CDI-18
> https://issues.jboss.org/browse/CDI-129
> The solution:
> Each ClassLoader which has a BeanArchive will get it's own Beans. Any Beans 
> accessible through a parent BeanManager will not be contained. Instead they 
> must be resolved via the parent ClassLoader.
> It should be possible to easily implement this by introducing a 
> HierarchicScannerService as a child-Interface of ScannerService which knows 
> how to exclude parent BDAs. If a HierarchicScannerService is configured, the 
> BeanManager will automatically delegate the detection to it's parent 
> BeanManager. Otherwise all remains the way it is right now.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to