Component annotated with @Startup is instantiated twice
-------------------------------------------------------
Key: JBSEAM-4603
URL:
https://jira.jboss.org/jira/browse/JBSEAM-4603
Project: Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.2.1.CR1
Reporter: Ryan Nideffer
Add this simple component to a Seam project:
@Startup
@Scope(APPLICATION)
@Name("startupTest")
public class SeamComponentStartupTest {
@Logger
private static Log logger;
private static AtomicInteger counter = new AtomicInteger(1);
public SeamComponentStartupTest() {
logger.debug("number of times instantiated: {0}",
counter.getAndIncrement());
}
}
on seam startup, this is the output:
2010-03-17 10:57:24,210 DEBUG [SeamComponentStartupTest] (HDScanner) number of times
instantiated: 1
2010-03-17 10:57:24,211 DEBUG [SeamComponentStartupTest] (HDScanner) number of times
instantiated: 2
--
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