Class ResourceAdapterAdminServiceImpl

  • All Implemented Interfaces:
    ConnectorConstants, ResourceConstants

    public class ResourceAdapterAdminServiceImpl
    extends ConnectorService
    This is resource adapter admin service. It creates, deletes Resource adapter and also the resource adapter configuration updation.
    Author:
    Binod P.G, Srikanth P, Aditya Gore, Jagadish Ramu
    • Constructor Detail

      • ResourceAdapterAdminServiceImpl

        public ResourceAdapterAdminServiceImpl()
        Default constructor
    • Method Detail

      • createActiveResourceAdapter

        public void createActiveResourceAdapter​(ConnectorDescriptor connectorDescriptor,
                                                String moduleName,
                                                String moduleDir,
                                                ClassLoader loader)
                                         throws ConnectorRuntimeException
        Creates Active resource Adapter which abstracts the rar module. During the creation of ActiveResourceAdapter, default pools and resources also are created.
        Parameters:
        connectorDescriptor - object which abstracts the connector deployment descriptor i.e rar.xml and sun-ra.xml.
        moduleName - Name of the module
        moduleDir - Directory where rar module is exploded.
        loader - Classloader to use
        Throws:
        ConnectorRuntimeException - if creation fails.
      • createActiveResourceAdapter

        public void createActiveResourceAdapter​(String moduleDir,
                                                String moduleName,
                                                ClassLoader loader)
                                         throws ConnectorRuntimeException
        Creates Active resource Adapter which abstracts the rar module. During the creation of ActiveResourceAdapter, default pools and resources also are created.
        Parameters:
        moduleDir - Directory where rar module is exploded.
        moduleName - Name of the module
        Throws:
        ConnectorRuntimeException - if creation fails.
      • associateResourceAdapter

        public void associateResourceAdapter​(String rarName,
                                             jakarta.resource.spi.ResourceAdapterAssociation raa)
                                      throws jakarta.resource.ResourceException
        associates the given instance of ResourceAdapterAssociation with the ResourceAdapter java-bean of the specified RAR
        Parameters:
        rarName - resource-adapter-name
        raa - Object that is an instance of ResourceAdapterAssociation
        Throws:
        jakarta.resource.ResourceException - when unable to associate the RA Bean with RAA instance.
      • isRarDeployed

        public boolean isRarDeployed​(String moduleName)
        Checks if the rar module is already reployed.
        Parameters:
        moduleName - Rarmodule name
        Returns:
        true if it is already deployed. false if it is not deployed.
      • stopAllActiveResourceAdapters

        public void stopAllActiveResourceAdapters()
        Calls the stop method for all J2EE Connector 1.5/1.0 spec compliant RARs
      • stopActiveResourceAdapter

        public void stopActiveResourceAdapter​(String raName)
        stop the active resource adapter (runtime)
        Parameters:
        raName - resource-adapter name
      • deleteResourceAdapterConfig

        public void deleteResourceAdapterConfig​(String rarName)
                                         throws ConnectorRuntimeException
        Delete the resource adapter configuration to the connector registry
        Parameters:
        rarName - resource-adapter-name
        Throws:
        ConnectorRuntimeException - when unable to remove RA Config.
      • reCreateActiveResourceAdapter

        public void reCreateActiveResourceAdapter​(String moduleName)
                                           throws ConnectorRuntimeException
        The ActiveResourceAdapter object which abstract the rar module is recreated in the connector container/registry. All the pools and resources are killed. But the infrastructure to create the pools and and resources is untouched. Only the actual pool is killed.
        Parameters:
        moduleName - rar module Name.
        Throws:
        ConnectorRuntimeException - if recreation fails.