I have a pretty monstrous Java app in development here. As of now, it's only ever been deployed on my locally installed Tomcat/MySQL setup.
For completeness, the app is an online game server written using Spring, Hibernate with MySQL currently on the backend.
Now, I can easily package up the WAR and get that on the remote server.. The problem is the database. Right now it's generated with an ANT script that uses Hibernate (specifically, the HBM2DDL Ant task) to generate the schema, and then populates the db with a combination of static SQL and a couple of ant-based parsers that read from other data (XML mostly). After that, I have a fully created DB populated with the game servers "starting" data set.
The issue is being a bit green in Java I have no idea what the right way to deploy this is.
Should I:
- Export the SQL from my local MySQL and manually import it on the new server? Eww.
- Make the ANT script less grody (it's got lots of hardcoded directories in it right now) and run it on the server?
- The elegant option I don't know about?
The other complication is that the WAR will be going to different server(s) than the MySQL db will be on. Is there a Java book or web resource that comprehensively addresses these kinds of deployment issues?