[
https://jira.jboss.org/browse/JBAS-8106?page=com.atlassian.jira.plugin.sy...
]
Kabir Khan commented on JBAS-8106:
----------------------------------
What is currently in WeldBeanMetaDataDeployerPlugin.createContext() is quite hacky. The
intent is to not install any of the "system beans" as intermediate beans,
leading to WeldKernelControllerContexts, since that always leads to unresolved
dependencies and failures. This is currently done by:
public KernelControllerContext createContext(Controller controller, DeploymentUnit
unit, BeanMetaData beanMetaData)
{
if
(unit.getTopLevel().getAttachment(DeployersUtils.getBootstrapBeanAttachmentName(unit)) ==
null)
{
//Not a Weld deployment
return null;
}
if (isSystemBean(unit, beanMetaData))
{
//Install Weld deployment bean as normal KernelControllerContext
return null;
}
//Create BeanMetaData & KernelControllerContext for intermediate bean
}
private boolean isSystemBean(DeploymentUnit unit, BeanMetaData beanMetaData)
{
String name = beanMetaData.getName();
String topLevelName = unit.getTopLevel().getName();
if (name.contains(topLevelName) ||
name.contains(unit.getSimpleName()) ||
name.startsWith("jboss.j2ee:") ||
name.startsWith("jboss.naming:") ||
name.startsWith("jboss.ejb3") ||
name.endsWith("_CompJndiBinder"))
return true;
return false;
}
Ideally we should be able to scan the bean for the @Weld property annotations and
@WeldEnabled bean level annotations and only deploy beans that have those as intermediate
beans giving WeldKCC. With the current setup this is not possible since it the bean class
has not yet bean loaded at this stage.
Move MC/Weld deployer into AS
-----------------------------
Key: JBAS-8106
URL:
https://jira.jboss.org/browse/JBAS-8106
Project: JBoss Application Server
Issue Type: Feature Request
Security Level: Public(Everyone can see)
Components: Deployers
Reporter: Kabir Khan
Assignee: Kabir Khan
Fix For: 6.0.0.M4
Since the rest of weld-int (JBAS-7938) now lives in AS, this lives here too now.
Until this feature is final, all jars are in weld.deployer, but it is disabled. To
enable, uncomment this part of weld-deployers-jboss-beans.xml
<!-- UNCOMMENT THIS TO ENABLE WELD/MC INJECTION - This feature is currently very
experimental and so not enabled by default -->
<!-- Adds plugin to BeanMetaDataDeployer that installs WeldKernelControllerContexts
-->
<!-- bean name="WeldBeanMetaDataDeployerPlugin"
class="org.jboss.weld.integration.deployer.mc.WeldBeanMetaDataDeployerPlugin"/
-->
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira