9

I want to create a Java standalone Java application that will use the Apache Derby Embedded DB.

I want to use JPA since I'm quite familiar with it and probably over Hibernate ( but others are welcome if it is to get easier).

Is there any example that uses JPA over Hibernate over a Derby embedded db? I was searching around but I can't find any useful example code. I would like something like a tutorial that will tell which libs I need to add in my classpath, which are the essential files and what I need to do.

ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
Panos
  • 7,227
  • 13
  • 60
  • 95

1 Answers1

2

If you are using Maven for your build, you can use the derby-maven-plugin, which I wrote and is available on GitHub and via Maven Central. It will take care of starting and stopping the database for you before your tests.

You can check:

  • Here for my answer to a similar question
  • Here for a sample REST application which uses Derby and has tests
Community
  • 1
  • 1
carlspring
  • 31,231
  • 29
  • 115
  • 197