Question Details

Browse

Hibernate and JPA

By Sanjay Makvana - Oct. 09, 2008

Hi!


I had went through a critical development issue with Hibernate and JPA


I used 2 database in hibernate application with JPA annoation.


I found the real time problems to change database name during production time.

I found following way but they are not that good.

1. change the database name in annoation ( which is poor solution )


Can any body know how can I change the annoation at run time?


in that case I could solve the above problems batter way.


thank you for reading this real time problems.



Answers

Add Answer
  1. By dotw on Oct. 15, 2008

    could you use xml configuration file instead annotation?


    0 Votes
  2. By qiu bad on Oct. 15, 2008

    please google spring AbstractRoutingDataSource class


    1 Votes
  3. By bo jian on Oct. 15, 2008

    badqiu is a good idea


    0 Votes
  4. By qingzhu kong on Oct. 16, 2008

    use spring manage your database .Or you could use map to manage it .


    2 Votes
  5. By kernal kong on Oct. 16, 2008

    spring or turbine


    0 Votes
  6. By kernal kong on Oct. 16, 2008

    manage it by a map


    0 Votes
  7. By Neptune Chin on Oct. 18, 2008

    see


    0 Votes
Share your knowledge

Related Questions

Browse Get answers and share your expertise.