<?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 Retrieve Spring Bean in CDI environment in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/retrieve-spring-bean-in-cdi-environment/m-p/89994#M61234</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;we have written quite a few spring beans in the past and would like to reuse those in a activiti project. Therefore i declared them in activiti.cfg.xml. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Naively I tried to resolve them using @Named annotation in my backingbean using JBoss AS/Weld. This - as I learned - isn't working out of the box. Now one solution could be to write my own CDI Extension, which would, to my understanding, create a second spring container including processEngine. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So my question now is how can i reuse the processEngine CDI Extension org.activiti.cdi.impl.ActivitiExtension to get access to the spring context. How do other people solve that spring cdi gap?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thx in advance,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Daniel&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Jan 2012 13:07:28 GMT</pubDate>
    <dc:creator>daniel1</dc:creator>
    <dc:date>2012-01-20T13:07:28Z</dc:date>
    <item>
      <title>Retrieve Spring Bean in CDI environment</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/retrieve-spring-bean-in-cdi-environment/m-p/89994#M61234</link>
      <description>Hi,we have written quite a few spring beans in the past and would like to reuse those in a activiti project. Therefore i declared them in activiti.cfg.xml. Naively I tried to resolve them using @Named annotation in my backingbean using JBoss AS/Weld. This - as I learned - isn't working out of the bo</description>
      <pubDate>Fri, 20 Jan 2012 13:07:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/retrieve-spring-bean-in-cdi-environment/m-p/89994#M61234</guid>
      <dc:creator>daniel1</dc:creator>
      <dc:date>2012-01-20T13:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve Spring Bean in CDI environment</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/retrieve-spring-bean-in-cdi-environment/m-p/89995#M61235</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You could check out the jboss seam module:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://docs.jboss.org/seam/3/spring/latest/reference/en-US/html/spring-usage.html" rel="nofollow noopener noreferrer"&gt;http://docs.jboss.org/seam/3/spring/latest/reference/en-US/html/spring-usage.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have no Idea how good it is, though.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 22 Jan 2012 17:47:30 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/retrieve-spring-bean-in-cdi-environment/m-p/89995#M61235</guid>
      <dc:creator>meyerd</dc:creator>
      <dc:date>2012-01-22T17:47:30Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve Spring Bean in CDI environment</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/retrieve-spring-bean-in-cdi-environment/m-p/89996#M61236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thx for the link. With some more tweaking (Spring Securitys AuthenticationManager is not really unique) i got it up and running in my managed beans now.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now my next problem arises: i can't inject my beans in JavaDelegates as beans get constructed by activiti and not by CDI. Is there some way to access&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CDIs BeanManager via Context.getProcessEngineConfiguration().something? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe you have another great link for me? &lt;img id="smileywink" class="emoticon emoticon-smileywink" src="https://connect.hyland.com/i/smilies/16x16_smiley-wink.png" alt="Smiley Wink" title="Smiley Wink" /&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jan 2012 19:06:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/retrieve-spring-bean-in-cdi-environment/m-p/89996#M61236</guid>
      <dc:creator>daniel1</dc:creator>
      <dc:date>2012-01-23T19:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve Spring Bean in CDI environment</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/retrieve-spring-bean-in-cdi-environment/m-p/89997#M61237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi daniel,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can annotate your JavaDelegate classes with @Named:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;@Named &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;public class MyDelegate implements JavaDelegate {&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; public void execute(DelegateExecution ex) throws Exception {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; …&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and in your service task:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;serviceTask … activiti:delegateExpression="myDelegate" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This way the instance of MyDelegae is constructed by the CDI Container and not by activiti and you can use CDI services such as Injection, Interceptors etc….&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2012 07:45:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/retrieve-spring-bean-in-cdi-environment/m-p/89997#M61237</guid>
      <dc:creator>meyerd</dc:creator>
      <dc:date>2012-01-24T07:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve Spring Bean in CDI environment</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/retrieve-spring-bean-in-cdi-environment/m-p/89998#M61238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Daniel,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;great! Really clever to do it that way. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;One addition i do have to your solution:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;serviceTask … activiti:delegateExpression="myDelegate" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;should be&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;serviceTask … activiti:delegateExpression="&lt;/SPAN&gt;&lt;STRONG&gt;#{&lt;/STRONG&gt;&lt;SPAN&gt;myDelegate&lt;/SPAN&gt;&lt;STRONG&gt;}&lt;/STRONG&gt;&lt;SPAN&gt;" /&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks again!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2012 08:40:53 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/retrieve-spring-bean-in-cdi-environment/m-p/89998#M61238</guid>
      <dc:creator>daniel1</dc:creator>
      <dc:date>2012-01-24T08:40:53Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve Spring Bean in CDI environment</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/retrieve-spring-bean-in-cdi-environment/m-p/89999#M61239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;:shock: OMG yes… I should not answer posts before drinking my morning coffee &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jan 2012 08:46:58 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/retrieve-spring-bean-in-cdi-environment/m-p/89999#M61239</guid>
      <dc:creator>meyerd</dc:creator>
      <dc:date>2012-01-24T08:46:58Z</dc:date>
    </item>
  </channel>
</rss>

