Class AbstractConnectorResourceDeployer

    • Constructor Detail

      • AbstractConnectorResourceDeployer

        public AbstractConnectorResourceDeployer()
    • Method Detail

      • canDeploy

        public boolean canDeploy​(boolean postApplicationDeployment,
                                 Collection<Resource> allResources,
                                 Resource resource)
        A deployer can indicate whether a particular resource can be deployed before application deployment
        Used in case of application-scoped-resources
        eg: Embedded RAR resources are created after application (that has embedded .rar) deployment.
        Specified by:
        canDeploy in interface ResourceDeployer
        Parameters:
        postApplicationDeployment - post-application-deployment
        allResources - resources collection in which the resource being validated is present.
        resource - resource to be validated
        Returns:
        boolean
      • validateResourcesForStaleReference

        public static void validateResourcesForStaleReference​(String appName,
                                                              List<Module> staleRars,
                                                              Resources resources)
                                                       throws ResourceConflictException
        Validates whether the old application has RARs and those are retained in new application.
        If the new application does not have any of the old application's RAR, validates whether
        any module is using the RAR's resources. If used, fail with ResourceConflictException
        as the RAR's resource is not valid anymore.
        Parameters:
        appName - application-name
        staleRars - List of Stale Resource Adapters (ie., were defined in old app, not in new app)
        resources - resources that need to be checked for stale RAR references.
        Throws:
        org.glassfish.resources.api.ResourceConflictException - When any of the resource has reference to old RAR
        ResourceConflictException