return null;
}
private boolean executeJob( final JobMeta jobMeta, final Repository repository ) {
boolean success = true;
Job job = null;
try {
if ( jobMeta != null ) {
try {
job = new Job( repository, jobMeta );
} catch ( Exception e ) {
throw new KettleComponentException( Messages.getInstance().getErrorString(
"Kettle.ERROR_0021_BAD_JOB_METADATA" ), e ); //$NON-NLS-1$
}
}
if ( job == null ) {
debug( getKettleLog( true ) );
throw new KettleComponentException( Messages.getInstance()
.getErrorString( "Kettle.ERROR_0021_BAD_JOB_METADATA" ) ); //$NON-NLS-1$
}
// Remember where to get our execution logging from
//
logChannelId = job.getLogChannelId();
try {
if ( ComponentBase.debug ) {
debug( Messages.getInstance().getString( "Kettle.DEBUG_STARTING_JOB" ) ); //$NON-NLS-1$
}
LogLevel lvl = getLogLevel();
job.setLogLevel( lvl );
job.start();
} catch ( Exception e ) {
throw new KettleComponentException( Messages.getInstance()
.getErrorString( "Kettle.ERROR_0022_JOB_START_FAILED" ), e ); //$NON-NLS-1$
}
try {
// It's running in a separate tread to allow monitoring,
// etc.
if ( ComponentBase.debug ) {
debug( Messages.getInstance().getString( "Kettle.DEBUG_JOB_RUNNING" ) ); //$NON-NLS-1$
}
job.waitUntilFinished();
if ( job.getResult().getNrErrors() > 0 ) {
debug( getKettleLog( true ) );
throw new KettleComponentException( Messages.getInstance().getErrorString(
"Kettle.ERROR_0014_ERROR_DURING_EXECUTE" ) ); //$NON-NLS-1$
}
} catch ( Exception e ) {