[JBoss JIRA] Created: (WELD-729) Servlet / listener / filter injection support for Jetty 7 and up
by Dan Allen (JIRA)
Servlet / listener / filter injection support for Jetty 7 and up
----------------------------------------------------------------
Key: WELD-729
URL: https://jira.jboss.org/browse/WELD-729
Project: Weld
Issue Type: Feature Request
Components: Servlet Container Support
Affects Versions: 1.1.0.Beta1
Reporter: Dan Allen
Fix For: 1.1.0.Beta2
Jetty changed it's packaging in version 7 when it moved to …
[View More]the Eclipse runtimes project. Therefore, the following required class check only works in earlier versions of Jetty.
private static final String JETTY_REQUIRED_CLASS_NAME = "org.mortbay.jetty.servlet.ServletHandler";
boolean jetty = true;
try
{
Reflections.classForName(JETTY_REQUIRED_CLASS_NAME);
}
catch (IllegalArgumentException e)
{
jetty = false;
}
A second check should be performed for the class org.eclipse.jetty.servlet.ServletHandler.
But then we have the issue that the WeldServletHandler extends a class only in Jetty 6. So we'll likely need a special classifier for weld-servlet that runs on jetty 7 and above.
--
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
[View Less]
14 years
[JBoss JIRA] Created: (WELD-783) @EJB injection fails in @Named bean when interceptor is present
by Alexander Hanschke (JIRA)
@EJB injection fails in @Named bean when interceptor is present
---------------------------------------------------------------
Key: WELD-783
URL: https://jira.jboss.org/browse/WELD-783
Project: Weld
Issue Type: Bug
Components: CDI API, Interceptors and Decorators
Affects Versions: 1.0.1.Final
Environment: Windows 7, NetBeans 6.9.1, GlassFish 3.0.1, Mojarra 2.0.2 (FCS b10), Java 1.6.0_22
Reporter: …
[View More]Alexander Hanschke
I have a @Named bean in which I'd like to inject a component, using @Inject as well as a stateless session bean, using @EJB. The ejb is accessed using the no-interface view. Both references get injected properly in that case, but when I use an interceptor on one of the methods, only the references annotated with @Inject get injected, whereas those annotated with @EJB don't.
The interceptor doesn't need to do anything special, this behaviour occurs even if only proceed() is invoked on the invocation context - the interceptor is always invoked correctly.
The following snippet explains the issue:
@Named
public class MyController {
@EJB
private SomeDao dao;
@Interceptors(MyInterceptor.class)
public void control() {
dao.doDataAccessStuff(); /* NPE */
}
}
---------------------------------------------------------------
@Stateless
public class MyDao {
public void doDataAccessStuff() { ... }
}
---------------------------------------------------------------
public class MyInterceptor {
@AroundInvoke
public Object intercept(InvocationContext context) throws Exception {
return context.proceed();
}
}
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[View Less]
14 years