-->
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.  [ 2 posts ] 
Author Message
 Post subject: Retrieving current configuration for a session
PostPosted: Tue Jan 12, 2010 2:51 pm 
Newbie

Joined: Wed Dec 23, 2009 12:38 pm
Posts: 14
I have a handle on session instance thru SessionFactory.

I would like to know the settings for this particular session [ Like fetching strategy, hibernate related settings ]

How can I retrieve the same in the programme itself. This will help in debugging.


Top
 Profile  
 
 Post subject: Re: Retrieving current configuration for a session
PostPosted: Wed Jan 13, 2010 3:55 pm 
Senior
Senior

Joined: Mon Jul 07, 2008 4:35 pm
Posts: 141
Location: Berlin
Hi keliveli,

I'm not really sure but I think you can at most get some configuration details from the SessionFactory that created the Session instance but not on the Session itself. A Session is a lightweight thingy and is created by the SessionFactory according to the factory's configuration, i.e., all Sessions created by a given SessionFactory instance share the same configuration that is due to their creator.

You might get some useful information on the org.hibernate.SessionFactory.getStatistics() method but you need to activate the collection of statistical data in your configuration, i.e. when setting up the factory.

CU
Froestel

_________________
Have you tried turning it off and on again? [Roy]


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.