public void testNonserializableCallbackJBossSerialization()
{
log.info("entering " + getName());
CallbackStore store = null;
try
{
store = new CallbackStore();
HashMap config = new HashMap();
String path = getClass().getResource(".").getPath();
config.put(CallbackStore.FILE_PATH_KEY, path);
config.put(InvokerLocator.SERIALIZATIONTYPE, "jboss");
store.setConfig(config);
store.start();
Object payload = new NonserializablePayload(11);
Callback callback = new Callback(payload);
try
{
store.add(callback);
}
catch (Exception e)
{
log.error(e);
e.printStackTrace();
fail();
}
Callback retrievedCallback = (Callback) store.getNext();
Object retrievedPayload = retrievedCallback.getParameter();
assertTrue(payload.equals(retrievedPayload));
passes = true;
}
catch (Throwable t)
{
log.error(t);
t.printStackTrace();
fail();
}
finally
{
store.purgeFiles();
store.stop();
if (passes)
log.info(getName() + " PASSES");
else
log.info(getName() + " FAILS");