-->
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: XML + Annotations when configuring entity mapping?
PostPosted: Thu May 22, 2008 5:33 pm 
Newbie

Joined: Thu May 22, 2008 5:19 pm
Posts: 1
Is it possible to put some entity configuration in annotations, and some of it in the xml configuration file?

I need to implement a second level cache in an environment where there are many applications sharing data objects across different JVMs. In this situation, sometimes a particular application needs read-only caching, and a different application (running in a different VM) needs read-write caching of the same objects. Because of this, I need to be able to change the caching (read-only or read-write) depending on where the code is being used. This seems easiest if I have the caching configured in the xml instead of in annotations. I don't want to put everything in xml as that defeats one of the key benefits of hibernate over my previous ORM, and I already have a large code base with annotations in place.

Alternatively, how big is the performance hit of using read-write caching instead of read-only?

Thanks

Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:
3.x

Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Problems with Session and transaction handling?

Read this: http://hibernate.org/42.html


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.