title: Using the WildFly application server with NetBeans IDE
body: <p>I was accustomed to using GlassFish server all the times. I'm migrating a Java EE application from GlassFish (4.0) to WildFly 8.1.0 final.</p>
  
  <p>I tried using WildFly 8.1.0 final on NetBeans 8.0 using <a href="http://plugins.netbeans.org/plugin/53333/wildfly-application-server" rel="nofollow noreferrer">this plugin</a> for the server, since there was no built-in plugin for the server.</p>
  
  <p>Unlike GlassFish, the application is however, not deployed on saving project data even though the <em>deploy on save</em> option on the IDE is enabled. The application leads to very strange/unknown/unusual problems. For example, <a href="https://stackoverflow.com/q/26433574/1391249">this question</a> is full of (merely) some of those problems.</p>
  
  <p>I upgraded NetBeans to 8.0.1 (with JSF to 2.2.8-02) which has a built-in WildFly-Plugin but it also brought all most no difference anyway than the previous version of the IDE.</p>
  
  <p>In <a href="https://netbeans.org/bugzilla/show_bug.cgi?id=243502#c15" rel="nofollow noreferrer">this comment</a> of a bug report, it is mentioned that a fix was made by changing/adding some XML corresponding to a JDBC driver as follows,</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;driver name="mysql" module="com.mysql"&gt;
    &lt;xa-datasource-class&gt;
      com.mysql.jdbc.jdbc2.optional.MysqlDataSource
    &lt;/xa-datasource-class&gt;
  &lt;/driver&gt;
  </code></pre>
  
  <p>I also made this change to the <code>standalone-full.xml</code> file. This particular part looks like as follows.</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;subsystem xmlns="urn:jboss:domain:datasources:2.0"&gt;
      &lt;datasources&gt;
          &lt;datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true"&gt;
              &lt;connection-url&gt;jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE&lt;/connection-url&gt;
              &lt;driver&gt;h2&lt;/driver&gt;
              &lt;security&gt;
                  &lt;user-name&gt;sa&lt;/user-name&gt;
                  &lt;password&gt;sa&lt;/password&gt;
              &lt;/security&gt;
          &lt;/datasource&gt;
  
          &lt;datasource jta="false" jndi-name="java:/jdbc/project_datasource" pool-name="project_datasource" enabled="true" use-ccm="false"&gt;
              &lt;connection-url&gt;jdbc:mysql://localhost:3306/projectdb&lt;/connection-url&gt;
              &lt;driver-class&gt;com.mysql.jdbc.Driver&lt;/driver-class&gt;
              &lt;driver&gt;mysql&lt;/driver&gt;
              &lt;pool&gt;
                  &lt;min-pool-size&gt;5&lt;/min-pool-size&gt;
                  &lt;max-pool-size&gt;15&lt;/max-pool-size&gt;
              &lt;/pool&gt;
              &lt;security&gt;
                  &lt;user-name&gt;root&lt;/user-name&gt;
                  &lt;password&gt;root&lt;/password&gt;
              &lt;/security&gt;
              &lt;validation&gt;
                  &lt;validate-on-match&gt;false&lt;/validate-on-match&gt;
                  &lt;background-validation&gt;false&lt;/background-validation&gt;
              &lt;/validation&gt;
              &lt;statement&gt;
                  &lt;share-prepared-statements&gt;false&lt;/share-prepared-statements&gt;
              &lt;/statement&gt;
          &lt;/datasource&gt;
          &lt;drivers&gt;
              &lt;driver name="h2" module="com.h2database.h2"&gt;
                  &lt;xa-datasource-class&gt;org.h2.jdbcx.JdbcDataSource&lt;/xa-datasource-class&gt;
              &lt;/driver&gt;
              &lt;driver name="mysql" module="com.mysql"&gt;
                  &lt;xa-datasource-class&gt;com.mysql.jdbc.jdbc2.optional.MysqlDataSource&lt;/xa-datasource-class&gt;
              &lt;/driver&gt;
          &lt;/drivers&gt;
      &lt;/datasources&gt;
  &lt;/subsystem&gt;
  </code></pre>
  
  <p>But all in vain. Doing so made nothing new.</p>
  
  <p>Anyway, is it possible to use WildFly (8.1.0 or higher, whenever available) with NetBeans for now (maybe by making somewhere some changes)?</p>
  
  <p>It appears that I'm almost left with staying away with WildFly for now. Is it? :)</p>
  
  <p><sub>I do not precisely know whether the plugin is the problem or not. It might be something different.</sub></p>
  
  <hr>
  
  <p><strong>Update :</strong></p>
  
  <p>It took me at least three weeks to encounter this situation. So, please do not think that the entire thing I wrote here is wrong/meaningless, if you could not reproduce the same thing just within a moment (as mentioned in the linked <a href="https://stackoverflow.com/q/26433574/1391249">question</a> - including the strike-through text) - I just cannot say anything more about it.</p>
  
  <p>One of the reproducible things : if some changes to an existing application are made, the application is not (automatically) deployed to the server, if those changes are saved (not to mention that the <strong>deploy on save</strong> option is enabled in the IDE) - but that's just one simplest thing and cannot be relied upon, even though happens correctly.</p>
  
  <p>Apparently the plugin does not interact/communicate with the IDE in a way that it should (as happens correctly, when using GlassFish Server, for example).</p>