Just omit the setting. If hibernate doesn't see hibernate.hbm2ddl.auto, it does nothing.
On 2/24/07, Kalle Korhonen <[EMAIL PROTECTED]> wrote:
In practice, no. I would have to mark a whole bunch of beans as lazy inited, give up on auto wiring etc. But it does help to post your thoughts. I was close before.. I don't see hibernate.hbm2ddl.auto=false documented anywhere (I see one(!) dodgy google result for it), but that works, and then I can just call validation myself at a later point. This way I don't need to fiddle with anything else, but only need to make sure that I don't do database operations before I do the validation, which is simple enough. Kalle On 2/24/07, James Carman <[EMAIL PROTECTED]> wrote: > > Can you just mark your session factory bean as lazy init in your > spring application context file? Or, mark the whole xml file as lazy > by default? > > On 2/24/07, Kalle Korhonen <[EMAIL PROTECTED]> wrote: > > Using Tapestry 4.0.2 and this is much more a hivemind question really, > but I > > wonder if anybody has tried to lazy initialize Tapestry-Spring. > Currently, > > if I don't initialize Spring context at the start-up, Tapestry-Spring > fails > > on ClassCastException. The use case I have is that I'm using Hibernate > and > > I'd like to deploy a new version of the web application using > > hibernate.hbm2ddl.auto=validate. If the validation fails I'd just show a > > status message like "Sorry, we are down for maintenance" until the > schema is > > updated, which I can in principle do if I delay creating the Spring > context > > and (re-)initialize it at some point later. However, ApplicationServlet > > initialization fails when it tries to construct Hivemind registry. The > > service point SpringApplicationInitializer has been marked private so I > > can't override it externally. What I'm trying to do is to avoid granting > > rights to modify the schema for the webapp's normal database access > account, > > and only update the scema externally with a different user credentials > (more > > detailed post about Hibernate validation from Spring's perspective at > > http://forum.springframework.org/showthread.php?t=35274). > > > > Suppose I could implement a wrapper/extension for ApplicationServlet to > > catch the exception and make it able to re-initialize, but then I'm > already > > implementing a wrapper for Spring context initializer and doing some > other > > tricks to get Acegi filters to initialize lazily, so overall I'm > wondering > > if I'm just complicating the design for nothing. Maybe somebody already > has > > a solution with schema validation or can see some completely different, > but > > simpler way to get to the same end result? > > > > Kalle > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]