title: Do I need DataSource in JPA Hibernate project?
body: <p><br>
  I am preparing some application with usage of JPA 2.0, Hibernate as provider, MySQL 5 as database, which will be deployed on JBoss AS 7.0.2.<br>I have already configured some basics in persistence.xml and I came into some kind of trouble. I have noticed that some people also defines some specific DataSource on JBoss Management Console level.<br>
  My question is. Do I really need to worry about some DataSource or anything like that in Hibernate application?<br>I thought it is important in old JDBC approach.<br>In some books, where examples are shown, there is no such configuration in persistence.xml or hibernate.cfg.xml<br>
  Do I have to place mysql connector into JBOSS_HOME/standalone/deployments directory to use MySQL in my application?<br><br>Here is content of my persistence.xml file:<br></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;persistence version="2.0"
      xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"&gt;
      &lt;persistence-unit name="SomeApp"&gt;
          &lt;provider&gt;org.hibernate.ejb.HibernatePersistence&lt;/provider&gt;
          &lt;properties&gt;
              &lt;property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver" /&gt;
              &lt;property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/somedb" /&gt;
              &lt;property name="hibernate.connection.username" value="" /&gt;
              &lt;property name="hibernate.connection.password" value="" /&gt;
              &lt;property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5Dialect" /&gt;
          &lt;/properties&gt;
      &lt;/persistence-unit&gt;
  &lt;/persistence&gt;
  </code></pre>