Bernie,
I haven't had time to run the app, but I think that I know what is happening.
Imagine you are talking to a remote object (e.g. an EJB).
you create a HashTable - ht
you call bean.setHashTable(ht);
you call ht.put("test", "123");
you call bean.getHashTable();
would you expect the returned HashTable to contain "test" - NO, because when talking to a remote/distributed object your semantics shift from REFERENCE to VALUE. Thus with a local session you can put in an object and maintain a reference to that object, however with my (current) distributable impl, you can only COPY an object into it.
To update an object that is already in the session, you just put it in again. This tells Jetty to redistribute this attribute. Without this kick we have no idea when you may have changed an object and have no option other than to periodically redistribute the entire session - expensive.
As soon as I find the time, I shall adapt my current impl to be a hybrid of the two strategies outlined above.
Now to specifics.
All you need to do is ensure that if you mess with anything kept in the session in your JSPs, you then call setAttibute() again with them. This will copy the new value into the session and force immediate distribution.
I'm no JSP expert, but I believe that you can declare beans as being within session scope, then act upon them by name ?, In this case you will need to figure out where in the session Jasper is keeping the bean and call session.setAttribute(<bean-name?>, session.getAttribute(<bean-name>)); afterwards, or something similar.
Done this way your code will still work in non-distributable mode, since we have not extended the spec.
Hope this makes sense.
Try it out and come back to me with any problems - I am off air until monday.
Jules
Barlow, Dustin wrote:
Has anyone gotten <jsp:useBean> style session's to propagate across clusters
in 3.x (3.2.0beta2 in my case)?
For example:
<jsp:useBean id="userInfo" scope="session"
class="org.foo.session.UserInfo"/>
I have found that if I include the <distributable/> tag in my web.xml file,
that any session scoped classes no longer work between pages on the _same_
server instance. If I set a String member variable in the UserInfo object
on one jsp page and then try to reference it from a second jsp page, it is
always null. If I remove <distributable/> from web.xml, then the object's
member values do survive across multiple jsp calls. The UserInfo object is
also not being propagated to any of the cluster nodes either. (I am running
the "All" target with all default settings).
Dustin Barlow
-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing your web site with SSL, click here to get a FREE TRIAL of a Thawte Server Certificate: http://www.gothawte.com/rd524.html
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user
________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit http://www.messagelabs.com
________________________________________________________________________
-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing your web site with SSL, click here to get a FREE TRIAL of a Thawte Server Certificate: http://www.gothawte.com/rd524.html
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user
