Class ConnectorApplication

  • All Implemented Interfaces:
    ApplicationContainer, EventListener

    public class ConnectorApplication
    extends Object
    implements ApplicationContainer, EventListener
    Represents a connector application, one per resource-adapter. GlassFish kernel will call start/stop of connector application during start/stop of server and deploy/undeploy of the resource-adapter.
    Author:
    Jagadish Ramu
    • Method Detail

      • getDescriptor

        public Object getDescriptor()
        Returns the deployment descriptor associated with this application
        Specified by:
        getDescriptor in interface ApplicationContainer
        Returns:
        deployment descriptor if they exist or null if not
      • start

        public boolean start​(ApplicationContext startupContext)
        Starts an application container. ContractProvider starting should not throw an exception but rather should use their prefered Logger instance to log any issue they encounter while starting. Returning false from a start mean that the container failed to start
        Specified by:
        start in interface ApplicationContainer
        Parameters:
        startupContext - the start up context
        Returns:
        true if the container startup was successful.
      • deployResources

        public void deployResources()
        deploy all resources/pools pertaining to this resource adapter
      • undeployResources

        public void undeployResources()
        undeploy all resources/pools pertaining to this resource adapter
      • undeployGlobalResources

        public boolean undeployGlobalResources​(boolean failIfResourcesExist)
        undeploy all resources/pools pertaining to this resource adapter
      • stop

        public boolean stop​(ApplicationContext stopContext)
        Stop the application container
        Specified by:
        stop in interface ApplicationContainer
        Parameters:
        stopContext -
        Returns:
        true if stopping was successful.
      • suspend

        public boolean suspend()
        Suspends this application container.
        Specified by:
        suspend in interface ApplicationContainer
        Returns:
        true if suspending was successful, false otherwise.
      • resume

        public boolean resume()
        Resumes this application container.
        Specified by:
        resume in interface ApplicationContainer
        Returns:
        true if resumption was successful, false otherwise.
      • logFine

        public void logFine​(String message)
      • getModuleName

        public String getModuleName()
        returns the module name
        Returns:
        module-name
      • setModuleName

        public void setModuleName​(String moduleName)
        set the module name of the application
        Parameters:
        moduleName - module-name
      • getApplicationName

        public String getApplicationName()
      • event

        public void event​(EventListener.Event event)
        event listener to listen to resource-adapter undeploy validation and to validate the undeployment. Undeployment will fail, if resources are found and --cascade is not set.
        Specified by:
        event in interface EventListener
        Parameters:
        event - Event