[jboss-user] [EJB 3.0] - Re: How to deploy an EJB3 app in production ?
ALRubinger
do-not-reply at jboss.com
Mon Jan 29 16:18:04 EST 2007
Simple usually is. :)
In my environment I'm currently using a little EJB3 JMX Pojo called a "DatabaseBootstrapService". Its responsibility:
* Ensure the necessary schemas exist, and if not, creates 'em
* Ensure the necessary DB users exist, and if not, creates 'em.
* Creates the necessary tables.
* Populates required data for the system to work.
All this is done via execution of SQL Files I place in $JBOSS_HOME/server/[serverName]/sql. In local development and staging environments, HBM2DDL is set to autogen (create-drop for local and update for stage). However, in production, I don't want Hibernate ever mucking with the schema. So I set the Service to fire off the SQL scripts, which are really just preapproved executions of the Hibernate HBM2DDL from the stage environment logs.
...and this is my solution for DB migration between versions as well. Build locally, test on Stage, and once I'm sure that the SQL fired by Hibernate (and any other operations I need to do) are square, I create SQL Scripts for them and fire from the JMX console so I can take advantage of the transaction it provides.
What are some other solutions out there for migration/DB population?
S,
ALR
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008001#4008001
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008001
More information about the jboss-user
mailing list