Announcement Announcement Module
Collapse
No announcement yet.
Newbie-Questions: hibernate-runtime.configuration Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Newbie-Questions: hibernate-runtime.configuration

    Hi all!

    I have a web-app with spring+hibernate.

    hibernate/spring-Config is like this:

    <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSes sionFactoryBean">
    <property name="dataSource" ref="dataSource" />
    [...]
    </bean>

    I want to change the dataSource at runtime.
    I searched around and read, that I could use JMX to achieve hibernate-runtime-configuration.

    First problem is, that I don't understand how I can achieve a "refresh"
    of the sessionFactory with JMX.
    Sure, I can set a new datasource in the sessionFactory, and sure I could sent a JMX-notification from the sessionFactory to someone, but what next...?

    Second problem is that, I don't get the point of JMX for this special use-case.

    I use JMX to manage and monitors beans and services, from "outside",
    like jconsole, right? Is this for my use-case not some kind of break a fly on the wheel?

    Maybe there is some kind of easier method?

    Sincerely,

    Mickey
Working...
X