@Override
public synchronized String transform(Map<String, Object> model, Locale locale,
ModelAdaptor modelAdaptor, ProcessListener processListener) {
try {
context = new TemplateContext(template, locale, sourceName, new ScopedMap(
model), modelAdaptor, engine, engine.getErrorHandler(), processListener);
String transformed = transformPure(context);
return transformed;
} finally {
context = null;