Slow schema update generation for Oracle with update in Hibernate with JBoss EAP 5

Solution Verified - Updated -

Issue

  • User is using AnnotationConfiguration to generate oracle sql schema statement.The reason for the high time (at least 11 minutes on some DB istance) to compute is that oracle execute for each table mapped from hibernate a query. Is there any way to overwrite the query done by hibernate package?
  • The snippet of code doing it is like the following:
Ejb3Configuration ejb3Configuration = new Ejb3Configuration();

AnnotationConfiguration config = ejb3Configuration.getHibernateConfiguration();

ejb3Configuration.configure(selectedDb.name(), configOverrides);


//Enable envers
AuditConfiguration.getFor(config);
String[] createSQL = config.generateSchemaUpdateScript(dialect, databaseMetadata);
  • This issue is occurred with oracle database having many schema

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 5.2.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content