}
final ArcSDEDataStore createDataStore(ArcSDEDataStoreConfig config, final ISessionPool connPool)
throws IOException {
ArcSDEDataStore sdeDStore;
ISession session;
try {
session = connPool.getSession(false);
} catch (UnavailableConnectionException e) {
throw new RuntimeException(e);
}
try {
// check to see if our sdk is compatible with this arcsde instance
SeRelease releaseInfo = session.getRelease();
int majVer = releaseInfo.getMajor();
int minVer = releaseInfo.getMinor();
if (majVer == 9 && minVer > 1 && JSDE_CLIENT_VERSION < JSDE_VERSION_91) {
// we can't connect to ArcSDE 9.2 with the arcsde 9.0 jars. It
// just won't
// work when trying to draw maps. Oh well, at least we'll warn
// people.
LOGGER.severe("\n\n**************************\n"
+ "DANGER DANGER DANGER!!! You're using the ArcSDE 9.0 (or earlier) jars with "
+ "ArcSDE "
+ majVer
+ "."
+ minVer
+ " on host '"
+ config.getServerName()
+ "' . "
+ "This PROBABLY WON'T WORK. If you have issues "
+ "or unexplained exceptions when rendering maps, upgrade your ArcSDE jars to version "
+ "9.2 or higher. See http://docs.codehaus.org/display/GEOTOOLS/ArcSDE+Plugin\n"
+ "**************************\n\n");
}
// if a version was specified, verify it exists
final String versionName = config.getVersion();
if (versionName != null && !("".equals(versionName.trim()))) {
session.issue(new Commands.GetVersionCommand(versionName));
}
} finally {
session.dispose();
}
String namespaceUri = config.getNamespaceUri();
if (namespaceUri != null && "".equals(namespaceUri.trim())) {
namespaceUri = null;