Is it possible to start the HSQLDB Database manager automatically somehow when I´m working in my local dev environment? I´m using the in-memory DB at the moment. I found some code to start the database manager when running test cases. Can this be used when starting a web application as well?
org.hsqldb.util.DatabaseManagerSwing.main(new String[] { "--url","jdbc:hsqldb:mem:moviecollection", "--noexit" });
I am assuming you are using Spring because you tagged your question with it. You could create a Spring bean that has a method that is annotated with the JSR-250 annotation
@PostConstruct. Method annotated with@PostConstructindicates that the method should be invoked after the bean has been created and dependency injection is complete.If you would start the
DatabaseManagerSwingwith a web application it would get created and displayed on the server your WAR is running on which you probably don’t want to do.