try {
ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
ObjectOutputStream objectStream = new ObjectOutputStream(byteStream);
objectStream.writeObject(configuration);
byte[] bytes = byteStream.toByteArray();
configurationBytes = new Lob(bytes, true);
} catch (Exception e) {
throw new JbpmException("couldn't serialize configuration object for "+this, e);
}
}