<?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 Two J2EE application on same repository !! in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/two-j2ee-application-on-same-repository/m-p/226568#M179698</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I develop an J2EE application. This application has its own business.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This application can call Alfresco Repository (use of all needed repository services access via &lt;/SPAN&gt;&lt;STRONG&gt;JARs&lt;/STRONG&gt;&lt;SPAN&gt;). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;All is well configured (custom XML files (db connection links and type, specification of the 'alf_data' folder, etc…), custom Model, etc..). &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I use Alfresco in a Tomcat, in order to have like an 'administrative' application (to manage space, contents, etc… as an administrative way). The Alfresco native Web interface is perfect for this &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;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In my stand-alone 3-tiers application, I developped some personal services (my own business). &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Theses services call sometimes Alfresco services (SearchService, NodeService,etc…): These Alfresco services are injected by my Spring during the start of my Tomcat server.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I start servers, all is fine:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;==&amp;gt; Alfresco is runnig on the localhost:8080/alfresco &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;==&amp;gt; My Application is runing on the localhost:8082/myApplication ( Alfresco context is also loaded via Spring, and Alfresco services are found and well injected into my own services.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;==&amp;gt; Both application are running in the same time: No problem with that. The both application are link to the same 'alf_data' folder , and use the same database&amp;nbsp; &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;BR /&gt;&lt;SPAN&gt;All works fine: I can call my services, and get GOOD result from Alfresco respository…&amp;nbsp; &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;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;BUT I HAVE A PROBLEM CONCERNING DATA RENDER BY ALFRESCO SERVICES (in my application I mean) WHEN A CONTENT IS CHANGED IN ALFRESCO APPLICATION WEB INTERFACE ! (and Vice-versa !)&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="text-decoration: underline;"&gt;Example of Test process: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- MyApplication (on localhost:8082/myApplication): I Call myCustomSearchService =&amp;gt; this call Alfresco SearchService, in order to get one content named "myFile.txt" in a special Space: I get the node &lt;/SPAN&gt;&lt;STRONG&gt;(OK) &lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp; &lt;img id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://connect.hyland.com/i/smilies/16x16_smiley-very-happy.png" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Alfresco Web interface (on localhost:8080/alfresco): I modify the name of "myFile.txt" into "myNewFile.txt" &lt;/SPAN&gt;&lt;STRONG&gt;(OK) &lt;/STRONG&gt;&lt;SPAN&gt; &lt;img id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://connect.hyland.com/i/smilies/16x16_smiley-very-happy.png" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- MyApplication: I RECall myCustomSearchService =&amp;gt; this call Alfresco SearchService, in order to get one content named "myFile.txt" in a special Space (&lt;/SPAN&gt;&lt;STRONG&gt;THIS MUST RETURN NULL because the file don't exist anymore&lt;/STRONG&gt;&lt;SPAN&gt;: the name was changed), But I get the node !! ==&amp;gt; &lt;/SPAN&gt;&lt;STRONG&gt;This is NOT OK !!&lt;/STRONG&gt;&lt;SPAN&gt; &lt;img id="smileyindifferent" class="emoticon emoticon-smileyindifferent" src="https://connect.hyland.com/i/smilies/16x16_smiley-indifferent.png" alt="Smiley Indifferent" title="Smiley Indifferent" /&gt;&amp;nbsp;&amp;nbsp; (Because this content/node don't exist anymore !!)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The only solution to get the goo result is to restart Tomcat (localhost:8082) where MyApplication is deployed.&amp;nbsp; &lt;img id="smileysurprised" class="emoticon emoticon-smileysurprised" src="https://connect.hyland.com/i/smilies/16x16_smiley-surprised.png" alt="Smiley Surprised" title="Smiley Surprised" /&gt;ops: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In this case only, changed are noticed, and the searchService (or nodeService) return good result …&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;MyApplication and Alfresco seems to live their own live (transaction problem ?? caching problem (LR2)??)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is strange, because in myApplication, like in Alfresco application, both are accessing to the same database, and the same content alf_data (same indexes) &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope that you are able to help me &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot in advance.&amp;nbsp;&amp;nbsp; &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;BR /&gt;&lt;BR /&gt;&lt;EM&gt;Note: I don't want use Alfresco Web services (personnals reasons &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;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;——————————————&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Alfresco version&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Version of Alfresco: 3.1.0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Operating System: Windows &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Database: MySQL &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Web Application Server: Tomcat &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;- Browser version: IE or Firefox&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Jan 2010 11:33:28 GMT</pubDate>
    <dc:creator>alex54</dc:creator>
    <dc:date>2010-01-11T11:33:28Z</dc:date>
    <item>
      <title>Two J2EE application on same repository !!</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/two-j2ee-application-on-same-repository/m-p/226568#M179698</link>
      <description>Hello,I develop an J2EE application. This application has its own business.This application can call Alfresco Repository (use of all needed repository services access via JARs). All is well configured (custom XML files (db connection links and type, specification of the 'alf_data' folder, etc…), cus</description>
      <pubDate>Mon, 11 Jan 2010 11:33:28 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/two-j2ee-application-on-same-repository/m-p/226568#M179698</guid>
      <dc:creator>alex54</dc:creator>
      <dc:date>2010-01-11T11:33:28Z</dc:date>
    </item>
    <item>
      <title>Re: Two J2EE application on same repository !!</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/two-j2ee-application-on-same-repository/m-p/226569#M179699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;There are lots of caching issues you are going to fall foul of with your current approach.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You will probably need to cluster your two instances of alfresco.&amp;nbsp;&amp;nbsp; And I'm not sure if shared indexes are supported yet, so you may also need to have two separate index instances.&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It would be much better for your J2EE app to use one of Alfresco's remote interfaces rather than trying to run a separate local instance of alfresco.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jan 2010 12:29:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/two-j2ee-application-on-same-repository/m-p/226569#M179699</guid>
      <dc:creator>mrogers</dc:creator>
      <dc:date>2010-01-11T12:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: Two J2EE application on same repository !!</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/two-j2ee-application-on-same-repository/m-p/226570#M179700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks you…&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Concerning the index, I prefer to don't use a double shared instance.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The target of the Alfresco Web interface instance is to have an administrative tool. Any change by this interface must be detected (in the same time !!) by my J2EE application !&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I will continu to search informations concerning the 'cache' issue…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It is strange that nobody else worked with this type of architecture.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For example, a lot of J2EE application dealing with Alfresco (via JCR repository), to the same repository, because all J2EE application must be aware about all data, in the same time…&amp;nbsp; &lt;img id="smileyindifferent" class="emoticon emoticon-smileyindifferent" src="https://connect.hyland.com/i/smilies/16x16_smiley-indifferent.png" alt="Smiley Indifferent" title="Smiley Indifferent" /&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Jan 2010 12:45:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/two-j2ee-application-on-same-repository/m-p/226570#M179700</guid>
      <dc:creator>alex54</dc:creator>
      <dc:date>2010-01-11T12:45:47Z</dc:date>
    </item>
  </channel>
</rss>

