@Override
public Object eval(final String script, final ScriptContext context) throws ScriptException {
try {
final String val = (String) context.getAttribute(KEY_REFERENCE_TYPE, ScriptContext.ENGINE_SCOPE);
ReferenceBundle bundle = ReferenceBundle.getHardBundle();
if (val != null && val.length() > 0) {
if (val.equalsIgnoreCase(REFERENCE_TYPE_SOFT)) {
bundle = ReferenceBundle.getSoftBundle();
} else if (val.equalsIgnoreCase(REFERENCE_TYPE_WEAK)) {
bundle = ReferenceBundle.getWeakBundle();