<?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: Newbie sandbox deployment question in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/newbie-sandbox-deployment-question/m-p/122258#M86097</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You're welcome.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Exactly what is it you're trying to do?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Most of the time, when people are curious about this stuff&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;it's because they either have a webapp that uses getRealPath()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;or they want to use Apache2 in addition to tomcat&amp;nbsp; &amp;amp; want to know&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the best place to do a CIFS mount&amp;nbsp; – the answer there is simple:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;make the CIFS mount point match where ever you said it was going to be&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;in $VIRTUAL_TOMCAT_HOME/conf/alfresco-virtserver.properties&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;On the other hand, if you were just curious, that's fine too.&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;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Oct 2007 19:39:12 GMT</pubDate>
    <dc:creator>jcox</dc:creator>
    <dc:date>2007-10-22T19:39:12Z</dc:date>
    <item>
      <title>Newbie sandbox deployment question</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/newbie-sandbox-deployment-question/m-p/122255#M86094</link>
      <description>Hiya,I have worked my way through the WCM eval guide and managed to get pretty much everything working. I now want to dig a bit deeper to see how WCM actually works.When a user previews a website in their sandbox where are the actual physical files kept that Tomcat serves up? I can see that there ar</description>
      <pubDate>Thu, 11 Oct 2007 09:57:44 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/newbie-sandbox-deployment-question/m-p/122255#M86094</guid>
      <dc:creator>stevew</dc:creator>
      <dc:date>2007-10-11T09:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: Newbie sandbox deployment question</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/newbie-sandbox-deployment-question/m-p/122256#M86095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Steve,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You're missing something rather non-obvious!&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;SPAN&gt;The short answer is:&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;"The tomcat virtualization server is accessing files via a JNDI/AVMRemote binding"&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's a more detailed answer:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Internally, Tomcat&amp;nbsp; fetches&amp;nbsp; "resources from the file system" via an&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;abstract interface called&amp;nbsp; "JNDI"&amp;nbsp; (Java Naming and Directory Interface).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;JNDI is geared towards accessing "resources" in a hierarchy,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;but says as neutral as possible about what those "resources"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;actually are.&amp;nbsp;&amp;nbsp; It's possible to write a JNDI binding that reaches&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;into&amp;nbsp; LDAP, a file system, zip files, etc.&amp;nbsp;&amp;nbsp; This allows application&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;code (e.g.: Tomcat) to use a consistent interface for accessing&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;very different sources of data.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This design allows Tomcat to fetch information from normal files&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;in a file system, or directly from .war files (which are compressed)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;by using different JNDI bindings.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To answer your question: "Where are the files?",&amp;nbsp; answer is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;"Typically, they're accessed via AVMRemote via a custom JNDI binding".&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In other words, they're not present in the virt server's 'work' dir at all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;for the most part.&amp;nbsp; There are a small number of places where the&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;virt server is forced to make local copies of things, but this is kept&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;to an absolute minimum for efficiency &amp;amp; scalability reasons&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(e.g.:&amp;nbsp; the .jar files in staging must be copied locally).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There are a lot of things about the servlet spec &amp;amp; Tomcat that could have&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;been a lot better&amp;nbsp; (e.g.:&amp;nbsp; even the Valve comes a bit too late in request&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;processing… and the spec itself only has Filter, which comes &lt;/SPAN&gt;&lt;EM&gt;much&lt;/EM&gt;&lt;SPAN&gt; too late),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;but the design decision to use JNDI rather than direct access was an&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;extremely good one.&amp;nbsp;&amp;nbsp; By writing a JNDI binding for AVMRemote,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I was able to allow Tomcat to fetch data from the AVM without requiring&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;a AVM CIFS mount to be present on the virt server box.&amp;nbsp;&amp;nbsp; It also let me&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;take advantage of the much richer AVMRemote API.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That said, if your webapp &lt;/SPAN&gt;&lt;EM&gt;itself &lt;/EM&gt;&lt;SPAN&gt;accesses a "file system"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;via depreciated servlet methods like getRealPath(),&amp;nbsp; or if you&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;also have an Apache2 instance pointing at "the files", then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;clearly you need the AVM CIFS mount on the virt server machine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If this is the case, then then everything that can be accessed via&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the JNDI/AVMRemote binding will still be done that way, but if&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;you've got application-level code that really wants to see "a file",&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the CIFS mount gives you that.&amp;nbsp;&amp;nbsp; How you ask?&amp;nbsp;&amp;nbsp; Well… because&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the JNDI naming scheme used by the virt server was designed&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;to line-up with the AVM file system projection used by our&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CIFS projection.&amp;nbsp; Thus,&amp;nbsp; getRealPath()&amp;nbsp; returns a "file name"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;that's actually real if you've mounted CIFS in the place you've&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;declared via the attribute:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;alfresco.virtserver.cifs.avm.versiontree.win=…&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;or &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;alfresco.virtserver.cifs.avm.versiontree.unix=…&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;SPAN&gt;within&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;$VIRTUAL_TOMCAT_HOME/conf/alfresco-virtserver.properties&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;The virtualization server is also playing a lot of games when it comes&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;to transparent overlays, classloaders, area-specific filters, JMX, &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;and so on, but I think getting into that stuff would be better done &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;in a whitepaper (one of these days!).&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope the "terse" and/or "more detailed" answers were helpful.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the great question.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -Jon&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;PS: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For a quick primer on JNDI see:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://www.javaworld.com/javaworld/jw-01-2000/jw-01-howto.html" rel="nofollow noopener noreferrer"&gt;http://www.javaworld.com/javaworld/jw-01-2000/jw-01-howto.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Oct 2007 15:51:03 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/newbie-sandbox-deployment-question/m-p/122256#M86095</guid>
      <dc:creator>jcox</dc:creator>
      <dc:date>2007-10-17T15:51:03Z</dc:date>
    </item>
    <item>
      <title>Re: Newbie sandbox deployment question</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/newbie-sandbox-deployment-question/m-p/122257#M86096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hiya,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks a lot for the reply. Guess I need to brush up on JNDI/AVMRemote bindings…&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Ta,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2007 10:15:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/newbie-sandbox-deployment-question/m-p/122257#M86096</guid>
      <dc:creator>stevew</dc:creator>
      <dc:date>2007-10-22T10:15:57Z</dc:date>
    </item>
    <item>
      <title>Re: Newbie sandbox deployment question</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/newbie-sandbox-deployment-question/m-p/122258#M86097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You're welcome.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Exactly what is it you're trying to do?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Most of the time, when people are curious about this stuff&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;it's because they either have a webapp that uses getRealPath()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;or they want to use Apache2 in addition to tomcat&amp;nbsp; &amp;amp; want to know&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the best place to do a CIFS mount&amp;nbsp; – the answer there is simple:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;make the CIFS mount point match where ever you said it was going to be&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;in $VIRTUAL_TOMCAT_HOME/conf/alfresco-virtserver.properties&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;On the other hand, if you were just curious, that's fine too.&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2007 19:39:12 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/newbie-sandbox-deployment-question/m-p/122258#M86097</guid>
      <dc:creator>jcox</dc:creator>
      <dc:date>2007-10-22T19:39:12Z</dc:date>
    </item>
  </channel>
</rss>

