Database connections from external file

namrata
2014-05-05
2014-05-07
  • namrata

    namrata - 2014-05-05

    hi,
    Though we can provide database connection parameters with the help of persistence.xml,But can we use an external file which provides connection properties,need of this simply being able to make changes easily whenever required after you create a war file of your application.Say like for example using ResourceBundle class.How can you do it in openxava.

     
  • Javier Paniza

    Javier Paniza - 2014-05-07

    Hi Namrata,

    in persistence.xml you only write the JNDI name of the datasource, not the connection parameters. The datasource is defined in your application server that is independent of the war or your application.


    Help others in this forum as I help you.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks