am a new bee to Hibernate.. When starting itself I got strucked at session Issue..
when I open session in this way , while closing the session and if I use in this way , seesion closed quitely..
what's the difference between current session and opensession
Current session is the session associated with the current JTA transaction. If you have configured Hibernate to use a Session per transaction this is the method to use. The session will close when the transaction commits.
Which suits your needs better? JTA might be a big overhead for your application, but grouping session usage into one business transaction might may be more efficient (since it will use the first level cache better).