I have a Swing project used persistence unit connect to database,and I also have several Entity classes to persist with database tables,information was displayed in a Swing Jtable ,appliation works fine with current database and table.
problems is that I want change database connection property in the persistance.xml file when i started application,can I change the persistence.xml file in my main method or main class constuctor?
another problems is that I also want change the schema in Entity class's Table annotation,sames like I have to change the source code and then recompile the entity class,that sames not realistic,any advice about this?
the thing behind this is tha I want change database information every time application run based on the content presented in another xml file in current folder.
any advices would be preciated!