[Mapserver-dev] SDE Connection Pooling

Howard Butler hobu at iastate.edu
Fri Oct 1 19:06:01 EDT 2004


Folks,

I have updated mapsde.c to use Frank's new connection pooling API.  This 
new approach cleans up the connection sharing a lot, and hopefully this 
will be end the freeing of invalid connections by SDE.

To make this change, I had to change the syntax of how SDE versions are 
specified.  In the past, we had been specifying them on the CONNECTION 
string like this:
CONNECTION "sdemachine.iastate.edu,port:5151,sde,username,password,SDE.DEFAULT"

The problem with this is that once we start sharing connections, even 
though we specify the same version *name* for a layer, the name points to 
different version states for different layers.  Versions in SDE are done 
with something called state_ids, and two layers with the same version name 
could be at two different state_ids.  A version is really the property of a 
layer, IMO, not the connection.  Migrating SDE's connection sharing 
approach to the connection pooling API made this much clearer for me, and I 
regret that I hung it off of the CONNECTION string in the past.

So now (in CVS and soon to be 4.4), to specify a version for a layer, you 
do it on as the last parameter of the DATA string like this:
DATA "HOBU.mylayer,shape,SDE.DEFAULT"

As before, if you do not specify a version, the default version will be 
used.  This means that if you weren't monkeying around with specifying your 
versions in SDE layers before, nothing should have changed at all.  If you 
were using versions, you'll have to move the version name in layer from the 
end of the CONNECTION string to the end of the DATA string.

Howard




More information about the mapserver-dev mailing list