I hope I've chosen a right forum for my question. I have an application running on Jboss 4.2.1 GA, with underlying database (Oracle). Each time I start up the Jboss, it updates the DB schema, checking entities, indexes and foreign keys - it's just OK, it has always been so, and usually the whole process of start up takes about one minute. Without any reasonable cause (i.e., without modifying/adding entities), yesterday I tried to start up the Jboss - it took about ten minutes! And the most time was spent on "Updating DB Schema", something like 15-20 sec per table! I thought it is some performance issue with DB, but the previous version of deployment .ear file starts up itself in usual time - about one minute. Once again, there were not much changes in the last deployment, just fixing some bugs in several beans...And, once starting, application works normally in both versions, there are no performance issues. What can affect the start up time so dramatically? I don't like much the idea to start compare source files of current and previous versions, it can be quite nightmare. At least, if no one could explain it, I wonder to know, how can I switch off the database schema updating in Jboss? I've heard something about
hibernate.hbm2ddl.auto property, but I don't know where it is. It will be pretty decent solution, since I don't make many changes in entities, but to wait 10 minutes for each re-deployment - it's too much for development stage.
I'll appreciate every help/hint/explanation.
Eugene Kashin wrote:
hibernate.hbm2ddl.auto property, but I don't know where it is.
If it's hibernate which is updating/creating the schema, then that property will be present in persistence.xml or hibernate.cfg.xml of your application .ear file.
Try use jboss profiler(http://jboss.org/jbossprofiler) - this can give you method level execution times. Set the hotspot time to something like 5 seconds to filter out the methods which are behaving themselves. Hopefully this can give you a breakdown of what your problem method calls are ...
Some of the reasons which I see it as follows.
01>Right version of type4 driver
02>Too many thinkings in static methods or too many calls in init() methods
03>Did you tried trimming of Jboss
04>What JDK you are using
05>what is the max and min connection setting in ora-ds.xml
06>Which version of Hibernate you are using
07>Can you try to start the Jboss without polling to DB, see what is the difference
08>What is the per gen setup you are using
09>Are you using default class loader or you have changed something there
10>Please disable hot deployment if its on
Try these options I am sure you will able to pinpoint the problem.