Object oid = getObjectId(ob);
Object oid = getObjectId(ob);
Object oid = getObjectId(ob);
Object oid = getObjectId(ob);
/** * Convert the specified failed object into a serializable * object for when we are serializing an Exception. It will * try the following: * <ul> * <li>if the object can be serialized, return the object itself</li> * <li>if the object has a serializable oid, return the oid</li> * <li>if the object has a non-serializable oid, return the oid's * toString and the object class</li> * <li>return the object's toString</li> * </ul> * * @param ob the object to convert * @return some serialized representation of the object */ public static Object replaceFailedObject(Object ob) { if (ob == null) return null; if (isSerializable(ob)) return ob; // don't take oid of new objects since it can cause a flush if auto-inc // and the id is meaningless anyway Object oid = getObjectId(ob); if (oid != null && isSerializable(oid)) return oid; // last ditch: stringify the object return toString(ob); }
/** * Convert the specified failed object into a serializable * object for when we are serializing an Exception. It will * try the following: * <ul> * <li>if the object can be serialized, return the object itself</li> * <li>if the object has a serializable oid, return the oid</li> * <li>if the object has a non-serializable oid, return the oid's * toString and the object class</li> * <li>return the object's toString</li> * </ul> * * @param ob the object to convert * @return some serialized representation of the object */ public static Object replaceFailedObject(Object ob) { if (ob == null) return null; if (isSerializable(ob)) return ob; // don't take oid of new objects since it can cause a flush if auto-inc // and the id is meaningless anyway Object oid = getObjectId(ob); if (oid != null && isSerializable(oid)) return oid; // last ditch: stringify the object return toString(ob); }
/** * Convert the specified failed object into a serializable * object for when we are serializing an Exception. It will * try the following: * <ul> * <li>if the object can be serialized, return the object itself</li> * <li>if the object has a serializable oid, return the oid</li> * <li>if the object has a non-serializable oid, return the oid's * toString and the object class</li> * <li>return the object's toString</li> * </ul> * * @param ob the object to convert * @return some serialized representation of the object */ public static Object replaceFailedObject(Object ob) { if (ob == null) return null; if (isSerializable(ob)) return ob; // don't take oid of new objects since it can cause a flush if auto-inc // and the id is meaningless anyway Object oid = getObjectId(ob); if (oid != null && isSerializable(oid)) return oid; // last ditch: stringify the object return toString(ob); }
/** * Convert the specified failed object into a serializable * object for when we are serializing an Exception. It will * try the following: * <ul> * <li>if the object can be serialized, return the object itself</li> * <li>if the object has a serializable oid, return the oid</li> * <li>if the object has a non-serializable oid, return the oid's * toString and the object class</li> * <li>return the object's toString</li> * </ul> * * @param ob the object to convert * @return some serialized representation of the object */ public static Object replaceFailedObject(Object ob) { if (ob == null) return null; if (isSerializable(ob)) return ob; // don't take oid of new objects since it can cause a flush if auto-inc // and the id is meaningless anyway Object oid = getObjectId(ob); if (oid != null && isSerializable(oid)) return oid; // last ditch: stringify the object return toString(ob); }
/** * Convert the specified failed object into a serializable * object for when we are serializing an Exception. It will * try the following: * <ul> * <li>if the object can be serialized, return the object itself</li> * <li>if the object has a serializable oid, return the oid</li> * <li>if the object has a non-serializable oid, return the oid's * toString and the object class</li> * <li>return the object's toString</li> * </ul> * * @param ob the object to convert * @return some serialized representation of the object */ public static Object replaceFailedObject(Object ob) { if (ob == null) return null; if (isSerializable(ob)) return ob; // don't take oid of new objects since it can cause a flush if auto-inc // and the id is meaningless anyway Object oid = getObjectId(ob); if (oid != null && isSerializable(oid)) return oid; // last ditch: stringify the object return toString(ob); }