• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JPA for ORM and JDBC for authentication in SpringMVC/REST?

 
Ranch Hand
Posts: 428
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm using eclipse and maven for a spring MVC/REST controller/Spring JPA.

The JDBC for the basic authentication needs a persistence.xml to access the MySQL database to compare user names and passwords.

The JPA for the ORM needs a persistence.xml too. How does this work? Can they both use the same copy of persistence.xml?

Presently I have two copies of the same file and it was working with eclipse/tomcat (but something changed and now I am getting errors creating the JPA entity framework manager factory).

(1) ./Guestbook/src/main/resources/META-INF/persistence.xml
(2) ./Guestbook/src/main/webapp/WEB-INF/classes/META-INF/persistence.xml

Where is this file suppose to reside? Do I need two copies in different directories?


Thanks
Siegfried


 
Rancher
Posts: 2759
32
Eclipse IDE Spring Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How did you configure your spring xml?. Do you have the data source declared in your spring xml? You can just use the data source directly for JDBC
 
I once met a man from Nantucket. He had a tiny ad
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic