cancel
Showing results for 
Search instead for 
Did you mean: 

Hibernate session

masofcon
Champ in-the-making
Champ in-the-making
Hello all.

I am developing my own model and I need to get hibernate session. How can I do this ?

thanks.
2 REPLIES 2

cheffilet
Champ in-the-making
Champ in-the-making

public class YourDaoClassImpl extends HibernateDaoSupport implements YourDaoClass {
  public List getCoolStuff(){
    return getHibernateTemplate().createQuery("from CoolClass").list();
  }
}
Following code should be added - for instance - to your custom-repository-context.xml or something else that can be found at this location: tomcat/shared/classes/alfresco/extension

<!– Note: You should add Proxy-based Transaction-Support (Interceptor>
<bean id="yourDaoClass" class="classpath.YourDaoClassImpl ">
   <property name="sessionFactory" ref="sessionFactory" />
</bean>

liquidroofs
Champ in-the-making
Champ in-the-making
First of all you need to get proxy updated system, and install it in the pc, but you didnt tell me how many systems you want to run on one proxy so that i can give you the exact formula for that, you can save you all data through this system but system must be updated, so tell me the exactly figure so that i can suggest you better.