0 Replies Latest reply on Jan 17, 2006 2:10 PM by uma_ch

    Exporting generated schema to database is very slow, taking

    uma_ch

      Hi,

      I am new to EJB and JBoss. I installed JBoss 4.0.3RC1 and Jboss-EJB-3.0_RC1. I am learning EJBs programming following the tutorial and samples available in the EJB installation. Also I configured the JBoss to use the sybase database for persistence instead of the default Hypersonic database.
      Following these samples I have written EJB classes to demonstrate the CMP. I have an entity bean class whose properties I am trying to store in the database forever. First time when I deployed the ejb jar and ran the application, I see the table getting created in the database with the rows in the table. Now, I stopped the JBoss server. Then modified the EJB classes to see how the updates to the table schema happens. I modified the entity bean class by adding a new field expecting that now a new column will be added to the database table. Now started the JBoss server and deployed the new ejb jars. At this point I see the server stuck with this message:

      13:17:53,059 INFO [SchemaExport] exporting generated schema to database


      I have waited for almost 45 minutes, but still see in the server.log file the following messages


      2006-01-17 13:17:53,059 INFO [org.hibernate.tool.hbm2ddl.SchemaExport] Running hbm2ddl schema export
      2006-01-17 13:17:53,059 INFO [org.hibernate.tool.hbm2ddl.SchemaExport] exporting generated schema to database
      2006-01-17 13:17:53,059 DEBUG [org.hibernate.tool.hbm2ddl.SchemaExport] drop table USERS_TABLE
      2006-01-17 13:25:19,943 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] run: IdleRemover notifying pools, interval: 450000
      2006-01-17 13:32:49,952 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] run: IdleRemover notifying pools, interval: 450000
      2006-01-17 13:40:19,960 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] run: IdleRemover notifying pools, interval: 450000
      2006-01-17 13:47:49,969 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] run: IdleRemover notifying pools, interval: 450000
      2006-01-17 13:55:19,977 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] run: IdleRemover notifying pools, interval: 450000
      2006-01-17 14:02:49,986 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] run: IdleRemover notifying pools, interval: 450000

      I have run this test several times and each time it is taking really really long time to update the database. So don't know what is happening. Does the schema changes take so long. If so then how to avoid such updates to the table schemas or database changes. Can you please point me to some links where I can learn about the performance of EJBs in relation to persistence.

      Thanks,
      Uma