When you make a transaction you can include a text string called a handle,
this string will show up in the logs and also in any error message
returned.

I usually use this to record a client name or something so I can see what
is going on with multiple users... And if there is an exception know who
did it. You may also want to use the client application name, or method
name or use-case.

There is no preflight check, you have access to the XML Schema to validate
your content before sending. That does not protect you from the disk being
full or similar.

Jody

On Friday, June 6, 2014, electrotype <[email protected]> wrote:

>  Since Geoserver won't use the "handles" for some types of errors, is
> there a way to do prior validation before sending the request to GeoServer,
> so those errors can be managed "per action"? What kind of errors will
> prevent GeoServer to use the handles? Only those occuring when the
> attributes are of a wrong type?
>
> Thank you both fo your answers.
>
> Julien
>
>
>
>
> On 6/5/2014 7:29 PM, Jody Garnett wrote:
>
> Andrea nailed it, transactions work as a single request. You can use
> "handles" as a note to yourself on what was being performed.
>
>  One last thing that gets missed is that transaction can work against
> more than one data source in a single go.
>
>  Finally if you have more then one editor you can start to look at
> "locking" the data you want to work with, and then referring the lock
> during your transaction.
>
>  Jody Garnett
>
>
> On Thu, Jun 5, 2014 at 11:33 PM, electrotype <[email protected]>
> wrote:
>
>  Hi,
>
> I posted a question on the GIS StackExchange group :
> http://gis.stackexchange.com/questions/99966/transactions-in-geoserver-wfs-is-it-possible-to-know-which-action-failed
> .
>
> I was told maybe I could get more informations by asking on this mailing
> list!
>
> To resume the question :
>
> I'm using Java to send queries to Geoserver using plain HTTP POST requests.
>
> I have a bunch of actions (Insert, Update, Delete) that I need to be
> transactional. If one fails, none should be commited.
>
> Ideally, I'd like to be able to controle the transaction "externally" : To
> start a transaction, to make multiple requests to the Geoserver (one
> request per action), then to commit or rollback the transaction, by myself.
> Is it  possible? I had a quick look at Geotools client and it seems to
> provide such kind of external transaction control. How does it do it?
>
> If controlling the transaction externally is not possible, I guess I have
> to wrap all the actions that need to be transactional in a single
> <wfs:Transaction> element and send that in a single request.
>
> For example :
>
> ------------------------------
>
> <wfs:Transaction service='WFS' version='1.0.0'
>     xmlns:wfs='http://www.opengis.net/wfs'
>     xmlns:gml='http://www.opengis.net/gml'
>     xmlns:ogc='http://www.opengis.net/ogc'
>     xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
>     xsi:schemaLocation='http://www.opengis.net/wfs
>                         http://schemas.opengis.net/wfs/1.0.0/wfs.xsd'>
>     <wfs:Insert>
>        [[FEATURE_TO_INSERT_1]]
>     </wfs:Insert>
>
>     <wfs:Insert>
>        [[FEATURE_TO_INSERT_2]]
>     </wfs:Insert>
>
>     <wfs:Insert>
>        [[FEATURE_TO_INSERT_3]]
>     </wfs:Insert>
>
> </wfs:Transaction>
>
> ------------------------------
>
> That could be acceptable for my application. But the problem is GeoSer
>
>

-- 
Jody Garnett
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to