[
https://jira.jboss.org/browse/JBSEAM-3999?page=com.atlassian.jira.plugin....
]
Mike Pettypiece commented on JBSEAM-3999:
-----------------------------------------
Same issue when two users log in at the exact same time before any other logins have
occurred - Configuration.instance() is called from Identity.getLoginContext() twice.
java.lang.IllegalArgumentException: factory method with defined scope outjected a value:
org.jboss.seam.security.configuration
at org.jboss.seam.Component.handleFactoryMethodResult(Component.java:2108)
at org.jboss.seam.Component.getInstanceFromFactory(Component.java:2081)
at org.jboss.seam.Component.getInstance(Component.java:2011)
at org.jboss.seam.Component.getInstance(Component.java:1983)
at org.jboss.seam.Component.getInstance(Component.java:1977)
at org.jboss.seam.Component.getInstance(Component.java:1972)
at org.jboss.seam.security.Configuration.instance(Configuration.java:73)
at org.jboss.seam.security.Identity.getLoginContext(Identity.java:419)
at org.jboss.seam.security.Identity.authenticate(Identity.java:332)
Solution in this case is to call Configuration.instance() in a @Startup component.
Race condition in component initialization
------------------------------------------
Key: JBSEAM-3999
URL:
https://jira.jboss.org/browse/JBSEAM-3999
Project: Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.1.1.GA
Reporter: Stuart Douglas
When starting up application (or session) scoped component that do not have an @Startup
annotation it is possible to get a race condition where two instances of the component are
instantiated, as no locking is present in component initialization. I ran into this when
my multi-threaded reporting process was the first component to hit the cache and jboss
cache provider got instantiated twice:
`16:54:48,717 INFO [JbossCacheProvider] Starting JBoss Treecache 1.x
16:54:48,717 INFO [JbossCacheProvider] Starting JBoss Treecache 1.x`
In this case it is easy to work around, by simply adding startup="true" to the
application scoped component. It is also possible to make calls on a component before the
create method is called.
--
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