private static Object copy(final Object source) throws Exception { IntraVmCopyMonitor.preCrossClassLoaderOperation(); try { final ByteArrayOutputStream baos = new ByteArrayOutputStream(4096); final ObjectOutputStream out = new ObjectOutputStream(baos); out.writeObject(source); out.close(); final ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); final ObjectInputStream in = new EjbObjectInputStream(bais); return in.readObject(); } finally { IntraVmCopyMonitor.postCrossClassLoaderOperation(); } } }
private static Object copy(final Object source) throws Exception { IntraVmCopyMonitor.preCrossClassLoaderOperation(); try { final ByteArrayOutputStream baos = new ByteArrayOutputStream(4096); final ObjectOutputStream out = new ObjectOutputStream(baos); out.writeObject(source); out.close(); final ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); final ObjectInputStream in = new EjbObjectInputStream(bais); final Object copy = in.readObject(); return copy; } finally { IntraVmCopyMonitor.postCrossClassLoaderOperation(); } } }
private static Object copy(Object source) throws Exception { IntraVmCopyMonitor.preCrossClassLoaderOperation(); try { ByteArrayOutputStream baos = new ByteArrayOutputStream(4096); ObjectOutputStream out = new ObjectOutputStream(baos); out.writeObject(source); out.close(); ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); ObjectInputStream in = new EjbObjectInputStream(bais); Object copy = in.readObject(); return copy; } finally { IntraVmCopyMonitor.postCrossClassLoaderOperation(); } } }
private static Object copy(Object source) throws Exception { IntraVmCopyMonitor.preCrossClassLoaderOperation(); try { ByteArrayOutputStream baos = new ByteArrayOutputStream(4096); ObjectOutputStream out = new ObjectOutputStream(baos); out.writeObject(source); out.close(); ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); ObjectInputStream in = new EjbObjectInputStream(bais); Object copy = in.readObject(); return copy; } finally { IntraVmCopyMonitor.postCrossClassLoaderOperation(); } } }
private static Object copy(final Object source) throws Exception { IntraVmCopyMonitor.preCrossClassLoaderOperation(); try { final ByteArrayOutputStream baos = new ByteArrayOutputStream(4096); final ObjectOutputStream out = new ObjectOutputStream(baos); out.writeObject(source); out.close(); final ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); final ObjectInputStream in = new EjbObjectInputStream(bais); return in.readObject(); } finally { IntraVmCopyMonitor.postCrossClassLoaderOperation(); } } }
private static Object copy(Object source) throws Exception { IntraVmCopyMonitor.preCrossClassLoaderOperation(); try { ByteArrayOutputStream baos = new ByteArrayOutputStream(4096); ObjectOutputStream out = new ObjectOutputStream(baos); out.writeObject(source); out.close(); ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); ObjectInputStream in = new EjbObjectInputStream(bais); Object copy = in.readObject(); return copy; } finally { IntraVmCopyMonitor.postCrossClassLoaderOperation(); } } }
private static Object copy(Object source) throws Exception { IntraVmCopyMonitor.preCrossClassLoaderOperation(); try { ByteArrayOutputStream baos = new ByteArrayOutputStream(4096); ObjectOutputStream out = new ObjectOutputStream(baos); out.writeObject(source); out.close(); ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); ObjectInputStream in = new EjbObjectInputStream(bais); Object copy = in.readObject(); return copy; } finally { IntraVmCopyMonitor.postCrossClassLoaderOperation(); } } }