[mapguide-internals] The Pinned Connection
Haris Kurtagic
haris at sl-king.com
Tue Oct 20 01:27:58 EDT 2009
>From RFC it looks even if you are able to "pin" more connections for same
feature source, you don't know which connection is used in which
ExecuteSql...
I think if " void PinConnection(MgResourceIdentifier featureSourceId) = 0;"
would return connection then that id (or class) should be used in
ExectueSql.. functions.
Also on that connection it would be possible to execute Transaction commands
to address RFC78
Haris
-----Original Message-----
From: mapguide-internals-bounces at lists.osgeo.org
[mailto:mapguide-internals-bounces at lists.osgeo.org] On Behalf Of Leaf Li
Sent: Tuesday, October 20, 2009 5:00
To: mapguide-internals at lists.osgeo.org
Subject: [mapguide-internals] The Pinned Connection
Harris,
Badreddine's description is absolutely right. MapGuide server will keep
track of the association between (session,fsdid,connection). What I mean is
that two pinned connections aren't allowed to created in one session for the
same feature source. If users pass a different feature source id when
calling MgFeatureService::PinConnection(), feature service will create
pinned connection for current session and this feature source.
Thanks,
Leaf Li
>Harris,
>
>You should be able to pin more than one connection per session. The new API
takes a feature source id and an application can create any number of those
ids and pin their associated connections. My >understanding is that the
server will keep track of the association between
(session,fsdid,connection). Even though the a fsid may refer to the same
connection parameters as an existing fsid, if >PinConnection is called using
the new fsid, then a new connection will be pinned. Of course, you can have
a third fsid to the same data and decide not to pin the associated
connection. In that case you >just grab a connection from the pool as you do
today. I assume that pinned or not, the connection will stay around if a
reader is still using it.
>
>Badreddine
_______________________________________________
mapguide-internals mailing list
mapguide-internals at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-internals
More information about the mapguide-internals
mailing list