RequestContext context = new SimpleRequestContext(mDISPELProcess);
updateStatus(ProcessingStatus.COMPILING);
// Get a DISPEL engine from the Spring configuration
DispelEngine dispelEngine =
GatewayBeanFactory.getInstance().createDispelEngine();
CompileErrorListener errorListener =
new CompileErrorListener(mErrors);
dispelEngine.addErrorListener(errorListener);
SimpleRegistrationListener regListener =
new SimpleRegistrationListener(mErrors);
dispelEngine.addRegistrationListener(regListener);
// Compile the DISPEL and optimise the graphs
DispelEngineResult engineResult = null;
try
{
dispelEngine.setRequestContext(context);
engineResult = dispelEngine.processDispel(
new BufferedReader(new StringReader(dispel)));
}
catch (CompilationException e)
{
LOG.error("Caught exception during compilation.");