quarta-feira, 19 de outubro de 2016

Creating a MySQL Datasource in WildFly 10

In this message, I will demonstrate how to create a data source to connect WildFly to a MySQL database. The process with other databases, in particular with PostgreSQL should be pretty much identical. This configuration involves two steps: first uploading the driver, second create the datasource itself, using this driver. Let us start by uploading the driver. As usual, go to the address http://localhost:9990 (assuming that this is the management port of your server) and select the "Deployments" tab:

 Next, pick the driver file (a jar like the following):

And that is it for the first step.

Now, for the creation of the data source, go to the Configuration tab and select:

Subsystems-->Datasources--> Non XA (for locally managed transactions). Pick the "Add" button and select the database you want:

Now, let's fill the gaps:

The name we use in step 2 must exist in the "Detected Driver" list:

This is exactly the same name we had in the previous view:

Let's move on. Now be careful to introduce the right database in the URL (you might need to create it in MySQL). In this case, project2db:

 And we have a summary view, before finishing the request:

 The final view should be something like this:

Good luck!

7 comentários:

  1. Greetings. I know this is somewhat off-topic, but I was wondering if you knew where I could get a captcha plugin for my comment form? I’m using the same blog platform like yours, and I’m having difficulty finding one? Thanks a lot.

    AWS Training in Bangalore | Amazon Web Services Training in Bangalore

    Amazon Web Services Training in Pune | Best AWS Training in Pune

    AWS Online Training | Online AWS Certification Course - Gangboard

  2. I’ve desired to post about something similar to this on one of my blogs and this has given me an idea. Cool Mat.
    python interview questions and answers | python tutorials

  3. Thanks for the good words! Really appreciated. Great post. I’ve been commenting a lot on a few blogs recently, but I hadn’t thought about my approach until you brought it up. 
    Devops training in sholinganallur
    Devops training in velachery
    Devops training in annanagar
    Devops training in tambaram

  4. A very nice guide. I will definitely follow these tips. Thank you for sharing such detailed article. I am learning a lot from you.

    rpa training in electronic-city | rpa training in btm | rpa training in marathahalli | rpa training in pune

  5. Hi, Great.. Tutorial is just awesome..It is really helpful for a newbie like me.. I am a regular follower of your blog. Really very informative post you shared here. Kindly keep blogging.

    Java training in Chennai | Java training in Bangalore

    Java online training | Java training in Pune