-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: dynamic add mappings using MBean
PostPosted: Thu Mar 25, 2004 8:36 pm 
Beginner
Beginner

Joined: Thu Nov 20, 2003 12:29 pm
Posts: 39
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.