<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Spring bean is not udating my database in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/spring-bean-is-not-udating-my-database/m-p/144970#M101352</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have an execution listener. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have loaded a spring bean in the listener. I am calling a function on this bean which eventually updates my database.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But the update does not happen. No sql is generated. This bean method works fine when i call it through my web-application.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I understand its related to transactions and that listener is not in the same context as the spring but i dont know how to fix this. Please help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is my listener.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;tkmMgmtService = (TkmMgmtService)context.getBean("tkmMgmtService");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;tkmMgmtService.autoCancelProcess(delegateExecution.getProcessInstanceId());&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Jul 2013 14:15:46 GMT</pubDate>
    <dc:creator>satyakamkaul</dc:creator>
    <dc:date>2013-07-11T14:15:46Z</dc:date>
    <item>
      <title>Spring bean is not udating my database</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/spring-bean-is-not-udating-my-database/m-p/144970#M101352</link>
      <description>I have an execution listener. I have loaded a spring bean in the listener. I am calling a function on this bean which eventually updates my database.But the update does not happen. No sql is generated. This bean method works fine when i call it through my web-application.I understand its related to</description>
      <pubDate>Thu, 11 Jul 2013 14:15:46 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/spring-bean-is-not-udating-my-database/m-p/144970#M101352</guid>
      <dc:creator>satyakamkaul</dc:creator>
      <dc:date>2013-07-11T14:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: Spring bean is not udating my database</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/spring-bean-is-not-udating-my-database/m-p/144971#M101353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You are creating a new Spring context in the listener? That is definitely not a good thing to do …&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You need to make the listener a spring bean, and mark it to be @Transactional.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jul 2013 07:28:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/spring-bean-is-not-udating-my-database/m-p/144971#M101353</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2013-07-12T07:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: Spring bean is not udating my database</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/spring-bean-is-not-udating-my-database/m-p/144972#M101354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have declared the listener as a bean in activiti.cfg.xml&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;and now I am getting my service&amp;nbsp; bean from the processengine&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;tkmMgmtService = (TkmMgmtService )Context.getProcessEngineConfiguration().getBeans().get("tkmMgmtService");&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Also i have market the bean as @Transactional&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;but still it does not update the database.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;One more thing in the same function i am using runtimeservice to delete the process which is actually updating my activiti database.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But i dont understand why its not updating my non activiti tables&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jul 2013 08:47:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/spring-bean-is-not-udating-my-database/m-p/144972#M101354</guid>
      <dc:creator>satyakamkaul</dc:creator>
      <dc:date>2013-07-12T08:47:57Z</dc:date>
    </item>
    <item>
      <title>Re: Spring bean is not udating my database</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/spring-bean-is-not-udating-my-database/m-p/144973#M101355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;mmm it sounds like something is not right. Could you create a simple unit test demonstrating the problem?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jul 2013 08:16:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/spring-bean-is-not-udating-my-database/m-p/144973#M101355</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2013-07-17T08:16:29Z</dc:date>
    </item>
  </channel>
</rss>

