<?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 Re: How to get ServiceRegistry from a static method?? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/how-to-get-serviceregistry-from-a-static-method/m-p/229172#M182302</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;if you have a FacesContext instance "fc", do&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;serviceRegistry = Repository.getServiceRegistry(fc);&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;But the better way would be to inject #{serviceRegistry} via Spring. Why coundn't you get it work ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jul 2009 10:21:57 GMT</pubDate>
    <dc:creator>jayjayecl</dc:creator>
    <dc:date>2009-07-15T10:21:57Z</dc:date>
    <item>
      <title>How to get ServiceRegistry from a static method??</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-get-serviceregistry-from-a-static-method/m-p/229171#M182301</link>
      <description>Hello,I need to access some foundation services (NodeService) from a static method in a Java class. How can I do it?? I can't find a way to do Spring dependency injection and access that "injected" bean from a static method.How can I do it?? Thanks.</description>
      <pubDate>Tue, 14 Jul 2009 18:01:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-get-serviceregistry-from-a-static-method/m-p/229171#M182301</guid>
      <dc:creator>eolith</dc:creator>
      <dc:date>2009-07-14T18:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to get ServiceRegistry from a static method??</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-get-serviceregistry-from-a-static-method/m-p/229172#M182302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;if you have a FacesContext instance "fc", do&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;serviceRegistry = Repository.getServiceRegistry(fc);&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;But the better way would be to inject #{serviceRegistry} via Spring. Why coundn't you get it work ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jul 2009 10:21:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-get-serviceregistry-from-a-static-method/m-p/229172#M182302</guid>
      <dc:creator>jayjayecl</dc:creator>
      <dc:date>2009-07-15T10:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to get ServiceRegistry from a static method??</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/how-to-get-serviceregistry-from-a-static-method/m-p/229173#M182303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You could technically inject a springbean on a static attribute (where the "regular" setMyService(MyService) sets the "static" MyService attribute). You have to ensure that your static method gets called after the spring dependency injection takes place obviously &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>Wed, 15 Jul 2009 14:31:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/how-to-get-serviceregistry-from-a-static-method/m-p/229173#M182303</guid>
      <dc:creator>rogier_oudshoor</dc:creator>
      <dc:date>2009-07-15T14:31:13Z</dc:date>
    </item>
  </channel>
</rss>

