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.  [ 3 posts ] 
Author Message
 Post subject: Using Hibernate in which context?
PostPosted: Mon Sep 06, 2004 11:57 am 
Beginner
Beginner

Joined: Mon Sep 06, 2004 9:36 am
Posts: 35
I have to build a time application. In this application user can enter time informtion for an employee for a Department and Job (For e.g., Joe worked 9:00 to 17:00 on 1/1/2004 in Adminstration as Office Assisstant). After user click on Update, I will apply some businesss rules for Joe.

Now the business rules will be in com.srh.ta package and it will be a Session Bean EJB. I want to use Hibernate in this application but i have couple of questions :

* Should I keep Hibernate in com.srh.ta or define another package? I am thinking about a seperate package so that other applications can use it but not sure if it is possible or a recommended approach.

* I am not sure which information to made persistent. I can see that i can persist codes like Department and Job but what about employees? There can be lot of employees (20000+) so does it make sense to persist every employee user work on or when user changes the employee selection i remove the previous employee from the memory? Or do not persist employees at all?

* If I am not using much persistency does it make sense to use Hibernate?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 07, 2004 4:38 pm 
Beginner
Beginner

Joined: Mon Sep 06, 2004 9:36 am
Posts: 35
Anyone please? Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 08, 2004 2:36 pm 
Beginner
Beginner

Joined: Thu Jul 29, 2004 7:14 pm
Posts: 41
i am a newbie too but i can try answering these questions.

* There will be a main Hibernate application whose work is only to give you a sessionfactory. You can put this application in a seperate package say, com.srh.hibernate.
Then in your com.srh.ta package you call the main Hibernate application to open a session, do what you want to do, finish your work and then close the session.

* its upto you but i think persisting only current employee is a good idea.

* Hibernate is much more than Persistence.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.