added SessionPoolExistsException

when duplicate session add is requested by name, it is silently ignored
This commit is contained in:
Aleksandar Fabijanic
2008-10-21 13:39:47 +00:00
parent 4e0cc97d6a
commit dcede96ede
5 changed files with 15 additions and 8 deletions

View File

@@ -59,6 +59,7 @@ POCO_DECLARE_EXCEPTION(Data_API, LimitException, DataException)
POCO_DECLARE_EXCEPTION(Data_API, NotSupportedException, DataException)
POCO_DECLARE_EXCEPTION(Data_API, SessionUnavailableException, DataException)
POCO_DECLARE_EXCEPTION(Data_API, SessionPoolExhaustedException, DataException)
POCO_DECLARE_EXCEPTION(Data_API, SessionPoolExistsException, DataException)
POCO_DECLARE_EXCEPTION(Data_API, NoDataException, DataException)
POCO_DECLARE_EXCEPTION(Data_API, LengthExceededException, DataException)

View File

@@ -62,6 +62,7 @@ public:
void add(SessionPool* pPool);
/// Adds existing session pool to the container.
/// Throws SessionPoolExistsException if pool already exists.
Session add(const std::string& sessionKey,
const std::string& connectionString,
@@ -69,7 +70,8 @@ public:
int maxSessions = 32,
int idleTime = 60);
/// Adds a new session pool to the container and returns a Session from
/// newly created pool.
/// newly created pool. If pool already exists, request to add is silently
/// ignored and session is returned from the existing pool.
Session get(const std::string& name);
/// Returns a Session.