How to connect SQL server database with JPA project - Wildfly server - Java EE
<p>Well, this question may be a duplicate or something. But I am desperate. I am learning Java EE and I cant even set up all the configurations properly.</p>

<p>My situation:
I have a Wildfly 8.1- Jboss server, up and ready. 
I have deployed datasource (SQL server) Its working.</p>

<p>It has this JNDI:<br>
java:/TimeTrackerDS</p>

<p>And this driver: sqlserver
Driver Class: com.microsoft.sqlserver.jdbc.SQLServerDriver</p>

<p>All this seems to be okay. Now I am deploying my new Application. 
And I just dont know how to use this staff to connect to database.
The application is also deployed. How to connect these 2 things (db and app) </p>

<p>I have found a lot of solutions. Write properties to persistance.xml But I cant get anything to work. Because I don't understand it. Maybe if someone from you guys, show it to me on my particular example. I would understand what I am doing wrong. </p>

<p>(The server, app and sql server are all at same machine )(localhost)</p>