0 Replies Latest reply on Jun 5, 2013 1:46 PM by Suraj Chandran

    Writing to jndi from random threads

    Suraj Chandran Newbie

      Hi,

       

      We have a lot dynamic addition and removal of bindings in to the jndi tree. And these addition/removal happens in many different modules of code and consequently from different threads.

      In jboss4, these threads were able to bind objects to jndi. But while migrating to jboss7.2(eap6.1.final) it fails with the well-known "naming context is readonly" error.

      As suggested in other articles I was able to write to jndi in my start() method of my SAR; but unfortunately, I can't do all the bindings at this thread, as these codes are invoked at different times in differen threads.

      Is there a way I can temporarily make the jndi tree writeable in my thread and after the binding and make it readonly again?

       

      Thanks,
      Suraj.