*/
@SuppressWarnings("unchecked")
public static <T> void executeCallback(String key, RealRawData data) throws ConversionException
{
WebContext webContext = WebContextFactory.get();
ScriptSession session = webContext.getScriptSession();
ConverterManager converterManager = webContext.getContainer().getBean(ConverterManager.class);
Map<String, Class<T>> typeMap = (Map<String, Class<T>>) session.getAttribute(KEY_TYPE);
Class<T> type = typeMap.remove(key);
session.removeAttribute(KEY_TYPE);
session.setAttribute(KEY_TYPE, typeMap);
try
{
Method method = Callback.class.getMethod("dataReturned", type);
Property property = new ParameterProperty(new MethodDeclaration(method), 0);
InboundVariable iv = data.getInboundVariable();
Object callbackData = converterManager.convertInbound(type, iv, property);
Map<String, Callback<T>> callbackMap = (Map<String, Callback<T>>) session.getAttribute(KEY_TYPE);
Callback<T> callback = callbackMap.remove(key);
session.removeAttribute(KEY_TYPE);
session.setAttribute(KEY_CALLBACK, callbackMap);
callback.dataReturned((T) callbackData);
}
catch (Exception ex)
{