All entries for Wednesday 18 May 2005
May 18, 2005
Weird "problem" with hibernate composite–elements
So I have ClassA which has a List of Addresses. Addresses are definately a dependent object, but when modelled in hibernate as a list of composite-elements there is always a null object in the list. The List is also populated with the records from the DB as you would expect, but the first element is always null :(
Bizarre.
Spring "inheritence" between applicationContext and –servlet
So I had a problem with sessions being closed even though OpenSessionInViewFilter was working successfully.
I think it was because my applicationContext had an "import -servlet.xml" statement in it and that was effectively causing the HibernateSessionFactory to be instantiated twice, or at least, to create 2 hibernate sessions.
I resolved this by moving all the DAO stuff into the applicationContext and not importing the servlet context. I didn't realise that servlet.xml can reference beans defined in the applicationContext.xml. Doh!
Cool ajax links
Writing about web page http://www.ajaxpatterns.org/index.php?title=Main_Page
Excellent ajax resource.
In particular, I really like http://www.walterzorn.com/dragdrop/dragdrop_e.htm ;)
Will be very interesting to see how well this takes off.
Karate tonight ;)
I am so looking forward to Karate tonight. I have got to the point where my lardy ar*e is now starting to be obedient to the requests I am sending it ;)
Tonight's should be mainly sparring, tomorrows is more technique based. I particularly enjoy the sparring as I spent about 6 years studying kickboxing in a very sparring intensive way, so sparring is almost "natural" for me.
What isn't natural is the amount of weight I am carrying, and the continual back chat I get from my body when I want to do something :)
Still fitness is improving, and I am not too concerned about loosing weight as long as my stamina improves.
I am quite pleased how much I have improved after only 2 months ;)