-->
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.  [ 6 posts ] 
Author Message
 Post subject: Sharing mapping files across applications
PostPosted: Mon May 10, 2004 3:26 pm 
Newbie

Joined: Mon May 10, 2004 2:41 pm
Posts: 2
I'm using hibernate 2.1 and jboss 3.2.3. We are trying to implement an architecture where we deploy several Enterprise Services that would be accessible to all apps via a Stateless Session Bean w/ hibernate under the covers. Therefore we have an EAR with these Enterprise services along with the mappings for these services in a SAR. The problem arises when other applications that run in their own space and have their own class loader would like to reference mapping files that are Enterprise Services. We could put all the mapping files in one place (the shared library would work I believe) but then whenever one of these separate applications has to be redeployed we have to worry about someone screwing something else up in the Enterprise mappings. Therefore we risk breaking other applications whenver someone has to redeploy.

MY QUESTION: Is there a way to deploy these mappings separately, but still allow the separate applications to reference the mappings in the Enterprise services? With the way the hibernate session seems to work, I can't see that there is a good way to do this.

Any suggestions would be greatly appreciated!!!
M-


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 10, 2004 4:23 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Can you describe more clearly what you want to do? Creating Services which are behind a Session Bean Facade should not be a problem with them using Hibernate under the covers. The other apps can then easily access them. I don't get your problem I suppose - do you want to share the SessionFactory or what?


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 10, 2004 11:36 pm 
Newbie

Joined: Mon May 10, 2004 2:41 pm
Posts: 2
Sorry this wasn't too clear. You are right, we haven't had a problem with the session bean facade, and the problem isn't when our applications want to access these services, but when our applications want to tie into the mapping files of these services. Let's say we have a "File" service that has a corresponding File.hbm.xml mapping file. Now one of our applications wants to subclass this "File" object which we can call "FileSubclass". This isn't a Service behind a session bean facade, this is just an app that has FileSublclass.hbm.xml as one of its mappings. This subclass mapping needs to reference the superclass "File" but I don't want all the mapping files in the same place because when our application that uses FileSubclass has a problem and has to redeploy I don't want to have to redeploy the File mapping as well because this Service hasn't changed and I don't want to possibly insert any bugs into that somehow. I'd like to be able to leave all these Services that are shared amongst all our apps alone if possible, but I don't believe that I can have mappings that reference each other like that in separate SARs??? I hope this, along with the original message clarifies my problem. Is there a way around this? Can these mapping files be in separate SARs and still work? My understanding is that they can't.

Thanks for your assistance
M-


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 11, 2004 7:58 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
This is not possible yet, and I don't think this is possible at all. I'd really suggest to rethink your application design and seperate "services" from persistent objects in your model.


Top
 Profile  
 
 Post subject: similar request
PostPosted: Tue Oct 11, 2005 1:15 pm 
Regular
Regular

Joined: Thu May 26, 2005 12:20 am
Posts: 72
Can hibernate recognize HBM files from within a JAR? I am looking to share my model classes between applications as well.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 11, 2005 2:26 pm 
Regular
Regular

Joined: Thu May 26, 2005 12:20 am
Posts: 72
stupid question. sorry.


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

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.