[JBoss JIRA] Created: (CDITCK-140) TCK uses cyclic @PostConstruct calls which is forbidden by JSR-250
by Mark Struberg (JIRA)
TCK uses cyclic @PostConstruct calls which is forbidden by JSR-250
------------------------------------------------------------------
Key: CDITCK-140
URL: https://jira.jboss.org/jira/browse/CDITCK-140
Project: CDI TCK
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Tests
Reporter: Mark Struberg
from JSR-250-1.1.MREL section 2.5:
"The PostConstruct annotation is used on a method that needs to be executed after
dependency injection is done to perform any initialization. This method MUST be
invoked before the class is put into service."
Which I read as "may only get used by others after the @PostConstruct annotated method did run".
This is backed by the following example
public BeanA {
private @Inject BeanB b;
private int x = 0;
public int getX() { return x; }
@PostConstruct void init() { x = b.getX()+7; }
}
public BeanB {
private @Inject BeanA a;
private int x = 0;
public int getX() { return x; }
@PostConstruct void init() { x = a.getX()+9; }
}
which value do a.x and b.x get finally? This would simply be non-deterministic - and therefore forbidden by the JSR-250 spec.
Such kind of circular @PostConstruct method calls happen e.g. in CircularDependencyTest Pig -> Food -> Pig
--
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, 4 months
[JBoss JIRA] Created: (CDITCK-134) Injection point not on a passivation capable bean
by Pete Muir (JIRA)
Injection point not on a passivation capable bean
-------------------------------------------------
Key: CDITCK-134
URL: https://jira.jboss.org/jira/browse/CDITCK-134
Project: CDI TCK
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Tests
Reporter: Gurkan Erdogdu
Fix For: 1.0.2.CR1
org.jboss.jsr299.tck.tests.context.passivating.broken.decoratorWithNonPassivatingBeanConstructor
org.jboss.jsr299.tck.tests.context.passivating.broken.decoratorWithNonPassivatingInitializerMethod
org.jboss.jsr299.tck.tests.context.passivating.broken.decoratorWithNonPassivatingInjectedField
These packages tests decorator injection points to check if they are passivation capable dependency or not, however the injection point is not on a passivation capable bean
--
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, 4 months
[JBoss JIRA] Created: (WELD-578) Weld Extension vs. Tomcat deployer in JBoss 6
by Heiko Braun (JIRA)
Weld Extension vs. Tomcat deployer in JBoss 6
---------------------------------------------
Key: WELD-578
URL: https://jira.jboss.org/browse/WELD-578
Project: Weld
Issue Type: Bug
Affects Versions: 1.0.1.Final
Reporter: Heiko Braun
When I deploy a web application that contains CDI beans to JBoss6-M4 I can see that bean deployment being executed two times. First the CDI deployer kicks in, then Tomcat deployer re-deploys the war archive, which causes a second execution of the extension:
12:20:34,082 INFO [org.jboss.weld.Version] WELD-000900 1.0.1 (SP4)
12:20:34,516 INFO [org.jboss.errai.cdi.server.CDIExtensionPoints] Discovered Errai Service: class com.foo.server.HelloWorldService
12:20:34,564 INFO [org.jboss.errai.cdi.server.CDIExtensionPoints] Register CDI component as MessageCallback: @Service @ApplicationScoped com.foo.server.HelloWorldService
12:20:34,583 INFO [org.jboss.web.tomcat.service.deployers.TomcatDeployment] deploy, ctxPath=/funky-app
12:20:34,720 INFO [org.jboss.resteasy.cdi.CdiInjectorFactory] Found BeanManager at java:comp/BeanManager
12:20:39,776 INFO [org.jboss.web.tomcat.service.deployers.TomcatDeployment] undeploy, ctxPath=/funky-app
12:20:40,246 INFO [org.jboss.weld.Version] WELD-000900 1.0.1 (SP4)
12:20:40,733 INFO [org.jboss.errai.cdi.server.CDIExtensionPoints] Discovered Errai Service: class com.foo.server.HelloWorldService
12:20:40,844 INFO [org.jboss.errai.cdi.server.CDIExtensionPoints] Register CDI component as MessageCallback: @Service @ApplicationScoped com.foo.server.HelloWorldService
12:20:40,856 INFO [org.jboss.web.tomcat.service.deployers.TomcatDeployment] deploy, ctxPath=/funky-app
12:20:40,929 INFO [org.jboss.resteasy.cdi.CdiInjectorFactory] Found BeanManager at java:comp/BeanManager
Shouldn't it be the execution the extension tight to the tomcat deployer lifecycle? I.e. be dependent on it's meta data?
--
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, 4 months