mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-29 20:59:45 +01:00
added SessionPoolExistsException
when duplicate session add is requested by name, it is silently ignored
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user