[JBoss JIRA] Created: (WELD-240) Incorrect detection of Tomcat
by Daniel Munzinger (JIRA)
Incorrect detection of Tomcat
-----------------------------
Key: WELD-240
URL: https://jira.jboss.org/jira/browse/WELD-240
Project: Weld
Issue Type: Bug
Components: Web Tier integration (JSF, JSP, EL and Servlet)
Affects Versions: 1.0.0.CR1
Environment: Windows, Tomcat 7.0.0 from trunk, Weld Servlet 1.0.0.CR1
Reporter: Daniel Munzinger
Priority: Minor
I've been playing around with the Tomcat 7 development stream from SVN trunk when I came across this litte message:
"JSR-299 injection will not be available in Servlets, Filters etc. This facility is only available in Tomcat"
I managed to locate the source of this message at org.jboss.weld.environment.servlet.Listener:114 when calling
Reflections.classForName("org.apache.AnnotationProcessor");
This class is not present in the current code base which makes "tomcat = false" and Weld thinks that there is no tomcat.
--
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
14 years
[JBoss JIRA] Created: (WELD-381) Proxied EJBs as Injection point, wrong interface chosen
by John Ament (JIRA)
Proxied EJBs as Injection point, wrong interface chosen
-------------------------------------------------------
Key: WELD-381
URL: https://jira.jboss.org/jira/browse/WELD-381
Project: Weld
Issue Type: Bug
Components: Resolution (Typesafe and by Name)
Affects Versions: 1.0.0.GA
Environment: GF v3, JDK 1.6, Windows
Reporter: John Ament
Based on the forum post, The following EJB cannot be injected into clients:
@DAO
@Local(ResultDAOBean.class)
@Stateless
public ResultDAO extends AbstractDAO<Result> implements ResultDAOBean
Happens the same with/without @Local
The problem comes in when AbstractDAO implements something (e.g. AbstractDAOBean<E>) or ResultDAOBean extends an interfacet (e.g.AbstractDAOBean<E>). The interface AbstractDAOBean isn't marked as an EJB itnerface, and only one of these two would implement/extend it (ideally, ResultDAOBean).
The injection point results in the following exception:
Caused by: java.lang.IllegalStateException: Unable to convert ejbRef for ejb ResultDAO to a business object of type interface AbstractDAOBean
at com.sun.ejb.containers.EjbContainerServicesImpl.getBusinessObject(EjbContainerServicesImpl.java:104)
at org.glassfish.weld.ejb.SessionObjectReferenceImpl.getBusinessObject(SessionObjectReferenceImpl.java:60)
at org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:121)
at jpa.dao.EvaluationDAOBean_$$_javassist_110.getEM(EvaluationDAOBean_$$_javassist_110.java)
at NewSessionBean.init(NewSessionBean.java:30)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.ejb.containers.interceptors.BeanCallbackInterceptor.intercept(InterceptorManager.java:1006)
at com.sun.ejb.containers.interceptors.CallbackChainImpl.invokeNext(CallbackChainImpl.java:61)
at com.sun.ejb.containers.interceptors.CallbackInvocationContext.proceed(CallbackInvocationContext.java:109)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doCallback(SystemInterceptorProxy.java:133)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.init(SystemInterceptorProxy.java:115)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.ejb.containers.interceptors.CallbackInterceptor.intercept(InterceptorManager.java:961)
at com.sun.ejb.containers.interceptors.CallbackChainImpl.invokeNext(CallbackChainImpl.java:61)
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:390)
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:373)
at com.sun.ejb.containers.AbstractSingletonContainer.createSingletonEJB(AbstractSingletonContainer.java:518)
... 38 more
--
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
14 years, 1 month
[JBoss JIRA] Created: (WELD-454) Observer resolution (event qualifier handling) not in-line with spec
by Matthieu Chase Heimer (JIRA)
Observer resolution (event qualifier handling) not in-line with spec
--------------------------------------------------------------------
Key: WELD-454
URL: https://jira.jboss.org/jira/browse/WELD-454
Project: Weld
Issue Type: Bug
Components: Documentation, Events
Affects Versions: 1.0.0.GA
Environment: Windows XP SP3, JDK 1.6 u17, GlassFish v3
Reporter: Matthieu Chase Heimer
Page 71 of the spec states: An event is delivered to an observer method if the observer method has *ALL* the event qualifiers. (emphasis mine). The behavior of Weld is if *any* matching (including none) qualifiers are present on the method then the method will receive the event.
//event injection point
@Inject @Q1 @Q2 Event<Color> colorEvent;
//fire event
colorEvent.fire(Color.BLUE);
//All events have both a Q1 and Q2 qualifier
//only the last method should be called but all four methods are called
public class ColorChangeConsumer {
public void onAnyColorChange(@Observes Color color) {}
public void onQ1ColorChange(@Observes @Q1 Color color) {}
public void onQ2ColorChange(@Observes @Q2 Color color) {}
public void onQ1QQ2ColorChange(@Observes @Q1 @Q2 Color color) {}
}
This behavior is also seen when using Event.select as seen in the docs: http://docs.jboss.org/weld/reference/1.0.1-Final/en-US/html_single/#d0e4194
--
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
14 years, 2 months