Refresh Your Java - Before Java Interview
We are Agile, believe in less Documentation - Only Quick notes (Java Interview Questions) of Java/J2ee Read more....
Hibernate stongly recomand not use
"session-per-operation antipattern",
meaning do
not open a new Session per each operation in
a Business Transaction.
Please use the most common
pattern in a multi-user client/server application is
session-per-request. A new Hibernate Session is opened, and all
database operations are
executed in this unit of
work.
Hibernate provides built-in management of the
"current session" to simplify this
pattern.
Start a transaction when a server request has
to be processed, and end the transaction before
the
response is sent to the client. Common solutions are
ServletFilter, AOP interceptor with
a pointcut on the
service methods, or a proxy/interception container.
Other best way is to get the "HiberanteSession and store in Thread
Local" and fetch from Thread
local
before open a new Session for any given Request.
This Portal is intended to put all Java/J2ee related topics at one single place for quick referance, not only Technical , but also the Project Management Related thing such as Development Process methodoogies build process, unit testing etc.,
This Portal has More than 500 Java Interview Questions (also could be Considered as Quick Notes) very neatly separated topic by topic with simple diagrams which makes you easily understandable. Importantly these are from our Realtime expericance.