facebook

Deploy – change Hibernate MySQL connection properties?

  1. MyEclipse Archived
  2.  > 
  3. Application Servers and Deployment
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #331306 Reply

    davout
    Participant

    I’m creating a Spring/Hibernate web app inside MyEclipse R10, that connects to a local instance of MySQL running on my local laptop . I’m testing it using the embedded MyEclipse Tomcat.

    I now want to deploy this web app to a remote server, where the MySQL connection details will be different.

    What’s the best way of building the web app so that it can be deployed to some remote server and have it discover the MySQL connection parameters from some outside parameters file or perhaps even some environment variables? This could be an Amazon instance or a private physical server.

    #331314 Reply

    davout,

    You can create a properties file (database.properties) for the database details and configure this properties file in Spring bean configuration file.

    Please check this link and try their suggestions :
    http://www.mkyong.com/spring/maven-spring-hibernate-mysql-example/

    I suggest you check on hibernate development forums for more help.

    Hope this helps.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: Deploy – change Hibernate MySQL connection properties?

You must be logged in to post in the forum log in