if (m == null && obj instanceof WrappedPortable) {
className = ((WrappedPortable) obj).unwrap().getClass().getName();
m = session.getMarshallerInstance(className);
}
if (m == null && obj instanceof Throwable) {
m = new FallbackExceptionMarshaller();
}
// Attempt to marshal weld/hibernate javassist created objects.
if (m == null && (obj.getClass().getName().contains("_$$_javassist_") || obj.getClass().getName().contains("_$$_jvst"))) {
className = obj.getClass().getSuperclass().getName();
m = session.getMarshallerInstance(className);