Hi,
my situation is like described in
http://forum.hibernate.org/viewtopic.php?t=929268&highlight=.
I had one hibernate application, respectively a framework using hibernate, running at jboss.
Now i want to add a mapping at runtime to the applications SessionFactory from another independent jar.
Therefor i use the MBean (HibernateFactory) and it works first of all.
Now following problems:
1.
After:
-deploy the 2nd jar
-add a mapping to mbean(+build new application sessionFactory )
-undeploy the 2nd jar
-deploy it again
-add the same mapping again,
i get a MappingException: "duplicate import".
Ok.
But not adding them again, i get "no persister..." Exception.
Is this behaviour wanted or am i doing something wrong?
2.
If i add the mapping(the 1st time) and retrieve a new session factory if the application/framework is "working", that means several hibernate session are open and in progress, it comes most of all to several errors.
fe. "flush during cascad is dangerous.."
Probably changing the session factory influence the open sessions !?
I'm using the thread local pattern with nested calls.
Hibernate Version: 2.1.1
Sorry for my english and my lack of expressiveness.