With issue #9166, ByteBufferPool was removed and replaced by
RetainableByteBufferPool. Since ByteBufferPool was used by
AbstractConnector, this change broke backwards compatibility with
third-party connectors such as junixsocket-jetty.
Since there's no longer any other ByteBufferPool, rename the
RetainableByteBufferPool interface, and thereby not only reinstate
compatibility with existing third-party libraries but also save a few
keystrokes.
https://github.com/eclipse/jetty.project/issues/9284
Signed-off-by: Christian Kohlschütter <christian@kohlschutter.com>
+ Sanity check Resource being provided
+ Descriptor toString changed to include full URI to descriptor
so that it can be used consistently in Logging and Exception messages.
+ New Descriptor.toURI() for use in Servlet Source and other logging messages
+ Servlet Source value is now the URI of the Descriptor
+ More cleanup around `Source` location/name
.getResource() must be a Resource
as it's used in the AnnotationIntrospector
all others use new .getName()
Not all location/name usages can be loaded as
a Resource.
* Adding Servlet 6 XML Entities
* Fixing bad xsi:schemaLocation entries
* Update all jetty-ee10 web XMLs to JakartaEE version 6.0 based
* Using XML Catalog
* Introducing catalogs for:
- default XML xsd/dtd (catalog-org.w3.xml)
- Configure dtd (catalog-configure.xml)
- EE10 Servlet 6 xsd/dtd (catalog-ee10.xml)
- EE9 Servlet 5 xsd/dtd (catalog-ee9.xml)
- EE8 Servlet 4 xsd/dtd (catalog-ee8.xml)
* New XmlParser.addCatalog(URI catalogXml, Class<?> classBase)
to allow the loading of a catalog which has it's resources
referenced via the classBase.getResource(name)
* WebDescriptor uses Environment to load appropriate catalog.
* Remove XmlParser.redirectEntity(String, String)
* Improved FileID.isHidden
* Simplified AnnotationParser
+ Not using MultiReleaseJarFile
+ Walk of a Directory or a JAR is the same
+ Reduced parse method count
+ Fixed TestAnnotationParser
Using proper fully qualified classnames now (were not yet converted over to jetty-12 naming)
* Single parseClass method
* Single parseDir method
* Adapting ee9 AnnotationParser to have the same behaviors as ee10.
* Deleting TestAnnotationInheritance tests
+ We don't want the AnnotationParser
creating new Resource objects for Class.getSuperClass()
resources that don't belong to
the same Resource that the passed
in class belongs to (as this is out of
scope for the Mount management).
Imagine if told to parse ClassB
which extends from ClassFoo, which
is in a different JAR than ClassB?
This concept from Jetty 9/10/11
was only used in testcases and not
in live runtime code, so it was
removed.
Co-authored-by: Olivier Lamy <oliver.lamy@gmail.com>
+ Move static methods from other
places to FileID or URIUtil
- MultiReleaseJarFile
- Resource
- MetaInfConfiguration
+ Improve testing of URIUtil and FileID
* Cleanup MultiReleaseJarFile to use newFileSystem behaviors built into JVM
* Adding more testing to MultiReleaseJarFile
* Updating AnnotationParser and MetaInfConfiguration
* Created URIUtil.streamOf(URLClassLoader) to aid
in proper conversion of URLClassLoader.toURLs to URIs
* Introduce URIUtil.fixBadJavaIoFileUrl
Addresses bad java.io.File.toURL().toURI() issues
file:/path to file:///path
* Better URI pool/key behaviors in FileSystemPool
* no arg AnnotationParser uses ASM_VERSION
* Immutable ResourceCollection with mount management.
* Internal List<Resource> is now immutable so that .getResources() cannot be modified.
* Improved Resource.toJarFileUri implementation that keeps the deep archive references
* Introducing Resource.mountCollection() methods
+ ResourceCollection is now a private class
+ Resource.mountCollection() returns a Mount
+ Places that use this technique are now putting the Mount in the context's beans for the context to close those mounts.
* Cleanup names/comments in FileSystemResourceTest
* Adding missing test of attempting to create a Resource from a URI `jar:file:foo.jar!/` while not mounted.
* Reworked ResourceCollection behaviors based on feedback.
+ Eliminated all Resource.mountCollection() methods except the Collection<URI> one.
* Eliminated Resource.mountIfNeeded(Resource)
* Eliminated Resource.fromList implementations
* Introduced @gregw Resource.of() implementations
* Introduced Resource.split() to honor old split logic from Jetty 9/10/11, with glob support, but now it only converts to List<URI>
* Remove IOException from Mount.root() method
* ResourceCollection now flattens and uniques any nested ResourceCollection entries it encounters
* Expanded ResourceCollectionTest to cover more code paths
* Add ResourceTest for new split() method
* Fixing testcase to use a directory that exists on setExtraClasspath
* Increase reliability of WebAppContextTests
* Updates for working with webapp.extraClasspath
* Introduced Resource.unwrapContainer to help in servlet cases where the raw JAR path should be represented in a ServletContext attribute.
* Made FileSystemPool.containerUri just use new Resource.unwrapContainer
* webapp MetaData updated to use URIs references to Libs (not File objects)
* jetty-ee#-maven-plugin use URIs for its classpath tracking to aid in mounting issues later
* webapp extraClasspath supports raw JAR references as well as glob now, supported by Resource.split(String)
* remove Resource.getFile() and replace its usages with Resource.getPath()
* remove all public PathResource ctors + add non-leaky FS mounting mechanism + interpret string as Path when not a schemed URI
* rename Resource.getResource to Resource.resolve, specifying that the subpath is URI-path-interpreted
* remove useless API methods + deprecate all path-related API
* make subpaths beginning with / resolved as relative to the given uri
* introduce filesystem pooling and generalize resource resolving code
* remove URLResource
* remove unneeded factory method
* both file: and jrt: should not be pooled
* move deprecated impls from PathResource down to Resource + fix some tests
* handle Resource's pointing to non-existent jar files
* Force Resource URIs to end with "/" when the resource is a directory
* Produce warning if attempting to release a mounted filesystem uri that doesn't exist in the pool.
Co-authored-by: Greg Wilkins <gregw@webtide.com>
Co-authored-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Co-authored-by: Ludovic Orban <lorban@bitronix.be>