We have a product which captures images and data of physical items when they are run through sorters. Each set of physical items is denoted a job. A dynamic table is created for each job and each date. There is a template table(ITEM_MASTER) which is taken as a reference to create the dynamic tables
For example lets say today is 02-Jan-2008 and there are 3 jobs which are run. Each job has 100000 items. So we create 3 tables i.e. item_01022007_1 to _3. The product also offers UI interfaces to process these items
Now if we want to use NHibernate, there are these issues which we face
1. We need to dynamically map the item table name in session factory based on what user selects.
2. Rebuild the session factory once mapping is changed.
3. Switch between various item tables throughout
4. Every time a session factory is rebuild, memory leak happens which can be monitored through any profiling tool
A solution to this can be a hash table of session factory per job, but number of jobs can be many so its not turning out to be an efficient solution.
I have the following queries
1. Does NHibernate support dynamic table name change without rebuilding the session factory? Please let me know if there is anything like that
2. Is the memory leak issue in rebuilding session factory fixed in the latest(1.2.1) release?
Thanks
Piyush
|