public void runTask()
    {
        String strProcess = this.getProperty(DBParams.PROCESS);
        BaseProcess job = (BaseProcess)ClassServiceUtility.getClassService().makeObjectFromClassName(strProcess);
        if (job != null)
        {
            this.runProcess(job, m_properties);
        }
        else
        {   // NOTE: It is not recommended to start a standalone process, since they can wreak havoc with this jvm
                // (since standalones assume complete control and often will exit(0))
            String strClass = this.getProperty("standalone"); // Applets are also run as tasks
            if ((strClass != null) && (strClass.length() > 0))
            {
                try
                {
                    if (strClass.indexOf('.') == 0)
                        strClass = Constants.ROOT_PACKAGE + strClass.substring(1);
                    Class<?> c = Class.forName(strClass);
                    // Don't instatiate the class, since I'm calling static main
                    if (c != null)
                    {
                        Class<?>[] parameterTypes = {String[].class};
                        Method method = c.getMethod("main", parameterTypes);
                        Object[] args = new Object[1];
                        Map<String,Object> properties = m_properties;   // Only passed in properties
                        String[] rgArgs = Utility.propertiesToArgs(properties);
                        args[0] = rgArgs;
                        method.invoke(null, args);
                    }
                } catch (Exception ex) {
                    ex.printStackTrace();
                }
            }
        }
    }
public void runTask ( ) { String strProcess = this . getProperty ( DBParams . PROCESS ) ; BaseProcess job = ( BaseProcess ) ClassServiceUtility . getClassService ( ) . makeObjectFromClassName ( strProcess ) ; if ( job != null ) { this . runProcess ( job , m_properties ) ; } else { String strClass = this . getProperty ( "standalone" ) ; if ( ( strClass != null ) && ( strClass . length ( ) > 0 ) ) { try { if ( strClass . indexOf ( '.' ) == 0 ) strClass = Constants . ROOT_PACKAGE + strClass . substring ( 1 ) ; Class < ? > c = Class . forName ( strClass ) ; if ( c != null ) { Class < ? > [ ] parameterTypes = { String [ ] . class } ; Method method = c . getMethod ( "main" , parameterTypes ) ; Object [ ] args = new Object [ 1 ] ; Map < String , Object > properties = m_properties ; String [ ] rgArgs = Utility . propertiesToArgs ( properties ) ; args [ 0 ] = rgArgs ; method . invoke ( null , args ) ; } } catch ( Exception ex ) { ex . printStackTrace ( ) ; } } } }
Get the name of this process and run it.