2 Replies Latest reply on Dec 14, 2016 3:34 AM by port8080

    WildFly change mapped jndi-name without redeployment

    port8080

      Hello,

       

      We are moving from Websphere to WildFly. We had the possibility in WAS to change the mapped jndi name of a datasource for each deployed application without redeployment. Is there a similar feature in WildFly? For example:

       

      - Our Java EE application (currently a war file) looks up for jdbc/mydb

      - In the web.xml we configured a mapping to use java:/jdbc/productivedb instead of jdbc/mydb:

       

      <resource-ref>

        <res-ref-name>jdbc/mydb</res-ref-name>

        <res-type>javax.sql.DataSource</res-type>

        <mapped-name>java:/jdbc/productivedb<mapped-name>

      </resource-ref>

       

      - Now we want to reconfigure the mapping (temporarily) to java:/jdbc/testdb but we won't redeploy the application

       

      Is this possible?

       

      Thanks

      Stefan