Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

a note on chapter 6's applicationManagedSE

Himai Minh
Ranch Hand
Posts: 1398
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As a friendly reminder, if you are using MySQL database, you need to include mysql-connector-java-xxx-bin.jar
where xxx is the latest version, in the build path.

My persistence.xml is:

<persistence version="2.1" xmlns="" xmlns:xsi="" xsi:schemaLocation="">
<persistence-unit name="EmployeeService" transaction-type="RESOURCE_LOCAL">
           <property name ="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/>
        <property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/applicationManagedSE"/>
        <property name="javax.persistence.jdbc.user" value="user" />
        <property name="javax.persistence.jdbc.password" value="password"/>

You don't need jta-data-source node.

Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!