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.
I tried using WildFly 8.1.0 final on NetBeans 8.0 using this plugin for the server, since there was no built-in plugin for the server.
Unlike GlassFish, the application is however, not deployed on saving project data even though the deploy on save option on the IDE is enabled. The application leads to very strange/unknown/unusual problems. For example, this question is full of (merely) some of those problems.
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.
In this comment of a bug report, it is mentioned that a fix was made by changing/adding some XML corresponding to a JDBC driver as follows,
<driver name="mysql" module="com.mysql">
<xa-datasource-class>
com.mysql.jdbc.jdbc2.optional.MysqlDataSource
</xa-datasource-class>
</driver>
I also made this change to the standalone-full.xml
file. This particular part looks like as follows.
<subsystem xmlns="urn:jboss:domain:datasources:2.0">
<datasources>
<datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">
<connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE</connection-url>
<driver>h2</driver>
<security>
<user-name>sa</user-name>
<password>sa</password>
</security>
</datasource>
<datasource jta="false" jndi-name="java:/jdbc/project_datasource" pool-name="project_datasource" enabled="true" use-ccm="false">
<connection-url>jdbc:mysql://localhost:3306/projectdb</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<driver>mysql</driver>
<pool>
<min-pool-size>5</min-pool-size>
<max-pool-size>15</max-pool-size>
</pool>
<security>
<user-name>root</user-name>
<password>root</password>
</security>
<validation>
<validate-on-match>false</validate-on-match>
<background-validation>false</background-validation>
</validation>
<statement>
<share-prepared-statements>false</share-prepared-statements>
</statement>
</datasource>
<drivers>
<driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
</driver>
<driver name="mysql" module="com.mysql">
<xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlDataSource</xa-datasource-class>
</driver>
</drivers>
</datasources>
</subsystem>
But all in vain. Doing so made nothing new.
Anyway, is it possible to use WildFly (8.1.0 or higher, whenever available) with NetBeans for now (maybe by making somewhere some changes)?
It appears that I'm almost left with staying away with WildFly for now. Is it? :)
I do not precisely know whether the plugin is the problem or not. It might be something different.
Update :
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 question - including the strike-through text) - I just cannot say anything more about it.
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 deploy on save option is enabled in the IDE) - but that's just one simplest thing and cannot be relied upon, even though happens correctly.
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).