[jboss-dev-forums] [Design of JBoss Portal] - Re: common.text package update

Antoine_h do-not-reply at jboss.com
Fri Mar 21 04:32:17 EDT 2008


Hello,

I looked at the FastURLDecoder and the way it is used in the JSF backing beans, such as :
org.jboss.portal.core.identity.ui.EditProfileAction

Main question : FastURLDecoder is not multi thread safe ?

then, in the EditProfileAction, it is used like that :
private final static FastURLDecoder decoder = FastURLDecoder.getUTF8Instance();

and getUTF8Instance returns the same static instance of FastURLDecoder.

then, in case two threads call the encode() method at the same time... there will be some mixing in the data, and bad result. no ?

I am not very used to these multi thread safe issues, but it seems to me that :
 - either the FastURLDecoder should be programmed to be threads safe 
 - either it should not be used as a static in a jsf backing bean

did I missed something ?


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4138244#4138244

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4138244



More information about the jboss-dev-forums mailing list