[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Re: Acces Configuration/Persistent Class at run time for rea

matt10 do-not-reply at jboss.com
Thu Oct 9 05:38:50 EDT 2008


In a JBoss EJB3 environment I've never found a way to access the hibernate Configuration object or the metadata it contains e.g. PersistentClass.

To my knowledge, this is available at startup time only, and JBoss doesn't provide any access to it.

After initialization (at runtime), JBoss/Hibernate seems to provide another type of object for class metadata that implements the interfaces ClassMetadata and EntityPersister instead.

The constructor for this object takes PersistentClass as input internally.

AbstractEntityPersister(PersistentClass persistentClass, CacheConcurrencyStrategy cache, SessionFactoryImplementor factory) 
  | 

I did read in a JIRA bug report somebody requested access to the Configuration object from a Web app and the bug was resolved after some coding; but I never figured out how to apply this to a normal EJB3 app.

Matt

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4181187#4181187

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4181187



More information about the jboss-user mailing list