[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2910) Timing problem during login
by Peter Johnson (JIRA)
Timing problem during login
---------------------------
Key: JBSEAM-2910
URL: http://jira.jboss.com/jira/browse/JBSEAM-2910
Project: Seam
Issue Type: Bug
Components: Core
Affects Versions: 2.0.1.GA, 2.0.0.GA
Reporter: Peter Johnson
There is a timing hole during the first login attempt within an application if two or more users attempt to login at the same time.
I am scripting the SeamBay app that comes with Seam. My JMeter script signs in a random user, and then registers an item to sell, and then logs back out. Earlier (before adding the extra logging), the problem occurred during registering an item to sell phase of the script. With the extra logging, a problem showed up during used signin. Being a firm believer in tackling the initial problem first, I decided to added yet more logging to track that down.
At one point I added too much logging, and suddenly signin was working again. This lead me to suspect a timing issue. So I backed off on some of the logging and finally narrowed the problem down. It is a timing issue.
Assume that two users attempt to sign in at exactly the same time, and this is the first time any user has logged in. Each user's request is handled by a separate jbossas thread. What follows is an excerpt of the code that is processed (I abbreviate org.jboss.seam as simply seam, and all line numbers are from the Seam 2.0.1.GA source):
# seam.security.Configuration.instance() is called to get the security config instance (line 73)
# seam.Component.getInstance("org.jboss.seam.security.configuration") calls next getInstance (line 1834)
# seam.Component.getInstance(...), in line 1839 the call to Contexts.lookupInStatefulContexts(name) returns null because the security config instance has not yet been created, then line 1840 calls the next getInstance(...)
# seam.Component.getInstance(...), in line 1861, create is true and result is null, so getInstanceFromFactory() is called at line 1863
# seam.Component.getInstanceFromFactory(..), eventually gets to line 1927, where handleFactoryMethodResult() is called
Now, the first thread to handleFactoryMethodResult(), when it gets to line 1939, the call to Contexts.lookupInStatefulContexts() returns null because the security config instance is not yet created. Which is fine because the 'create' flag is set to true so the security config gets created (back in getInstance, at line 1873)and placed into the APPLICATION context.
Then the second thread gets to handleFactoryMethodResult() line 1939, but its call to Contexts.lookupInStatefulContexts() returns the object created by the first thread. This cause the code to branch to the else statement as line 1949, and because the scope is not UNSPECIFIED, the expetion that I was seeing gets thrown.
The problem is that after the Contexts.lookupInStatefulContexts(name) at line 1839, the APPLICATION context (at least) should be locked until that getInstance method exists, or the code in handleFactoryMethod needs to be a little more understandung if unexpected objects suddenly show up. I image that the former is the correct mechanism.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 11 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2908) Component.callCreateMethod exception handling
by Sergey Petrakovsky (JIRA)
Component.callCreateMethod exception handling
---------------------------------------------
Key: JBSEAM-2908
URL: http://jira.jboss.com/jira/browse/JBSEAM-2908
Project: Seam
Issue Type: Bug
Affects Versions: 2.0.1.GA
Reporter: Sergey Petrakovsky
If any exception occurs in component's create method, it still will be created in context, but will not be initialized correctly. Using of this component results many troubles. Component will be recreated only in another scope (if it's session scoped - in another session!).
Component should be removed from conext if any exception was thrown.
Component.java:
......2050..
Object instance;
try{
instance = instantiate();
if (getScope()!=STATELESS) {
//put it in the context _before_ calling postconstuct or create
getScope().getContext().set(name, instance);
}
postConstruct(instance);
if (getScope()!=STATELESS) {
callCreateMethod(instance);
if (Events.exists()) {
Events.instance().raiseEvent("org.jboss.seam.postCreate." + name, instance);
}
}
} catch (Exception e) {
//getScope().getContext().remove(name);
throw new InstantiationException("Could not instantiate Seam component: " + name, e);
}
....
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 11 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2906) Configuring a drools:rule-agent with files property throws NullPointerException
by Martin Putz (JIRA)
Configuring a drools:rule-agent with files property throws NullPointerException
-------------------------------------------------------------------------------
Key: JBSEAM-2906
URL: http://jira.jboss.com/jira/browse/JBSEAM-2906
Project: Seam
Issue Type: Bug
Components: Drools
Affects Versions: 2.1.0.A1, 2.0.2.CR1, 2.0.1.GA
Reporter: Martin Putz
Attachments: RuleAgent.patch
Setting up a rule-agent in components.xml to use a binary package located on the disk:
<drools:rule-agent name="userRules"
files="/home/mputz/jboss/work/jboss-eap-4.3/jboss-as/server/drools/data/cache/org.seedco.crm.eb.rules.drl.pkg"
poll="30" />
leads to a NullPointerException:
Caused by: java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:396)
at java.util.Properties.setProperty(Properties.java:128)
at org.jboss.seam.drools.RuleAgent.setLocalProperties(RuleAgent.java:65)
at org.jboss.seam.drools.RuleAgent.createAgent(RuleAgent.java:41)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 11 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2808) Reference guide HTML issues on IE 7
by Jay Balunas (JIRA)
Reference guide HTML issues on IE 7
-----------------------------------
Key: JBSEAM-2808
URL: http://jira.jboss.com/jira/browse/JBSEAM-2808
Project: JBoss Seam
Issue Type: Bug
Components: Documentation Issues
Affects Versions: 2.0.2.CR1
Environment: Windows IE 7
Reporter: Jay Balunas
Fix For: 2.0.2.GA
When viewing the reference documentation in IE 7 there are several issues. Firefox on windows and linux was fine.
1) Page header spacing - black line in middle, and if resized text can be hidden.
2) Chapter numbers past 1 are showing invalid characters instead of some of numbers - Â
3) Invalid characters where:
- "—" is used - â€"
- <xref ...> are used - Section 33.1.3, “How to Start/Stop/Access your domainâ€
- various others - will need to search for strings to find each.
4) Tables in chapter 16, 28 (could be more) have no internal borders.
4) If you resize the window the "prev" "next" button panel shifts to off center. (minor)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 11 months
[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-2862) Problem when using s:convertEntity
by Krunoslav Samardzic (JIRA)
Problem when using s:convertEntity
----------------------------------
Key: JBSEAM-2862
URL: http://jira.jboss.com/jira/browse/JBSEAM-2862
Project: JBoss Seam
Issue Type: Bug
Affects Versions: 2.0.2.CR1
Environment: Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_12-b04)
BEA JRockit(R) (build R27.4.0-90-89592-1.5.0_12-20070928-1715-linux-ia32, compiled mode)
Reporter: Krunoslav Samardzic
Problem happens when using s:convertEntity
stackTrace:
12:13:59,789 [http-127.0.0.1-8080-1] WARN javax.enterprise.resource.webcontainer.jsf.lifecycle :103 - executePhase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@6f86710) threw exception
java.lang.NullPointerException
at org.jboss.seam.ui.converter.entityConverter.EntityLoader.getPersistenceContext(EntityLoader.java:30)
at org.jboss.seam.ui.converter.entityConverter.EntityLoader.getPersistenceContext(EntityLoader.java:24)
at org.jboss.seam.ui.converter.entityConverter.AbstractEntityLoader.put(AbstractEntityLoader.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
at org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:31)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at org.jboss.seam.bpm.BusinessProcessInterceptor.aroundInvoke(BusinessProcessInterceptor.java:49)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at org.jboss.seam.transaction.TransactionInterceptor$1.work(TransactionInterceptor.java:38)
at org.jboss.seam.util.Work.workInTransaction(Work.java:41)
at org.jboss.seam.transaction.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:32)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:166)
at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:102)
at org.jboss.seam.ui.converter.entityConverter.EntityLoader_$$_javassist_15.put(EntityLoader_$$_javassist_15.java)
at org.jboss.seam.ui.converter.EntityConverter.getAsString(EntityConverter.java:77)
at org.jboss.seam.ui.converter.PrioritizableConverter.getAsString(PrioritizableConverter.java:67)
at org.jboss.seam.ui.converter.ConverterChain.getAsString(ConverterChain.java:123)
at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.getConvertedStringValue(RendererUtils.java:521)
at org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.getConvertedStringValue(RendererUtils.java:532)
at org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlRendererUtils.renderSelectOptions(HtmlRendererUtils.java:410)
12:13:59,790 [http-127.0.0.1-8080-1] TRACE org.jboss.seam.jsf.SeamPhaseListener :181 - after phase: RENDER_RESPONSE 6
12:13:59,791 [http-127.0.0.1-8080-1] DEBUG org.jboss.seam.jsf.SeamPhaseListener :607 - rolling back transaction after phase: RENDER_RESPONSE 6
12:13:59,792 [http-127.0.0.1-8080-1] DEBUG org.jboss.seam.core.Manager :333 - Storing conversation state: 7
JSP page:
<t:selectOneMenu id="selectOperater" value="#{traziLog.operater}">
<s:selectItems value="#{traziOperater.rezultati}" var="z"
noSelectionLabel="#{messages['zajednicke.nijeOdabrano']}"
label="#{z.ime} #{z.prezime}" />
<s:convertEntity />
</t:selectOneMenu>
This example works fine in seam 2.0.0 GA.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
17 years, 11 months