1 Reply Latest reply on Apr 1, 2013 1:49 PM by Nicklas Karlsson

    Application configuration

    Marco Becker Newbie

      Hallo,

       

      I'm new in JavaEE and JBoss AS 7. I have a question about configurating an application within JBoss AS.

      With JNDI it is typically to configure JDBC Datasources for using it in JPA. My question ist, how can I configure custom information to handle different enviroments like development and production?

       

      I like to configure IPs for my MongoDB servers. I don't like to handle it in my sourcode on check the servers ip address.

       

      Is there a possibility for my problem?

       

      Thanks and regards

      Marco

        • 1. Re: Application configuration
          Nicklas Karlsson Master

          You might have a TestAppDatasource and ProdAppDatasource defined on the instance and use build-time filtering (e.g. maven parameters) for hooking up the application to the correct datasource.

          A more practical scenario would be to have separate instances for test and production with both having a AppDatasource (pointing to test DB on test AS and prod DB on prod AS). An application deployed on the server would then have access to the correct DB