In some cases, database is the ONLY solution (worst and best).
Database is the only way to have persistent data and preserve
data integrity in case of a server crash.

For example, I've built a shopping cart linked with an
inventory management system. For example, if there are 7lb
of potato in the store and I put 5lb in my shopping cart,
there will be 2 remaining in the store, while 5
will be placed in a special place in the db.
a) In case session expires, my shopping cart will be emptied
b) In case the server crashes, servlets init will recover
potato from the limbo state

Without db, potato would be lost unless previously paid.
The shopping cart is kept in the session object which
serves as cash memory,

DD


----------
From:   Michael[SMTP:[EMAIL PROTECTED]]
Sent:   Sunday, February 13, 2000 04:38 AM
To:     [EMAIL PROTECTED]
Subject:        Re: Persisting Data throughout app - Session obj,Beans with session 
scope, ...?

> Session scope Beans?

A good solution, if you are sure to always run your software on a platform
(i.e., application server) that supports session beans

> Session object?

Will work on ANY servlet-based system.

> Collections of some sort? i.e. Vectors (is this a simple name/value pair?)

Use a hashTable for name/value pair; but what about persistence?

> Data base? Last resort for performance issues.

Worst solution, since you now have to do database read/write.

____________________________________________________________

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to