JBoss Community

Implementing a non-flat deployment for Weld Integration

reply from Flavia Rainone in JBoss Microcontainer Development POJO Server - View the full discussion

Ales Justin wrote:

 

How often is this - loadBeanDeploymentArchive - method used?

 

Or, shouldn't the (potential) operation [Archive|Deployment]::isReachable(Archive other) be O(1),

a simple hash lookup of pre-build reachable archives / deployments?

I was mentioning keeping only a single map of CL->Archives and bypassing the is reachable check. My argument on this is that is it really possible that Weld will request for a non reachable beanClass? If the beanClass is not reachable from the current deployment CL, the code won't run, because the CL can't load beanClass. Thus, IMHO, I don't think that it is possible that Weld will ever request for a beanClass associated with an Archive that is not visible to the current Deployment. But, as I don't know nothing about Weld implementation, I'm hoping that Pete or Ales will answer this question ;)

 

Having a pre-built map of reachable archives is totally a different story, i.e., more complex to implement and will incur at an extra cost to maintain (I have again to walk through the graph to be able to define which archives are visible, this time it won't be done at every loadBeanDeploymentArchive request; but it will be done for every pre-existing deployment at every new deployment, and the cost will increase according to the number of Archives we have in Default Domain).

Reply to this message by going to Community

Start a new discussion in JBoss Microcontainer Development POJO Server at Community