Class SpringBootSharedLibraries

java.lang.Object
com.gigaspaces.classloader.SpringBootSharedLibraries

public final class SpringBootSharedLibraries extends Object
Canonical helper for services that consume the shared Spring Boot library layer (the same content SpringBootClassLoader loads) via a classpath STRING rather than a literal ClassLoader object - i.e. services launched as a separate OS process (the Auth server; see com.gigaspaces.internal.services.AuthServiceFactory), where a Java ClassLoader instance cannot cross the process boundary (PIC-6253).

Also the single source of truth for the lib/optional/security jar-exclusion filter, previously duplicated (with a comment explaining the manual-sync requirement) between AuthServiceFactory (xap-core) and GsPremiumCommandFactory.appendRestV3ExternalSecurityClasspath() (xap-premium, for REST V3's system-classpath construction) - since xap-premium already depends on xap-core, hosting it here lets both call the same method instead of hand-keeping two copies in sync.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Predicate<Path>
    Matches the platform jars that lib/optional/security ships alongside a customer's own custom security classes (spring-security-config/-web, xap-security, xap-token-service-client) - excluded because the consuming fat jar already bundles its own copies of these, and a second copy on an ancestor loader risks winning cross-loader linkage unpredictably (see RestV3ServiceFactory's and ChildFirstURLClassLoader's Javadoc for the failure modes this avoids).
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    loaderPath(boolean includeSecurityJars)
    Comma-joined absolute jar paths (Spring Boot PropertiesLauncher's -Dloader.path format) of the shared directory (SpringBootClassLoader's own content) plus LIB_REQUIRED_JARS, plus lib/optional/xap-openspaces (see GsPremiumCommandFactory.appendSpringBootExternalCoreClasspath()'s identical addition for MCP/REST V3/GraphQL - xap-openspaces's own GraalVM JS runtime dependencies), plus lib/platform/zookeeper (org.openspaces:xap-zookeeper and its Curator/ZooKeeper/Netty runtime deps - the same directory GSC/GSM/MCP/REST V3/GraphQL already use), plus the filtered lib/optional/security jars when includeSecurityJars is true.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • SECURITY_JAR_FILTER

      public static final Predicate<Path> SECURITY_JAR_FILTER
      Matches the platform jars that lib/optional/security ships alongside a customer's own custom security classes (spring-security-config/-web, xap-security, xap-token-service-client) - excluded because the consuming fat jar already bundles its own copies of these, and a second copy on an ancestor loader risks winning cross-loader linkage unpredictably (see RestV3ServiceFactory's and ChildFirstURLClassLoader's Javadoc for the failure modes this avoids).
  • Method Details

    • loaderPath

      public static String loaderPath(boolean includeSecurityJars)
      Comma-joined absolute jar paths (Spring Boot PropertiesLauncher's -Dloader.path format) of the shared directory (SpringBootClassLoader's own content) plus LIB_REQUIRED_JARS, plus lib/optional/xap-openspaces (see GsPremiumCommandFactory.appendSpringBootExternalCoreClasspath()'s identical addition for MCP/REST V3/GraphQL - xap-openspaces's own GraalVM JS runtime dependencies), plus lib/platform/zookeeper (org.openspaces:xap-zookeeper and its Curator/ZooKeeper/Netty runtime deps - the same directory GSC/GSM/MCP/REST V3/GraphQL already use), plus the filtered lib/optional/security jars when includeSecurityJars is true. The shared-directory/lib/required/xap-openspaces/zookeeper parts are unconditional - a service's fat jar may have its shared dependencies excluded regardless of whether Spring Security/LDAP is configured. Returns null if the result would be empty.