Using property file in hibernate mapping

Posted by Zoltan Hamori on Stack Overflow See other posts from Stack Overflow or by Zoltan Hamori
Published on 2010-06-09T08:32:35Z Indexed on 2010/06/09 16:02 UTC
Read the original article Hit count: 317

Hi,

I have a two nodes environment using the same database. In the database there is a resource table like

RESOURCE_ID,

CODE,

NODE

The content of the NODE column can be 1 or 2 depending on which node can use it. As I need to deploy the same ear to the two nodes, I would like to map this table like this:

<hibernate-mapping>
    <class name="ResourceVO" table="RESOURCE"
           dynamic-update="true" optimistic-lock="dirty" where="NODE=${node.value}" >

I would like to store the node.value property on the file system, so the instances could identify which resource to use. Is it possible in hibernate?

© Stack Overflow or respective owner

Related posts about hibernate

Related posts about properties