org.jboss.mx.loading
Class LoaderRepositoryFactory

java.lang.Object
  extended byorg.jboss.mx.loading.LoaderRepositoryFactory

public class LoaderRepositoryFactory
extends java.lang.Object

A factory for LoaderRepository instances. This is used to obtain repository instances for scoped class loading.


Nested Class Summary
static class LoaderRepositoryFactory.LoaderRepositoryConfig (src)
          A class that represents the configuration of the a LoaderRepository.
static interface LoaderRepositoryFactory.LoaderRepositoryConfigParser (src)
          The interface representing a LoaderRepository configuration parser.
 
Field Summary
static ObjectName (src) DEFAULT_LOADER_REPOSITORY
          The JMX name of the parent LoaderRepository
 
Method Summary
static void createLoaderRepository(MBeanServer (src)  server, LoaderRepositoryFactory.LoaderRepositoryConfig (src)  config)
          Create and configure a LoaderRepository instance using the given config if there is not already an instance registered.
static void createLoaderRepository(MBeanServer (src)  server, java.lang.String repositoryClassName, ObjectName (src)  repositoryName)
          Create a LoaderRepository instance of type repositoryClassName and register it under repositoryName if there is not already an instance registered.
static void destroyLoaderRepository(MBeanServer (src)  server, ObjectName (src)  repositoryName)
           
static LoaderRepositoryFactory.LoaderRepositoryConfig (src) parseRepositoryConfig(org.w3c.dom.Element config)
          Given a loader-repository element fragment like: jboss.test.cts:loader=cts-cmp2v2.ear ...
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_LOADER_REPOSITORY

public static ObjectName (src)  DEFAULT_LOADER_REPOSITORY
The JMX name of the parent LoaderRepository

Method Detail

parseRepositoryConfig

public static LoaderRepositoryFactory.LoaderRepositoryConfig (src)  parseRepositoryConfig(org.w3c.dom.Element config)
                                                                            throws MalformedObjectNameException (src) 
Given a loader-repository element fragment like: jboss.test.cts:loader=cts-cmp2v2.ear ... create a LoaderRepositoryConfig representation.

Parameters:
config - the xml loader-repository element
Returns:
a LoaderRepositoryConfig representation of the config
Throws:
MalformedObjectNameException (src)

createLoaderRepository

public static void createLoaderRepository(MBeanServer (src)  server,
                                          java.lang.String repositoryClassName,
                                          ObjectName (src)  repositoryName)
                                   throws JMException (src) 
Create a LoaderRepository instance of type repositoryClassName and register it under repositoryName if there is not already an instance registered.

Parameters:
server - the MBeanServer to register with
repositoryClassName - the class which implements LoaderRepository
repositoryName - the JMX name to register under
Throws:
JMException (src) - thrown on any failure to create or register the repository

createLoaderRepository

public static void createLoaderRepository(MBeanServer (src)  server,
                                          LoaderRepositoryFactory.LoaderRepositoryConfig (src)  config)
                                   throws JMException (src) 
Create and configure a LoaderRepository instance using the given config if there is not already an instance registered.

Parameters:
server - the MBeanServer to register with
config - the configuration information which will be used to create register and configure the LoaderRepository instance.
Throws:
JMException (src) - thrown on any failure to create or register the repository

destroyLoaderRepository

public static void destroyLoaderRepository(MBeanServer (src)  server,
                                           ObjectName (src)  repositoryName)