Class InMemoryArchive

  • All Implemented Interfaces:
    Archive

    public class InMemoryArchive
    extends org.eclipse.persistence.internal.jpa.deployment.URLArchive
    This archive is designed for use with dynamic persistence units it is built with a stream that allows it to read a persistence.xml file and creates a fake base URL based the classpath location of the InMemoryArchive class
    Author:
    tware
    • Field Summary

      • Fields inherited from class org.eclipse.persistence.internal.jpa.deployment.ArchiveBase

        descriptorLocation, rootURL
    • Constructor Detail

      • InMemoryArchive

        public InMemoryArchive​(InputStream stream)
    • Method Detail

      • getDescriptorStream

        public InputStream getDescriptorStream()
                                        throws IOException
        Specified by:
        getDescriptorStream in interface Archive
        Overrides:
        getDescriptorStream in class org.eclipse.persistence.internal.jpa.deployment.ArchiveBase
        Returns:
        an input stream on the persistence descriptor.
        Throws:
        IOException
      • close

        public void close()
        Description copied from interface: Archive
        Close this archive and associated InputStream.
        Specified by:
        close in interface Archive
        Overrides:
        close in class org.eclipse.persistence.internal.jpa.deployment.URLArchive