Package org.apache.openejb.core.ivm

Examples of org.apache.openejb.core.ivm.EjbObjectInputStream


            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();
        }
    }
View Full Code Here


            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();
        }
    }
View Full Code Here

            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();
        }
    }
View Full Code Here

            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();
        }
    }
View Full Code Here

            if (sessionFile.exists()) {
                logger.info("Activating from file " + sessionFile);

                InputStream in = new FileInputStream(sessionFile);
                in = new BufferedInputStream(in);
                ObjectInputStream ois = new EjbObjectInputStream(in);
                Object state = ois.readObject();
                ois.close();
                sessionFile.delete();
                return state;
            } else {
                logger.info("Activation failed: file not found " + sessionFile);
                return null;
View Full Code Here

            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();
        }
    }
View Full Code Here

            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();
        }
    }
View Full Code Here

            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();
        }
    }
View Full Code Here

            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();
        }
    }
View Full Code Here

            final File sessionFile = new File(sessionDirectory, filename);

            if (sessionFile.exists()) {
                logger.info("Activating from file " + sessionFile);

                final ObjectInputStream ois = new EjbObjectInputStream(IO.read(sessionFile));
                try {
                    return ois.readObject();
                } finally {
                    IO.close(ois);
                    if (!sessionFile.delete()) {
                        sessionFile.deleteOnExit();
                    }
View Full Code Here

TOP

Related Classes of org.apache.openejb.core.ivm.EjbObjectInputStream

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.