* [ 1633995 ] AD_Process feature to run locally
This commit is contained in:
parent
54357b0d17
commit
cd56fdec77
|
@ -448,10 +448,16 @@ public class ProcessCtl extends Thread
|
||||||
log.fine(m_pi.toString());
|
log.fine(m_pi.toString());
|
||||||
boolean started = false;
|
boolean started = false;
|
||||||
|
|
||||||
//CacheReset must execute on client
|
//hengsin, bug [ 1633995 ]
|
||||||
boolean resetCache = CacheReset.class.getName().equals(m_pi.getClassName());
|
boolean clientOnly = false;
|
||||||
|
Class processClass = null;
|
||||||
|
try {
|
||||||
|
processClass = Class.forName(m_pi.getClassName());
|
||||||
|
if (ClientProcess.class.isAssignableFrom(processClass))
|
||||||
|
clientOnly = true;
|
||||||
|
} catch (Exception e) {}
|
||||||
|
|
||||||
if (DB.isRemoteProcess() && !resetCache)
|
if (DB.isRemoteProcess() && !clientOnly)
|
||||||
{
|
{
|
||||||
Server server = CConnection.get().getServer();
|
Server server = CConnection.get().getServer();
|
||||||
try
|
try
|
||||||
|
@ -490,13 +496,12 @@ public class ProcessCtl extends Thread
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Run locally
|
// Run locally
|
||||||
if (!started && !m_IsServerProcess)
|
if (!started && (!m_IsServerProcess || clientOnly ))
|
||||||
{
|
{
|
||||||
ProcessCall myObject = null;
|
ProcessCall myObject = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Class myClass = Class.forName(m_pi.getClassName());
|
myObject = (ProcessCall)processClass.newInstance();
|
||||||
myObject = (ProcessCall)myClass.newInstance();
|
|
||||||
if (myObject == null)
|
if (myObject == null)
|
||||||
m_pi.setSummary("No Instance for " + m_pi.getClassName(), true);
|
m_pi.setSummary("No Instance for " + m_pi.getClassName(), true);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue