Class ParentLastClassloader

java.lang.Object
java.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
org.qubership.atp.dataset.db.migration.classloader.ParentLastClassloader
All Implemented Interfaces:
Closeable, AutoCloseable

public class ParentLastClassloader extends URLClassLoader
  • Constructor Details

    • ParentLastClassloader

      public ParentLastClassloader(URLClassLoader urlClassLoader, String sourcePath, String jdbcType)
      ClassLoader based on URLClassLoader for loading classes from self. In case class not found in this CL, it will try to load it from parent CL.
      Parameters:
      sourcePath - - location of resources. update.xml, migration scripts/jars etc. For example: ./scripts/
      jdbcType - - type of database. This parameter need for loading generated q-classes. If you want use postgres database, and your jar with classes has name atp-dataset-q-classes-generation-pg.jar, then you must define jdbcType=pg When CL trying to load jar, it split the name on three parts: 1. general name = qubership-atp-dataset-q-classes-generation 2. suffix = pg 3. extension = .jar The suffix must match to jdbcType for loading this jar. So, you can check how it works in method createNewUrlClassLoader(List).
  • Method Details