title: How should I make JBoss temporarily ignore an MBean service?
body: <p>I am using a single JBoss deploy directory for multiple J2EE projects that I'm working on. (Note, I'm not looking for answers that tell me that I shouldn't be doing this.) I have written a scheduler service mbean that lives in the <code>deploy</code> directory, e.g., an XML file containing</p>
  
  <pre><code>&lt;server&gt;
      ...
      &lt;mbean code= ... &gt;
          &lt;attribute ... &gt;
          ...
      &lt;/mbean&gt;
  &lt;/server&gt;
  </code></pre>
  
  <p>That XML file only contains that one <code>mbean</code> tag in the <code>server</code> tag, so it would be sufficient to make JBoss ignore the entire XML file. That mbean is specific to one of my projects, so I'm looking for the simplest way to hide it from JBoss when I'm working on a different J2EE project.</p>
  
  <p>Right now, I'm accomplishing this by commenting out the entire <code>mbean</code> tag inside of the file (manually). This is ugly. Other than moving the XML file out of the <code>deploy</code> directory, is there a better/cleaner/recommended way to do this?</p>