0 Replies Latest reply on Apr 13, 2016 5:28 AM by acraftuk78

    DuplicateServiceException, admin cli

    acraftuk78

      hi

       

      I'm trying the create a some deployment scripts for our application on jboss using the DMR and ModellControllerClient, the script should be idempotent so can be run any number of times to put server into a known state.

       

      Basic process:

      1) connect and set admin mode

      2) wait for state to change to admin

      3) Remove all children under datasources/messaging/resource adapters (is there an easier way to get a clean config?)

      4) Create new items as created

      5) reload

       

      The process works for things such as datasources but i am trying to create a PooledConnectionFactory for hornet and when i remove then re-add the PoolConnectionFactory successfuly after reloading i get 'org.jboss.msc.service.DuplicateServiceException: Service jboss.naming.context'. If i kill the process the start with the exact config it works as expected. It appears like when i remove the PooledConnectionFactory it not cleanly removing from JNDI and fails when it trys to register with the same name. Note other resources such as datasources work fine and re-register and re-create. Do i need to undeploy any running apps and redeploy after making admin changes?

       

       

      Version

      JBOSS EAP 6.4.0

       

      thanks