-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Saving Set in web-tier
PostPosted: Mon Feb 28, 2005 12:51 pm 
Beginner
Beginner

Joined: Thu Jul 29, 2004 7:14 pm
Posts: 41
Hibernate version: 2.17


I have a POJO named EmployeeSch. In my ejb-tier I am building a java.util.Set of EmployeeSch. The semantics of this method in ejb-tier are :

Set employeeSchs = new HashSet();
try {
HibernateUtil.getSession();
HibernateUtil.beginTransaction();
...
EmployeeSch aEmployeeSch = new EmployeeSch();
...
employeeSchs.add( aEmployeeSch );
...
HibernateUtil.commitTransaction();
} catch (Exception e) {
HibernateUtil.rollbackTransaction();
}
finally {
HibernateUtil.closeSession();
}

return employeeSchs;

I am passing this Set to web-tier. Each EmployeeSch will be shown to the user as a row in the jsp. User can make changes to any of them and when save clicked, I want to save them in the database.
I am thinking about this colution:

* Save the Set in web-tier; after user has made changes, populate those changes in each of respective EmployeeSch, put them back in Set and pass the Set to ejb-tier where it will be looped and saved.

My first concern is memory; this Set potentially can have more than 100 rows. Will it be a problem?
My another concern is automatic update. I have created new EmployeeSch objects. Is it possible that they got saved by some other update on some other screen?


Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 02, 2005 4:09 pm 
Beginner
Beginner

Joined: Thu Jul 29, 2004 7:14 pm
Posts: 41
Hi guys, any input please? throw any idea you have. Thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.