[JBoss JIRA] Created: (CDI-6) Clarify InjectionTarget method parameters
by Jozef Hartinger (JIRA)
Clarify InjectionTarget method parameters
-----------------------------------------
Key: CDI-6
URL: https://jira.jboss.org/browse/CDI-6
Project: CDI Specification Issues
Issue Type: Task
Components: Specification
Affects Versions: 1.0
Reporter: Jozef Hartinger
For the inject() method, the spec says: "inject() performs dependency injection upon the given object". It is not clear to me what does the "given object" refer two. if the CDI implementation uses proxies to implement interceptors and decorators, I can see two candidates for "the given object":
- the product of the produce() method including interceptors and decorators -> a proxy
- the target instance -> the object created by calling a constructor (no interception/decoration)
Arguments for the first option
- Let's have and extension that adds additional dependency injection capabilities by providing a custom InjectionTarget implementation and wrapping default InjectionTarget instances with custom ones. The custom InjectionTarget implementation does the additional DI in the inject() method and delegates to the default InjectionTarget instance to finish the injection. This implementation needs a direct access to the target instance (it cannot access field values through a proxy)
- Interceptor-like behavior - similarity to interceptors, where the InvocationContext.getTarget() returns the (non-intercepted) target instance
Arguments for the second option
- the contract of the produce() method says: "produce() calls the constructor annotated @Inject if it exists, or the constructor with no parameters otherwise, as defined in Section 5.5.1, "Injection using the bean constructor", and returns the resulting instance. If the class has inter- ceptors, produce() is responsible for building the interceptors and decorators of the instance." which means it returns an intercepted/decorated instance.
--
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
13 years, 11 months
[JBoss JIRA] Created: (CDI-3) Add add an event that fires after all ProcessAnnotatedType events that allows you to add new AnnotatedTypes
by Stuart Douglas (JIRA)
Add add an event that fires after all ProcessAnnotatedType events that allows you to add new AnnotatedTypes
------------------------------------------------------------------------------------------------------------
Key: CDI-3
URL: https://jira.jboss.org/browse/CDI-3
Project: CDI Specification Issues
Issue Type: Feature Request
Affects Versions: 1.0
Reporter: Stuart Douglas
At the moment AnnotatedTypes can only be added in the BeforeBeanDiscovery phase. This means that if you want to install additional beans based on the beans processed in the ProcessAnnotatedType phase you must instead add implementations of the Bean interface in the AfterBeanDiscovery phase. This interface is more limited than annotated type, and does not let you exactly mimic the behaviour of beans added as AnnotatedTypes.
Some of the things that the bean interface will not let you mimic are:
- Interceptors
- Disposal methods
- Producer fields for normal scoped beans
--
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
13 years, 11 months
[JBoss JIRA] Created: (CDI-2) Interceptor bindings defined at method level should override those at the class level
by Pete Muir (JIRA)
Interceptor bindings defined at method level should override those at the class level
-------------------------------------------------------------------------------------
Key: CDI-2
URL: https://jira.jboss.org/browse/CDI-2
Project: CDI Specification Issues
Issue Type: Bug
Components: Specification
Reporter: Pete Muir
We certainly *intended* for method-level interceptor bindings to override bindings declared at the class level, but whether we actually wrote that down is another story. It certainly doesn't look like that behavior is properly defined in the latest version of the spec.
In section 9.5.2 of the spec:
If the set of interceptor bindings of a bean or interceptor, including bindings inherited from stereotypes and other interceptor bindings, has two instances of a certain interceptor binding type and the instances have different values of some annotation member, the container automatically detects the problem and treats it as a definition error.
--
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
13 years, 11 months
[JBoss JIRA] Created: (CDITCK-168) extensions.processBean.ProcessBean event count issue
by Scott Ferguson (JIRA)
extensions.processBean.ProcessBean event count issue
----------------------------------------------------
Key: CDITCK-168
URL: https://jira.jboss.org/browse/CDITCK-168
Project: CDI TCK
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Tests
Affects Versions: 1.0.2.CR1
Environment: any
Reporter: Scott Ferguson
The issue is in an assertion in extensions.processBean.ProcessBeanTest, counting the number of times the Cowshed bean raises a discovery event. There are three tests affected by this issue:
extensions.processBean.ProcessBeanTest
testProcessProducerFieldEvent()
testProcessProducerMethodEvent()
extensions.processBean.ProcessSessionBeanTest
testProcessSessionBeanEvent()
specifically
testProcessProducerMethodEvent()
79: assert ProcessBeanObserver.getCowShedProcessBeanCount() == 2;
testProcessProducerFieldEvent()
102: assert ProcessBeanObserver.getChickenHutchProcessBeanCount() == 2;
testProcessSessionBeanEvent()
63: assert ProcessBeanObserver.getElephantProcessBeanCount() == 2;
But I can't see how this number is 2 instead of 1. The Cowshed looks like:
public class Cowshed {
@Produces public Cow getDaisy() { ... }
}
So there should be 3 relevant extension events fired:
ProcessBean<Cowshed>
ProcessProducerMethod<Cowshed, Cow>
ProcessBean<Cow>
I double checked the ProcessProducerMethod interface:
ProcessProducerMethod<T,X> extends ProcessBean<X>
which is where the ProcessBean<Cow> comes from, but I don't see where
the 2nd ProcessBean<Cowshed> comes from.
The ProcessSessionBean issue is essentially the same
--
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
13 years, 12 months
[JBoss JIRA] Created: (WELD-648) CLONE -jsf/permalink example fails with "identifier 'blog' resolved to null"
by sreekanth manga (JIRA)
CLONE -jsf/permalink example fails with "identifier 'blog' resolved to null"
----------------------------------------------------------------------------
Key: WELD-648
URL: https://jira.jboss.org/browse/WELD-648
Project: Weld
Issue Type: Bug
Components: Examples
Affects Versions: 1.0.0.GA
Environment: JBoss_5_2_0_Beta1 date=200911091833
Sun JDK 1.6.0_16-b01
Linux 32bit
Reporter: sreekanth manga
Fix For: 1.0.0.GA
jsf/permalink example deploys, but when accessing the application it fails with following exception:
13:56:27,628 ERROR [[Faces Servlet]] Servlet.service() for servlet Faces Servlet threw exception
javax.el.PropertyNotFoundException: /home.xhtml @30,78 listener="#{blog.loadLatestEntries}": Target Unreachable, identifier 'blog' resolved to null
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:100)
at com.sun.faces.facelets.tag.jsf.core.DeclarativeSystemEventListener.processEvent(EventHandler.java:112)
at javax.faces.component.UIComponent$ComponentSystemEventListenerAdapter.processEvent(UIComponent.java:2342)
at javax.faces.event.SystemEvent.processListener(SystemEvent.java:102)
at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:1993)
at com.sun.faces.application.ApplicationImpl.invokeComponentListenersFor(ApplicationImpl.java:1941)
at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:285)
at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:243)
at org.jboss.weld.integration.webtier.jsf.ForwardingApplication.publishEvent(ForwardingApplication.java:336)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:114)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:311)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:68)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
--
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
14 years
[JBoss JIRA] Created: (WELDX-80) Exception thrown by GAE local ode
by Pete Muir (JIRA)
Exception thrown by GAE local ode
---------------------------------
Key: WELDX-80
URL: https://jira.jboss.org/jira/browse/WELDX-80
Project: Weld Extensions
Issue Type: Bug
Components: Servlet Containers
Reporter: Pete Muir
Feb 21, 2010 11:06:12 PM com.google.appengine.tools.development.JettyContainerService$ScannerListener fileChanged
INFO: /Users/pmuir/workspace/weld-build/dist/weld-1.0.1-Final/examples/jsf/numberguess/src/main/webapp/WEB-INF/appengine-web.xml updated, reloading the webapp!
Feb 21, 2010 11:06:12 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed /Users/pmuir/workspace/weld-build/dist/weld-1.0.1-Final/examples/jsf/numberguess/src/main/webapp/WEB-INF/appengine-web.xml
Feb 21, 2010 11:06:12 PM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed /Users/pmuir/workspace/weld-build/dist/weld-1.0.1-Final/examples/jsf/numberguess/src/main/webapp/WEB-INF/web.xml
Bad level value for property: .level
Feb 21, 2010 11:06:13 PM org.jboss.weld.bootstrap.WeldBootstrap <clinit>
INFO: WELD-000900 1.0.1 (Final)
Feb 21, 2010 11:06:13 PM org.jboss.weld.bootstrap.WeldBootstrap startContainer
INFO: WELD-000101 Transactional services not available. Injection of @Inject UserTransaction not available. Transactional observers will be invoked synchronously.
Feb 21, 2010 11:06:13 PM org.jboss.weld.environment.servlet.Listener contextInitialized
INFO: JSR-299 injection will not be available in Servlets, Filters etc. This facility is only available in Tomcat
Feb 21, 2010 11:06:13 PM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: failed com.google.apphosting.utils.jetty.DevAppEngineWebAppContext(a)36101d01{/,/Users/pmuir/workspace/weld-build/dist/weld-1.0.1-Final/examples/jsf/numberguess/src/main/webapp}
java.lang.AbstractMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;
at org.jboss.weld.environment.servlet.Listener.contextInitialized(Listener.java:157)
at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:530)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:135)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at com.google.appengine.tools.development.JettyContainerService.reloadWebApp(JettyContainerService.java:305)
at com.google.appengine.tools.development.JettyContainerService$ScannerListener.fileChanged(JettyContainerService.java:250)
at org.mortbay.util.Scanner.reportChange(Scanner.java:434)
at org.mortbay.util.Scanner.reportDifferences(Scanner.java:305)
at org.mortbay.util.Scanner.scan(Scanner.java:254)
at org.mortbay.util.Scanner$1.run(Scanner.java:225)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Feb 21, 2010 11:06:13 PM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: failed JettyContainerService$ApiProxyHandler@56dc64a2
java.lang.AbstractMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;
at org.jboss.weld.environment.servlet.Listener.contextInitialized(Listener.java:157)
at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:530)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:135)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at com.google.appengine.tools.development.JettyContainerService.reloadWebApp(JettyContainerService.java:305)
at com.google.appengine.tools.development.JettyContainerService$ScannerListener.fileChanged(JettyContainerService.java:250)
at org.mortbay.util.Scanner.reportChange(Scanner.java:434)
at org.mortbay.util.Scanner.reportDifferences(Scanner.java:305)
at org.mortbay.util.Scanner.scan(Scanner.java:254)
at org.mortbay.util.Scanner$1.run(Scanner.java:225)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Feb 21, 2010 11:06:13 PM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: EXCEPTION
java.lang.AbstractMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;
at org.jboss.weld.environment.servlet.Listener.contextInitialized(Listener.java:157)
at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:530)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:135)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
at com.google.appengine.tools.development.JettyContainerService.reloadWebApp(JettyContainerService.java:305)
at com.google.appengine.tools.development.JettyContainerService$ScannerListener.fileChanged(JettyContainerService.java:250)
at org.mortbay.util.Scanner.reportChange(Scanner.java:434)
at org.mortbay.util.Scanner.reportDifferences(Scanner.java:305)
at org.mortbay.util.Scanner.scan(Scanner.java:254)
at org.mortbay.util.Scanner$1.run(Scanner.java:225)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
--
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