[jboss-dev-forums] [Design of Clustering on JBoss (Clusters/JBoss)] - Re: Scoping of FIELD granularity session pojos

galder.zamarreno@jboss.com do-not-reply at jboss.com
Mon Apr 28 13:12:16 EDT 2008


Brian,

"bstansberry at jboss.com" wrote : 1) Store pojos under the session that first passes them to setAttribute.

Looks fine as long as you do it starting with JBoss 5. It's a major release, so you could get away with breaking as long as it's noted somewhere clearly and we've got easy access to it.

"bstansberry at jboss.com" wrote : 2) Make it configurable via a pojo-scope element in jboss-web.xml, valus are APPLICATION or SESSION, default is session.

I don't think we should try to leave something in that we don't wanna be supporting for JBoss 5. I like this solution for a potential future 4.x release.

"bstansberry at jboss.com" wrote : Logically, if you want to share objects between sessions, the place to put them is in the ServletContext. There's a JIRA to make that clustered. A clustered ServletContext cache wouldn't use buddy replication.

Interesting. Bearing in mind that my web development knowledge is a bit vague (side note: just to give you an idea: I was banging my head the other day because I was trying to access a servlet I deployed but kept getting a 404. I had forgotten the servlet mapping, doh!), seems like sharing objects between sessions via HTTPSession is a bad idea anyway, so this is an extra motivation to go for 1. IOW, if someone says it breaks, we can say it's a bad practice anyway.

So, my opinion would be to go with 1 and implement sharing of pojos properly via the servlet context.

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

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



More information about the jboss-dev-forums mailing list