it.eng.spago.jbi.init
Class JBIManager

java.lang.Object
  extended by it.eng.spago.jbi.init.JBIManager

public class JBIManager
extends java.lang.Object

Mantains the set of implementations for different JBI containers. Implements methods useful to retrive an istance of a pool an to registry new connection pools


Constructor Summary
JBIManager()
           
 
Method Summary
static void destroyInstance()
          Deletes an istance of the connection pool for the default repository
static void destroyInstance(java.lang.String name)
          Destroy an istance of the connection pool for a specific repository identified by the input name
static java.lang.String getDefaultContainer()
          Gets the name of the default repository
static ServiceUnitManagerProvider getInstance()
          Retrives the istance of the connection pool for the default repository
static ServiceUnitManagerProvider getInstance(java.lang.String name)
          Retrives an istance of the connection pool for a specific repository identified by the inupt name
static boolean isRegistered(java.lang.String name)
          Checks if a pool with a given name is alrady registered
protected static void registerContainer(ServiceUnitManagerProvider provider, java.lang.String name)
          Registers a new container pool
protected static void setDefaultContainer(java.lang.String defaultContainer)
          Sets the name of the default repository
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JBIManager

public JBIManager()
Method Detail

registerContainer

protected static void registerContainer(ServiceUnitManagerProvider provider,
                                        java.lang.String name)
                                 throws EMFInternalError
Registers a new container pool

Parameters:
pool, - the connection pool to register
name, - the name of the repository
Throws:
EMFInternalError - Thrown if an error occurs during the registration

getInstance

public static ServiceUnitManagerProvider getInstance(java.lang.String name)
                                              throws EMFInternalError
Retrives an istance of the connection pool for a specific repository identified by the inupt name

Parameters:
name, - name of the repository
Returns:
Instance of the repository connection pool
Throws:
EMFInternalError - Thrown if an error occurs during the retriving operation

isRegistered

public static boolean isRegistered(java.lang.String name)
Checks if a pool with a given name is alrady registered

Parameters:
name - name of the pool
Returns:
boolean, true if the pool name is already registered, false otherwise

destroyInstance

public static void destroyInstance(java.lang.String name)
                            throws EMFInternalError
Destroy an istance of the connection pool for a specific repository identified by the input name

Parameters:
name, - name of the repository
Throws:
EMFInternalError - Thrown if an error occurs during the deletion

getInstance

public static ServiceUnitManagerProvider getInstance()
                                              throws EMFInternalError
Retrives the istance of the connection pool for the default repository

Returns:
Instance of the repository connection pool
Throws:
EMFInternalError - Thrown if an error occurs during the retriving operation

destroyInstance

public static void destroyInstance()
                            throws EMFInternalError
Deletes an istance of the connection pool for the default repository

Throws:
EMFInternalError - Thrown if an error occurs during the deletion

getDefaultContainer

public static java.lang.String getDefaultContainer()
Gets the name of the default repository

Returns:
name of the default repository

setDefaultContainer

protected static void setDefaultContainer(java.lang.String defaultContainer)
Sets the name of the default repository

Parameters:
defaultContainer, - name to set