• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

JPA Example

 
Ranch Hand
Posts: 393
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I was trying JPA Example on stand alone java.

<?xml version="1.0" encoding="UTF-8"?>
<persistence>
<persistence-unit name="employee">
</persistence-unit>
</persistence>

I successfully executed the example through container.
How would one give connection details through persitence.xml. I am using my sql.

SHASHANK
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Shashank Tilwalli:
Hi,
I was trying JPA Example on stand alone java.

<?xml version="1.0" encoding="UTF-8"?>
<persistence>
<persistence-unit name="employee">
</persistence-unit>
</persistence>

I successfully executed the example through container.
How would one give connection details through persitence.xml. I am using my sql.

SHASHANK



So I would highly recommend using a good tutorial online or buying a good book on JPA or reading the JPA spec. In those they will cover the persistence.xml right in the very beginning.

For books I recommend two.

Java Persistence with Hibernate from Manning Press
http://www.manning.com/bauer2/
and
Pro EJB3 http://www.apress.com/book/view/1590596455

Mark
 
reply
    Bookmark Topic Watch Topic
  • New Topic