I am creating javafx desktop application and javaee application. They will be almost same in functionality. Both applications needs to have its own sql database, but the databases will have same structure (same tables).
I am using Eclipse IDE and what i have done so far is this:
- One project for javafx application
- One project for javaee application
- One project for data layer (jpa)
I am also using module-info.java. For javafx and javaee project i have defined required package to be my data layer project.
I have found here: JPA and EJB - When do I need to use transaction?, that i should use transactions when working with Java SE, which my javafx app actually is, but not when my application is javaee. I do not want to write jpa project for each application. How to create/set up projects properly, so that each of my applications will have separate, but same database?