mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
This gets virtualization partially working using the AVM remote interface.
Courtesy of Jon and Britt. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3523 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -20,7 +20,6 @@ package org.alfresco.repo.avm;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -148,6 +147,7 @@ public class AVMRemoteImpl implements AVMRemote, Runnable
|
|||||||
{
|
{
|
||||||
// Do nothing.
|
// Do nothing.
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
long now = System.currentTimeMillis();
|
long now = System.currentTimeMillis();
|
||||||
List<String> toClose = new ArrayList<String>();
|
List<String> toClose = new ArrayList<String>();
|
||||||
for (String handle : fInputLastAccessTimes.keySet())
|
for (String handle : fInputLastAccessTimes.keySet())
|
||||||
@@ -201,6 +201,7 @@ public class AVMRemoteImpl implements AVMRemote, Runnable
|
|||||||
fOutputLastAccessTimes.remove(handle);
|
fOutputLastAccessTimes.remove(handle);
|
||||||
fOutputBusy.remove(handle);
|
fOutputBusy.remove(handle);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -268,7 +269,7 @@ public class AVMRemoteImpl implements AVMRemote, Runnable
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
int read;
|
int read;
|
||||||
while ((read = in.read(buff, off, count - off)) != -1)
|
while ((read = in.read(buff, off, count - off)) != -1 && read != 0)
|
||||||
{
|
{
|
||||||
off += read;
|
off += read;
|
||||||
}
|
}
|
||||||
|
@@ -103,4 +103,28 @@ public class AVMTestRemote extends TestCase
|
|||||||
fail();
|
fail();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test a call that should throw an exception.
|
||||||
|
*/
|
||||||
|
public void testErrorState()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
fAVMRemote.lookup(-1, "main:/fizz/fazz");
|
||||||
|
fail();
|
||||||
|
}
|
||||||
|
catch (AVMException e)
|
||||||
|
{
|
||||||
|
e.printStackTrace(System.out);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
e.printStackTrace(System.err);
|
||||||
|
fail();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user