-->
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.  [ 3 posts ] 
Author Message
 Post subject: how to sovle this problem
PostPosted: Mon Aug 09, 2010 1:24 am 
Newbie

Joined: Mon Aug 09, 2010 1:15 am
Posts: 2
We have develop a system based B/S,this system is developed based upon hibernte3.0 and struts1.2 framework, Now, Customer require that each user operate relate sql should loged into database,table structure is sqllog(userid,username,operatetype,sqltext,logdate),
I want to know how to implement this requirement?
thank you....


Top
 Profile  
 
 Post subject: Re: how to sovle this problem
PostPosted: Mon Aug 09, 2010 4:04 am 
Regular
Regular

Joined: Fri Aug 06, 2010 1:49 am
Posts: 102
Location: shynate26@gmail.com
Hello songy,

Assuming your project has a framework . Write a method in a Utility file, which wraps the session and calls the query. This method looks like,

public methodQuery(String s){
...save the query withtimestamp before calling or after calling the query....
}

Logging the query , only for HQL , SQL queries or even the hibernate generated queires,when it is fired when accessing a new object ?

Hope this helps.

_________________

Cheers!
Shynate
mailto:shynate26@gmail.com
www.CSSCORP.com


Top
 Profile  
 
 Post subject: Re: how to sovle this problem
PostPosted: Mon Aug 09, 2010 8:47 am 
Newbie

Joined: Mon Aug 09, 2010 1:15 am
Posts: 2
shynate26 wrote:
Hello songy,

Assuming your project has a framework . Write a method in a Utility file, which wraps the session and calls the query. This method looks like,

public methodQuery(String s){
...save the query withtimestamp before calling or after calling the query....
}

Logging the query , only for HQL , SQL queries or even the hibernate generated queires,when it is fired when accessing a new object ?

Hope this helps.

thank you for you advise,can you tell me details??


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