Hi all,
Sorry for the mass emails all at once about the dbconfig stuff :)
So just a quick status update following the last thread about the dbconfig
module. In the last thread Simone brought up the issue about lazy loading
being an issue. I am happy to say that I believe i have squashed it and now
have a dbconfig that utilizes lazy loading for all associations.
To do this I had to more or less drop some of the automatic hibernate
session management that you get with spring, and do it manually at the
servlet filter level. Actually after doing quite a bit of googling about the
LazyInitializationException issue in hibernate, this issue seems to be quite
common and the solution well known. To use the OpenSessionInView servlet
filter that opens and closes a single session per request. Transaction
management is still handled by a spring proxy.
And I am happy to say that the UI feels just as snappy and fast as with the
in memory config. Although I cant; say for sure as i have done no formal
benchmarking.
The wicket ui seems to be happy for the most part... except for the layer
edit page which uses a tab panel each backed by a model for the resource and
its associated layer. Long story short the issue is that the objects are
directly serialized (to maintain changes between tab switches) rather than
looked up from the catalog directly. So once you switch a tab the lazy
collections of the object created by hibernate no longer function because
they don't have a session. Nasty issue.
I tried to solve this by having the model reattach the layer and resource to
the current hibernate session whenever they are accessed but that leads to
another set of issues.
So this is still an open issue. I would love some suggestions from the more
hibernate savvy folks here. The only thing i can think of at this point is
to rewrite that page to use a different type of wicket model. Basically
copying all the resource and layer properties into a map and use that as the
backing model for the form, and then reapplt the properties when the form is
saved. Not nice but the only thing I can think of at this point.
-Justin
--
Justin Deoliveira
OpenGeo - http://opengeo.org
Enterprise support for open source geospatial.
------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel