Hi Klaus,
If you are displaying a bunch of data on your page, agree with the approach. Then if someone wants
to change the data, I would suggest having a separate edit page for that data. In this case I would
use a entity bean directly behind the form.

Did you use CMP entity beans to make your display beans from the session beans? This is how the pet store
does it. If you do then the entity bean for that row will already be loaded so asking for it in your edit page
would not be expensive except for all the calls to display the attributes.

Hope this helps,
Eric :-)

[EMAIL PROTECTED] wrote:

This is probably not an Orion spesific, but should consern anyone who is
using EJB through JSP.

The application I am developing is using JSP for generation a GUI to the
Buissiness methods in the Orion server. But i have come into one problem,
data integrity.

Because of performance i never use an Entity bean direcly i use stateless
session beans as factory objects to throw out collections of data to the
JSP, and the entity bean generates javabeans so i get out with an average
1-2 calls for a full row retrieve from a database table. The performance is
great :) (caching mechanism for CMP beans is just great :).

But recently when implementing the save and create parts of the JSP
application i come into a problem: Transactions.

What do you do? Im thinking about when you retrieve some into for a page for
editing, you never know when the user is done? he can walk from the page
with the data more or less edited (ie lunch) he can just close the browser
or the like. Or two ppl can do the same thing with the same data and save
allmost at the same time.

How do you do locking of data in a safe manner in a J2EE environment using
JSP as the GUI???

This has pulled my hair the last few days, but i could not find mutch help
in either JTS or JTA spesifications.

Anyone have any good suggestions?

Med vennlig hilsen
Klaus Myrseth
Telenor Mobil AS - Planavdelingen

Reply via email to