Adding tables and columns to sleep mode on the fly?

I'm currently working on an application using Hibernate, and we want to be able to insert columns and tables on the fly, that is, at runtime, and continue to work with the application without restarting it. We are currently building facilities, but do not use them yet. We have old C code (which will be ported to Java some day) that hosts our business logic and makes Java / Hibernate calls through JNI to retrieve records from the database. After reading a few threads (see links below) and hibernating 3.6, there are still some questions:

1. If I embed SchemaUpdate in my application as indicated here: http://docs.jboss.org/hibernate/core/3.6/reference/en-US/html/toolsetguide.html#toolsetguide-s1-6 Should I then recreate the SessionFactory (this is an expensive operation), even if I will not use objects (as at present, but in the future, of course, this will change)? Then the old session will be invalid, i.e. Do I need to transfer objects already stored in memory and supported by the session to a new session? Is it possible somehow? Does Hibernate support information outside of ORM for schema objects? There wouldn’t be enough (session, that is, first level) caching, as suggested here: circuit changes during sleep mode

2. What about changing columns? I think this is still how @Bozho wrote: "Alas, hibernation cannot change columns"? Sleep mode for updating table schema

These are my questions so far, thanks for any help.

Other links I read:

+5
1

, .

+5

All Articles