These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: Access the Configuration from JMX ?
PostPosted: Tue Feb 15, 2005 11:31 am 
Beginner
Beginner

Joined: Mon Jun 21, 2004 2:41 pm
Posts: 40
Hibernate version: 2.1.7c

Our application deploys Hibernate in a JMX MBean on JBoss and retrieves the SessionFactory using JNDI. Becuase of this the application does not have access the Configuration object.

Is there a way to get the Configuration object through the SessionFactory?

I need to have a way to look up the metadata in the hibernate files (*.hbm.xml) and also to programatically convert from the Hibernate table name to the actual database table name (and reverse).

I know that we could instanciate a Configuration object with the jboss-service.xml (MBean) descriptor or the hibernate.cfg.xml file but that information is not deployed with the application since we are using a MBean.

Suggestions?

Thank you,
David Wilson


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 21, 2005 3:09 pm 
Beginner
Beginner

Joined: Mon Jun 21, 2004 2:41 pm
Posts: 40
bump

Has no one else had this delima where the Hibernate service is deployed seperately and the end developers/programmers do not have access to the hibernate.cfg.xml file since it was seperately deployed as a MBean (jboss-service.xml)?

-David


Top
 Profile  
 
 Post subject: Have you resolved it?
PostPosted: Thu Mar 10, 2005 1:40 pm 
Beginner
Beginner

Joined: Tue Sep 21, 2004 1:49 pm
Posts: 33
Location: Bogota, Colombia
Hi, I'm having the same problem, I need to look into the metadata defined in the mapping XMLs, but the sessionFactory is an MBean..

Did you find a solution? thx!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 10, 2005 2:15 pm 
Beginner
Beginner

Joined: Mon Jun 21, 2004 2:41 pm
Posts: 40
No I have not found a solution nor has anyone told me of one.

I am surprised that no one else has ran into this delima.
:(

Perhaps it is time to put a requist this to be implemented?

-David


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 11, 2005 5:35 pm 
Beginner
Beginner

Joined: Tue Sep 21, 2004 1:49 pm
Posts: 33
Location: Bogota, Colombia
I decided to include the mappings and the hibernate.properties file into the war.. then when the SessionFactory class gets called for a session, I create and store the configuration object (static), obviously without creating (again) the sessionFactory.

Looks not so clean, but it works :P


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.