-
1. Re: Add driver in domain mode
jewellgm Sep 21, 2017 2:55 PM (in response to davidi123)Rather than deploying your jar, you need to create a Wildfly module and put your jar into it. Look into the %WILDFLY_HOME%\modules directory, where all of the modules reside. You'll find many examples of how to create a module. You'll need to create a directory structure, which in your example, would be "com/mysql/main". Drop your jar into there, and create a module.xml file in the same location. You can use the existing com.h2database.h2 module as a template.
-
2. Re: Add driver in domain mode
davidi123 Sep 22, 2017 4:02 AM (in response to jewellgm)I placed the module.xml and the driver.jar into the folder "<wildfly>/modules/system/layers/base/com/mysql/main" now.
When I run the script again, I get the same error, but this time for the slave only. It seems, that it doesn't deploy the two files to the slave.
When I shut down the slave and only run the master, it is working.
Do I have to do it manually at all the slaves or is there a possibility to deploy it automatically?
-
3. Re: Add driver in domain mode
jewellgm Sep 25, 2017 8:54 AM (in response to davidi123)1 of 1 people found this helpfulThere's no automatic deployment of modules to slaves that I'm aware of. You can either install the module on each slave manually, or utilize a patching mechanism to push patches from the master down to slaves. I found two links, but one of them is being blocked by the firewall.
Layered Distributions and Module Path Organization
http://aparnachaudhary.github.io/blog/2014/11/wildfly-patch-custom-module.html (<- Blocked by firewall)
-
4. Re: Add driver in domain mode
davidi123 Sep 25, 2017 11:13 AM (in response to jewellgm)Ok, I applied a patch to my master host as described here: http://aparnachaudhary.github.io/blog/2014/11/wildfly-patch-custom-module.html and restarted the server.
I think it worked because the script ran without error and I can see the datasource.
I also see the patch at <wildfly>/.installation/patches/ and the jar + module.xml in <wildfly>/modules/com/mysql/main.
But what confuses me is that the patch doesn't appear in the wildfly console.
Using the jboss-cli.sh and the command: "patch --host=master history" I get this result
{ "outcome" : "success", "result" : [], "server-groups" : null }
And when I try to rollback with "patch rollback --host=master --reset-configuration=true", I get this error:
{"master" => "java.lang.IllegalArgumentException: WFLYPAT0020: Cannot rollback. No patches applied."}}