Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
  • For our simple tasklist tool we will use the simple method of accessing hibernate inside Sakai
    We will create a Hibernate SessionFactory from the Sakai SessionFactoryBase using our Task.hbm.xml file
  • The full path to our HBM file is: org/sakaiproject/tool/tasklist/hibernate/Task.hbm.xml
  • The tasklist manager impl is: org.sakaiproject.tool.tasklist.impl.TaskListManagerDaoImpl
  • The tasklist manager bean id should be: org.sakaiproject.tool.tasklist.api.TaskListManagerDao


  1. All changes should be made to the tasklist spring configuration file (tasklist/tool/src/webapp/WEB-INF/spring-beans.xml)
    Include Page
    BOOT:Creating sessions from the Sakai SessionFactoryBase
    BOOT:Creating sessions from the Sakai SessionFactoryBase
  2. Tie in the new Manager to the Service
    • Add the new manager bean and comment out the memory implementation
      Code Block
      xml
      xml
      
      <bean id="org_sakaiproject_tool_tasklist_api_TaskListService"
      	class="org.sakaiproject.tool.tasklist.impl.TaskListServiceImpl"
      	singleton="true">
      	<property name="taskListManager">
      		<ref bean="org.sakaiproject.tool.tasklist.api.TaskListManagerDao" />
      <!--		<ref bean="org.sakaiproject.tool.tasklist.api.TaskListManagerMemory" />-->
      	</property>
      	<property name="toolManager">
      		<ref bean="org.sakaiproject.tool.api.ToolManager" />
      	</property>
      	<property name="userDirectoryService">
      		<ref bean="org.sakaiproject.user.api.UserDirectoryService" />
      	</property>
      </bean>
      
  3. The completed spring configuration file for the tasklist tool is available