Sameera Abeysekara Gunawardena wrote:I am doing this functions appropriately.I have no idea about how to execute procedure sp_who ?
Can you tell how is this same code work fine with other database
Thanks
Sameera
I executed sp_who procedure and i checked the result.there is "awaiting commands" ,but when i delete command executed the state change to the DELETE but still hang the application.
How is release this shared lock in hibernate?
And were any of these blocking other threads? (sp_who will tell you this too)
You can't explicitly. If this is a blocking problem (did sp_who report any blocked threads?) then it is a database issue probably cause by unresolved transactions (though there could be other casues).
Do you commit or rollback every transaction?
I checked the locking states using sp_who but still there is "awaiting command" state . Can we set default locking
method using connection URL or manually.
Can we set default locking method using connection URL or manually.
Do you have any thread in there reported as blocked? If you are not sure can you post the output from sp_who?
If you have a blocking problem this will be caused almost certainly by your code, so its much better to fix your code than workround your bug by tinkering with the database.
I added commit statement after every transactions bit still occurring same problem.
If how ever how can this same code work with other DataBase?
its not a good idea to connect normally as sa, since sa would never be used in a production system and sa will behave differently than all other users
...and this is always run? Even if there is an exception or error raised?
Can we see the code involved in this too?
Is the schema identical?
Whatever "works" is, does it have associations? Are they populated? Are they defiend with cascade deletes?
No i connected through the user not default one(i mean not sa).
...and this is always run? Even if there is an exception or error raised?
Yes schema is identical.
You are connected as sa according to the output you posted above.
I mean is every transaction commited or rolled back. Not the transaction round the code you are focused on now since this is where the trouble is but other code that uses the same tables.
Same indices? All the statistics up to date? Same data?
Any triggers involved?
No sure i am connected through the user(wstest).
I never close the session because i accessed database object in my JSP pages
Do you want hibernate configuration file other thing?
So you open one session (?) and all users of your application share this session instance?
So you are configuring a new session factory every time you request a new session?
Yes i configured new session every time.
So you open one session (?) and all users of your application share this session instance?
You know it is dark times when the trees riot. I think this tiny ad is their leader:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|