Hello All.<br><br>I have a strange problem when i am using cmsObject.getFilesInFolder().<br><br>I have OpenCms Version 6.2.3 deployed in Jboss4.2.0GA<br><br><br>My Test Case:-<br><br>I have my MyBeanLoader as i using spring and opencms.<br>
<br><br>MyOperations myOperations = null;<br>public void testOpencms()<br>    {<br>        myOperations = (MyOperations) MyBeanLoader.getInstance("MyOperations<b></b>");<br>        while(true){<br>            try {<br>
              // Gets the  list of files from resource.<br><br>                Vector<CmsFile> documentsize = myOperations .getDocumentsFromFolder("MyResource");<br>                System.out.println("Document::"+documentsize .size());<br>
<br>                // Checks for the existence of resource.<br><br>                boolean checkExistsDocument = myOperations .existsDocument("abc","MyResource");<br>                System.out.println("checkExistsDocument::"+checkExistsDocument);<br>
        <br>                // Gets the document<br><br>                byte[] document = myOperations .getDocument("abc","MyResource");<br>                System.out.println("document ::"+document );<br>
                Thread.sleep(10000);<br>            } catch (InterruptedException e) {<br>                // TODO Auto-generated catch block<br>                e.printStackTrace();<br>            }<br><br>}<br><br>MyOperations  is wrapper for CmsObject and the above api's <b>getDocumentsFromFolder will call getFilesInFolder of CmsObject</b>,<br>
<b>getDocument will call</b><b> </b><b>  readFile</b><b> of CmsObject,</b><b>existsDocument will call existsResource </b><b>of CmsObject.<br></b><br>when i run the test case  i will not be having "<b>abc</b>" file in <b>"MyResource"</b> folder.<br>
<br>So the output which i get <br><br><b>Document::</b>" 0<br><b>checkExistsDocument::</b>false<br><b>document </b>::null<br><br>After some execution i create "<b>abc</b>" file in <b>"MyResource"</b> folder from my other appilication .<br>
<br>So the output which i get is <br><br><b>Document::</b>" 0<br><b>checkExistsDocument::</b>true<br>
<b>document </b>::@fgdfgdfh<br><br>i am not able to find why it gives 0 size. <b>i think may be its is returning the size from cache</b> <br><br>But if i  do OpenCms.initCmsObject every time i get the proper count.Why???<br>
<br>Can u help me why.<br><br>Regards<br>Govind R <br><b><br></b>