Interface ResourceResolver

  • All Known Implementing Classes:
    JBossResourceResolverBean, ResourceResolverBean

    public interface ResourceResolver
    Interface of beans that retrieve information about "resources" of application server. Typically those resources would be datasources.
    • Method Detail

      • supportsPrivateResources

        boolean supportsPrivateResources()
        Standalone Tomcat supports declaration of application-local resources. In that case it makes sense to associate display of resource/datasource information with the owner application. JBoss on other hand can only declare "global" resources, which alters the way resource information is displayed (and accessed).
        Returns:
        true if datasources can be associated with applications, otherwise false.
        See Also:
        getApplicationResources(Context, ContainerWrapperBean)
      • supportsGlobalResources

        boolean supportsGlobalResources()
        Most servlet containers support global resources, but for those that do not, this returns false.
        Returns:
        true if the servlet container supports global resources, otherwise false.
        See Also:
        getApplicationResources()
      • supportsDataSourceLookup

        boolean supportsDataSourceLookup()
        Indicates whether this servlet container exposes datasources via JNDI.
        Returns:
        true if the servlet container supports datasource lookup
      • getApplicationResources

        List<ApplicationResource> getApplicationResources​(org.apache.catalina.Context context,
                                                          ContainerWrapperBean containerWrapper)
                                                   throws NamingException
        Gets the application resources.
        Parameters:
        context - the context
        containerWrapper - the container wrapper
        Returns:
        the application resources
        Throws:
        NamingException - the naming exception
      • resetResource

        boolean resetResource​(org.apache.catalina.Context context,
                              String resourceName,
                              ContainerWrapperBean containerWrapper)
                       throws NamingException
        Reset resource.
        Parameters:
        context - the context
        resourceName - the resource name
        containerWrapper - the container wrapper
        Returns:
        true, if successful
        Throws:
        NamingException - the naming exception
      • lookupDataSource

        DataSource lookupDataSource​(org.apache.catalina.Context context,
                                    String resourceName,
                                    ContainerWrapperBean containerWrapper)
                             throws NamingException
        Lookup data source.
        Parameters:
        context - the context
        resourceName - the resource name
        containerWrapper - the container wrapper
        Returns:
        the data source
        Throws:
        NamingException - the naming exception
      • getMBeanServer

        MBeanServer getMBeanServer()
        Method that gets MBeanServer instance that is "default" for the current environment. It is preferably to use this method to locate the "default" MBeanServer implementation.
        Returns:
        "default" MBeanServer instance for the current environment