Raible's Wiki

Raible Designs
Wiki Home
News
Recent Changes

AppFuse

Homepage
  - Korean
  - Chinese
  - Italian
  - Japanese

QuickStart Guide
  - Chinese
  - French
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish
  - Japanese

User Guide
  - Korean
  - Chinese

Tutorials
  - Chinese
  - German
  - Italian
  - Korean
  - Portuguese
  - Spanish

FAQ
  - Korean

Latest Downloads

Other Applications

Struts Resume
Security Example
Struts Menu

Set your name in
UserPreferences


Referenced by
AppFuse
AppFuse_it
AppFuse_jp
AppFuse_zh
Downloads
LeftMenu
Main
StrutsResumeSupport




JSPWiki v2.2.33

[RSS]


Hide Menu

AppFuseSupport


Difference between version 74 and version 73:

At line 100 added 2 lines.
* How do I get hold of the Hibernate session?
;:''The DAO layer has the Hibernate sessionFactory injected (made available) to them due to the entry in applicationContext-hibernate.xml:
At line 103 added 16 lines.
{{{
<property name="sessionFactory"><ref local="sessionFactory"/></property>
}}}
So to access the Hibernate session from within your DAO, place a method like this in your DAO:
{{{
public Session getHibernateSession() {
return SessionFactoryUtils.getSession(getSessionFactory(), false);
}
}}}
You could even expose this method through your DAO interface so your 'View' layer can gain access to the session
also.

Back to AppFuseSupport, or to the Page History.