[JBoss JIRA] Created: (WELD-491) Warn if CDI annotations are placed on classes that are not managed beans
by Nicklas Karlsson (JIRA)
Warn if CDI annotations are placed on classes that are not managed beans
------------------------------------------------------------------------
Key: WELD-491
URL: https://jira.jboss.org/jira/browse/WELD-491
Project: Weld
Issue Type: Feature Request
Components: Bootstrap and Metamodel API
Affects Versions: 1.0.1.Final
Reporter: Nicklas Karlsson
Priority: Minor
Fix For: 1.0.2.CR1
Warn if CDI annotations are placed on beans that fail the check
return !Extension.class.isAssignableFrom(clazz.getJavaClass()) &&
!(clazz.isAnonymousClass() || (clazz.isMemberClass() && !clazz.isStatic())) &&
!Reflections.isParamerterizedTypeWithWildcard(javaClass) &&
!servletApiAbstraction.SERVLET_CLASS.isAssignableFrom(javaClass) &&
!servletApiAbstraction.FILTER_CLASS.isAssignableFrom(javaClass) &&
!servletApiAbstraction.SERVLET_CONTEXT_LISTENER_CLASS.isAssignableFrom(javaClass) &&
!servletApiAbstraction.HTTP_SESSION_LISTENER_CLASS.isAssignableFrom(javaClass) &&
!servletApiAbstraction.SERVLET_REQUEST_LISTENER_CLASS.isAssignableFrom(javaClass) &&
!ejbApiAbstraction.ENTERPRISE_BEAN_CLASS.isAssignableFrom(javaClass) &&
!jsfApiAbstraction.UICOMPONENT_CLASS.isAssignableFrom(javaClass) &&
(hasSimpleWebBeanConstructor(clazz) || InstantiatorFactory.useInstantiators());
in AbstractBeanDeployer
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 10 months
[JBoss JIRA] Created: (WELD-781) Provide a mechanism in ResourceLoader for the SPI implementation to use a module classloader for classloading in multiple-module applications
by Sivakumar Thyagarajan (JIRA)
Provide a mechanism in ResourceLoader for the SPI implementation to use a module classloader for classloading in multiple-module applications
---------------------------------------------------------------------------------------------------------------------------------------------
Key: WELD-781
URL: https://jira.jboss.org/browse/WELD-781
Project: Weld
Issue Type: Feature Request
Components: Weld SPI
Affects Versions: 1.1.0.Beta2
Reporter: Sivakumar Thyagarajan
Priority: Minor
Provide a mechanism in ResourceLoader for the SPI implementation to use a module classloader for classloading in multiple-module applications.
In the current SPI loadClass(String name) is called and the container such as GlassFish, has no choice but to use the TCL or a generic classloader for the application.
For applications that have multiple modules(such as an EAR), the container needs a mechanism to identify which module the Class/resource being loaded belongs to, so that it can use the appropriate module classloader.
So, for instance, it would be nice if the SPI could be modified to have a
public Class<?> classForName(String name, BeanDeploymentArchive originatingBDA); instead of classForName(name)
and equivalents for the other methods in ResourceLoader.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 10 months