Re: Hibernate/Spring
- From: Andrew Fielden <ajfielden@yahoo.com>
- To: pip-developers-list@pip.kenai.com
- Subject: Re: Hibernate/Spring
- Date: Tue, 5 Jan 2010 02:07:03 -0800 (PST)
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=fvZGHpfGYxyl4BF0z4jztVrbLKTvDyawo6WBS6jOlSiRyxCdG3lrsPCfaPvDrowRGIZ6OhWxKwso1/L692rciOYFtx3q9qJxgqIPMkoj0n4qDSQwzcAf22pErmoYGpL/abqcNADCxZZt/aJZPK7ELe9r0juoUancvDmsCkaFcQk=;
Thanks Ganesh. The problem I mentioned was actually being caused by the Spring framework. Who knows what it's doing with sessions, but I'm now using only Hibernate, and my test works perfectly.
Makes the application code a bit more cluttered, but at least it works.
Makes the application code a bit more cluttered, but at least it works.
Andrew.
From: Ganesh Krishnan <ganesh.kris@gmail.com>
To: pip-developers-list@pip.kenai.com
Sent: Mon, 4 January, 2010 17:33:52
Subject: Re: Hibernate/Spring
Andrew,
I agree with you that Hibernate exceptions are least helpful to debug. I have gone through that myself. A plausible reason for the error is that you are trying to delete in a transaction started manually (programmatic) while hibernate is still having an open session. Try to delete within the hibernate session itself and it may work.
Note: Wicket has almost no configuration. I have heard some great review about Grails on performance when compared to Tapestry and Wicket.
regards,
Ganesh Krishnan
On Mon, Jan 4, 2010 at 12:02 PM, Andrew Fielden <ajfielden@yahoo.com> wrote:
Ganesh,
I'm working on the DAO layer for the Data Module Designer.
However I'm starting to realise that Hibernate is very clever and convenient, but there's so much going on under the covers, it's very difficult to track down problems when they occur. Currently getting this in my delete test:
illegal attempt to associate a collection with two open sessions
I didn't realise there were so many Java web frameworks. Wicket isn't one I've used before, but I'm in favour of reducing XML config files where possible.
From: Ganesh Krishnan <ganesh.kris@gmail.com>
To: pip-developers-list@pip.kenai.com
Sent: Mon, 4 January, 2010 16:28:44
Subject: Re: Hibernate/Spring
Andrew,
I thought you are just working on the Swing part of the application. I am not sure if Dr. Shah has any immediate plans to host Protean in Web mode. FYI, for the Guideline execution in Web mode, we are already using Wicket framework, a much lighter framework without all those dependency injection and the like. Hope this helps.
regards,
Ganesh Krishnan
On Sun, Jan 3, 2010 at 8:48 AM, Andrew Fielden <ajfielden@yahoo.com> wrote:Hi Folks,
Hope you had a great Christmas.
I've been reading about the Spring Framework http://www.springsource.org/, specifically how it integrates with Hibernate.
It takes much of the pain out of managing database sessions and transactions. I'm going to use Spring + Hibernate for the DMD DAO layer, as it will significantly simplify the code required to use the database.
Going forward, Spring offers a lot of extremely useful features regarding web development, and it can integrate with Stripes http://www.stripesframework.org/display/stripes/Home. Stripes provides a similar web application framework to Struts, but has a lot less overhead in terms of configuration, and makes use of code annotations.
Anyway I'm currently in the process of creating Spring based tests for my Hibernate DAO layer, so should be making more commits in the next few days.
Andrew.
| Andrew Fielden | 01/03/2010 | |
| Ganesh Krishnan | 01/04/2010 | |
| Andrew Fielden | 01/04/2010 | |
| Ganesh Krishnan | 01/04/2010 | |
|
Re: Hibernate/Spring |
Andrew Fielden | 01/05/2010 |





