-->
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.  [ 1 post ] 
Author Message
 Post subject: Swing Application architecture
PostPosted: Sun Apr 24, 2005 5:30 pm 
Regular
Regular

Joined: Sat Apr 23, 2005 7:28 am
Posts: 52
I'm just starting the refactor of an existing Swing App that presently uses a home rolled DAO with the intention of using Hibernate 3 as the data access and persistance layer.

I'm unsure about best practice for instantiating a SessionFactory - I know that it is advisable to have just one SessionFactory - but what is the accepted / best way to access from within the App.

I could create a singleton to wrap the SessionFactory and then make calls to ... singleton.getInstance().getSession() as needed.

Alternatively, I could bind a SessionFactory to a JNDI reference.

Advice?

db


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

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.