-->
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: Enable hibernate show sql="true" without restarting the serv
PostPosted: Wed Nov 20, 2013 5:09 am 
Newbie

Joined: Wed Nov 20, 2013 5:00 am
Posts: 1
I want to enable hibernate sequel =true without restarting my server.

generally we go to properties file and make "hibernate.show_sql", "true"
and to reflect this change we need to restart the server .


I want to do this without restarting the server.

Please let me know how can we do this


Top
 Profile  
 
 Post subject: Re: Enable hibernate show sql="true" without restarting the serv
PostPosted: Wed Nov 20, 2013 11:40 am 
Hibernate Team
Hibernate Team

Joined: Sat Jan 24, 2009 12:46 pm
Posts: 388
Hi,

There is no direct support out of the box, but you can do so by obtaining JdbcServices from the service registry (see [1] for details) and turn logging to System.out on/off via setLogToStdout() on the associated SqlStatementLogger. You could then expose this functionality as JMX service, REST API or whatever suits best with your means of application management.

Hth,

--Gunnar

[1] https://github.com/hibernate/hibernate-orm/blob/master/documentation/src/main/asciidoc/topical/registries/ServiceRegistries.adoc

_________________
Visit my blog at http://musingsofaprogrammingaddict.blogspot.com/


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.