Reputation: 241
I am currently starting on a java EE project on netbeans8.0, glassfish 4.0 server and using mySQL. Everytime when I redeploy my project, the data in mySQL database was cleared, and it seems that my tables are dropped and created everytime i re-deploy or run the project. Is it got to do with my persistence unit, JDBC connection pool and resources?Any idea how I can preserve the data in my database, even after redeploying?
Upvotes: 0
Views: 228
Reputation: 1139
Check your persistence unit? What is your table generation strategy? It should be Create and not Drop and Create.
Upvotes: 1