Corruption of a variable in a session bean using JSF/Spring -


i have system i've developed has variable in session-scoped bean getting corrupted, believe crosstalk.

i using jsf/spring/glassfish/primefaces. spring framework 4.0.3, java ee 7.0.

when run through testing, logically works fine. in field dozen concurrent users, seeing gremlin popup in 1 case int variable constrained web page between 0-100, had on 15k.

i new java ee, i'm concerned i've created poor design or that. in software, user logs in using spring/jsf security , creates session bean (bean scoped in faces-config.xml session).

the user landing page causes creation of request bean in page flow allow user select basic parameters. these "stored" in session bean , user chooses option opens new page , causes request bean created support activity. user actions , creates more data stored original session bean. user more actions , creates new page , request bean. etc.

essentially, each new page, create request bean allows user activities , flows session bean. periodically @ states in user's activity creates transaction go database. i'm using @named in each bean.

i use:

facescontext context = facescontext.getcurrentinstance();         operatorsessionbean operatorsessionbean = (operatorsessionbean) context.getapplication().evaluateexpressionget(context, "#{operatorsessionbean}", operatorsessionbean.class); 

to access session bean each request bean.

right now, have primefaces spinner constrained 0-100 (along other data input). once of data has been collected, user submits , in servicing event, data "set" in session bean. use setters , getters accessing session data , have data elements private.

my main question missing major i.e. crappy design?

secondarily, suggestion on how find gremlin. suggestions appreciated!

to resolve this, did lot of reading , tried several techniques various tutorials. blog post http://www.beyondjava.net/blog/integrate-jsf-2-spring-3-nicely/ helpful several others. found many tutorials , posts appeared suggest these technologies work seamlessly, did not. read , experimented, these various technologies can live lot of (imo) complexity. therefore, moved using standard cdi bean scoping. i'm using @named , @requestscoped or @sessionscoped. key keep spring versus jsf/cdi separate. still use spring purely login security. found injection of spring beans jsf or cdi beans work, there fair amount of hassle serialization , such. me, added complexity not worth effort. approach ended with, using spring login security , cdi normal beans appears stable. issue have within browser on specific host, if user opens more 1 window, identity shared i.e. cannot reasonably have multiple user logins single computer using same family of browser. testing, bit of hassle, our real application ok. basic question resolved. thx comments.


Comments