tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <h...@visi.com>
Subject Re: OT: howto avoid overuse of session object?
Date Thu, 01 Aug 2002 17:14:15 GMT
Hello jeff,

The Barracuda project contains classes that allow for exactly this
ability: to allow an object to be passed from one request to the next
without the use of the session.

Check it out at:  http://barracuda.enhydra.org/

The classes that you should specifically concern yourself with are
ObjectRepository.java and ObjectRepositoryAssembler.java in the
org.enhydra.barracuda.core.util.data package.

Note that you are not required to use Barracuda in order to use this.
the core.util.* package of Barracuda is built into a separate .jar
file called "plankton.jar" which can be used as general utility
classes for any project.  There are also some other mechanisms that
allow you to do stuff like this, but depend on using Barracuda's event
model (which can also be used separately from the component and view
models).

The best documentation for ObjectRepository is in the javadoc and
here:
http://barracuda.enhydra.org/cvs_source/Barracuda/docs/SimpleLoginApp/simple_login_app.html#Passing_State


Also, look at the following messages in the Barracuda list archive:

Primary emails to read explaining the ObjectRepository:
http://barracuda.enhydra.org/project/mailingLists/barracuda/msg03113.html
http://barracuda.enhydra.org/project/mailingLists/barracuda/msg03250.html


all emails discussing the ObjectRepository:
http://barracuda.enhydra.org/project/mailingLists/barracuda/list.search?q=objectrepository&Search=+Search%21+&t=barracuda&ul=%2Fproject%2FmailingLists


Note that the server hosting barracuda.enhydra.org has been a bit
flaky this morning.  If you get a "Server Error", just try again a bit
later.

Jake

Thursday, August 01, 2002, 11:13:30 AM, you wrote:

jgac> This is sort of off-topic, but I don't know of a better forum targeting Java
jgac> web/servlet programming.  If anyone does know of one, could you let me know?

jgac> I'm basically wondering if others have found effective ways to avoid the
jgac> tempting but bad practice of loading up the session with all sorts of
jgac> attributes.  I often find myself needing some Bean or other object for maybe 2
jgac> or 3 requests, and, rack my brains as I may for an elegant way of passing the
jgac> object along without putting it in the session, I usually end up with nothing
jgac> more than a headache and 1 more attribute in my session.  :(  I'm developing
jgac> with an MVC approach, with Struts for more recently developed apps and a
jgac> similar custom framework for our older apps, but I just can't seem to see a
jgac> way to get around this problem.  I would love it if there were an object like
jgac> a thisRequestAndTheNextOne object, where attributes would stick around for the
jgac> current request and subsequent request, and then the controller could get
jgac> objects from the previous request and determine if it should put them in the
jgac> new thisRequestAndTheNextOne object for the current request.  I don't know if
jgac> that makes sense to anyone else, but, nevertheless, does anyone have any ideas
jgac> to do what I'm trying to do?

jgac> Does anyone else feel my pain?  ;)

jgac> Thanks,
jgac> -Jeff


jgac> --
jgac> To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
jgac> For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>



-- 
Best regards,
 Jacob                            mailto:hoju@visi.com


--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message