It looks like the existing middle tier is not suitable for my Swing application.

 

This problem requires a rewrite of the HibernateUtil which was designed for a Web application.

The DAO’s make use of HibernateUtil, so if I create another HibernateUril, I would have to create new DAO’s or overload existing DAO methods to use the new HibernateUtil.

 

Not sure how to prevent this from getting messy.

The goal was to have a single middle tier for ease of maintenance.

 


From: [email protected] [mailto:[email protected]] On Behalf Of Dr Heinz M. Kabutz
Sent: 02 June 2006 12:53 PM
To: [email protected]
Subject: [CTJUG Forum] Re: Another Swing and Hibernate issue

 

Be careful with Swing - if an exception occurs then the event thread is thrown away and a new one created.

 

Kind regards from

Heinz
--
Dr. Heinz M. Kabutz (Maximum Solutions)

Sun Java Champion
Author of "The Java(tm) Specialists' Newsletter"
http://www.javaspecialists.co.za

Tel: +27 (83) 340-5633
Skype: kabutz

-----Original Message-----
From: [email protected] [mailto:[email protected]]On Behalf Of Enrico Goosen
Sent: 02 June 2006 11:34
To: [email protected]
Subject: [CTJUG Forum] Another Swing and Hibernate issue

Hi All,

 

I'm writing a second Swing application, and this time around I'm using an existing Hibernate middletier.

The problem I'm experiencing is that the HibernateUtil stores a Hibernate Session per ThreadLocal, which is posing a problem for my application.

 

It appears that 2 Hibernate sessions are being created, one for the main thread and one for the event-dispatching thread.

 

I'm not sure how to prevent my DAO code from running on the event-dispatching thread.

Or, how do I force my DAO code to run on the main thread?

 

Any suggestions?

 

Enrico Goosen

Software Developer

SAICOM TECHNOLOGY

TEL:       +2721 417 1375

FAX:     +2721 417 1361

CEL:     +2783 305 5676

EMAIL: [EMAIL PROTECTED]

 




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CTJUG Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/CTJUG-Forum
For the ctjug home page see http://www.ctjug.org.za
-~----------~----~----~----~------~----~------~--~---

Reply via email to