-->
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 Configuration with Spring
PostPosted: Mon Nov 26, 2012 2:49 pm 
Newbie

Joined: Mon Nov 26, 2012 2:34 pm
Posts: 6
*Note: I apologize if this should go in the search forum, It seems like a hibernate issue but the parameters I am trying to configure are for search*

I'm currently trying to configure a master/slave setup for a JMS hibernate search index setup. I am going to be using three machines in this task (1 master, 2 slaves). Due to the way we deploy our apps to the server I need to use a the same configuration across all three machines. I am assuming that I can use a programatic configuration to use some flag logic to set the configuration on each machine.

My issue is that we are currently using spring and xml to set the up the session factory and I am unable to add programatic logic to it.

Here is the way it is currently configured:

Code:
<bean
    class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"
    id="productSessionFactory">
    <property name="dataSource">
      <ref local="productDataSource"/>
    </property>
    <property name="configLocation">
      <value>classpath:hibernate.cfg.xml</value>
    </property>
    <property name="entityInterceptor" ref="builderInterceptor"/>
    <property name="eventListeners">
      <map key-type="java.lang.String" value-type="java.lang.Object">
        <entry key="save" value-ref="saveEventListener"/>
      </map>
    </property>
  </bean>


Is there any way I can use programatic configuration in addition to this to set the master/slave setup?

Thanks for the help!


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.