it.eng.spago.cms.pool
Class CMSPoolImpl

java.lang.Object
  extended by it.eng.spago.cms.pool.CMSPoolImpl
All Implemented Interfaces:
CMSPool

public class CMSPoolImpl
extends java.lang.Object
implements CMSPool

Implements methods useful to create a repository connection pool, to get a connection and to close a connection


Constructor Summary
CMSPoolImpl(IRepositoryProvider repo, SourceBean confPoolSB, java.lang.String name, java.lang.String user, java.lang.String pass, java.lang.String work, java.lang.String pSys, java.lang.String pUsr)
          Creates the connection pool and the initial connection istances
 
Method Summary
 void closeConnection(CMSConnection con)
          Closes a connecion of the repository
 CMSConnection getConnection()
          Gets a connection from the pool
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CMSPoolImpl

public CMSPoolImpl(IRepositoryProvider repo,
                   SourceBean confPoolSB,
                   java.lang.String name,
                   java.lang.String user,
                   java.lang.String pass,
                   java.lang.String work,
                   java.lang.String pSys,
                   java.lang.String pUsr)
            throws EMFInternalError
Creates the connection pool and the initial connection istances

Parameters:
repo, - jsr 170 repository
confPoolSB, - configuration of the pool
name, - name of the repository
user - default user used for open a jcr sessions
pass, - default password used for open a jcr session
work, - default workspace used for open a jcr session
pSys, - namespace prefix used for system properties
pUsr, - namespace prefix used for user properties
Throws:
EMFInternalError - Thrown if an error occurs during the creation of the pool
Method Detail

getConnection

public CMSConnection getConnection()
                            throws EMFInternalError
Gets a connection from the pool

Specified by:
getConnection in interface CMSPool
Returns:
CMSConnection to the repository
Throws:
EMFInternalError - if an error occurs during the connection retriving

closeConnection

public void closeConnection(CMSConnection con)
                     throws EMFInternalError
Closes a connecion of the repository

Specified by:
closeConnection in interface CMSPool
Parameters:
connection - to close
Throws:
EMFInternalError - if an error occurs during the connection closing