Hi Charles,

you're right, there is no support for versined featureclasses on arcsde right 
now, so thanks for bringing the topic up.
I admit I have no real experience on dealing with versioned datasets on 
arcsde, so your contributions are well appreciated.

What I would need to do is if your patch only works for versiones tables or a 
non versioned one would keep behaving as usual.

I'm also interested in what the rest of the geotools community thinks about if 
and how we should support versioning from an API point of view. If not a 
requisite for geotools at all, we could make the needed enhancements to the 
arcsde plugin and let users use the arcsde specific API, but it would be more 
encouraging if we could attack the problem for the toolkit.

Charles, would you be interested in working on versioning support for arcsde 
beyond the patch just sent? I would be happy to help you in whatever you 
need.


regards,

Gabriel.

On Wednesday 30 August 2006 06:06, [EMAIL PROTECTED] wrote:
> Hello,
>
> It seems that the ArcSDE plugin does not manage the ESRI versioning
> mechanism. When a geodatabase is registered as versioned, no transaction
> can be done, throwing an IOException without any message.
>
> Is there a plan to support versioning, or has there ever been a request for
> it ?
>
> At a first glance, it may be possible to resolve this problem using the
> SeVersion and SeState objects defined in the ArcSDE java API. For example,
> I have made some changes to the ArcSDEFeatureWriter.remove() method (from
> line 224, for more see attached file) to get finally :
>
> **********************************************
>
> try {
>         connection = getConnection();
>
>         // Retrieve the version's information from ArcSDE.
>         SeVersion editVersion = new SeVersion(connection, "SDE.DEFAULT");
>         // Retrieve the version's state information.
>         SeState versionState = new SeState(connection,                     
>           editVersion.getStateId() );
>
>         // Create a new state from the version's state.
>         // The version's state must be closed for this operation.
>         if (versionState.isOpen()) {
>             versionState.close();
>         }
>         SeState editState = new SeState(connection);
>         editState.create(versionState.getId());
>
>         SeDelete seDelete = new SeDelete(connection);
>
>         // Specify the state that you want to edit.
>         // This statement is practically the only addition to a versioned
> stream // operation ( update/insert/delete/query ) when comparing //
> non-versioned and versioned stream operations.
>         seDelete.setState(
>                 editState.getId(),
>                 new SeObjectId(SeState.SE_NULL_STATE_ID),
>                 SeState.SE_STATE_DIFF_NOCHECK
>                 );
>
>
>         long featureId = ArcSDEAdapter.getNumericFid(feature.getID());
>         SeObjectId objectID = new SeObjectId(featureId);
>
>         seDelete.byId(this.layer.getQualifiedName(), objectID);
>         seDelete.close();
>
>         // Change the version's state pointer to the last edit state.
>         editVersion.changeState(editState.getId());
>
>         versionState.compressTree();
>
>         //this.dataStore.fireRemoved(feature);
>
> } catch (SeException see) {
>         LOGGER.log(Level.SEVERE, see.getSeError().getErrDesc(), see);
>         throw new IOException(see.getMessage());
> } catch (Exception e) {
>         LOGGER.log(Level.SEVERE, e.getMessage(), e);
>         throw new IOException(e.getMessage());
> } finally {
>         releaseConnection(connection);
> }
>
> ******************************************
>
>
> And thanks for your great job,
>
> Charles

-- 
Gabriel Roldán ([EMAIL PROTECTED])
Axios Engineering (http://www.axios.es)
Tel. +34 944 41 63 84
Fax. +34 944 41 64 90

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to