Miku,
I am having a hard time understanding your question.
Are you asking why it takes so long for some hibernate and spring code to complete and send back an HTTP response?
If this is the case it is a difficult question to answer. Especially without a description of what you are trying to achieve or some example code.
Some hibernate operations can take a long time - especially non optimized insertion of new data into a database.
You can try running the hibernate code in another
thread and return an HTML page that refreshes and displays the progress in the other thread.
This is not a simple undertaking though and covers a lot of different subjects (here is a selection):
TaskExecutor
PlatformTransactionManager
TransactionTemplates and callbacks.
HTML refresh meta data.