* @throws Exception if invocation fails
*/
@SuppressWarnings("unchecked")
public static <E> Object addValue(final InvocationContext invocationContext, final E value, final String className)
throws Exception {
ItfCallbackLoggerAccess beanLogger = getBeanRemoteInstance(SLSBCallbackLoggerAccess.class,
ItfCallbackLoggerAccess.class);
boolean added = false;
Object[] arObj = invocationContext.getParameters();
List<E> arOrder = null;
if (arObj[0] instanceof List) {
//Standard interceptor
arOrder = (List<E>) arObj[0];
added = arOrder.add(value);
}else if (arObj[0] instanceof Message){
//Log event
beanLogger.insertCallbackLogger(invocationContext.getTarget().getClass().toString(), UNDEFINED, className);
added = true;
}
// If can't add, throw an exception to avoid cascade errors.
if (!added) {