Re: should ExtendedTypes be thread safe?

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Tue Jul 26 2005 - 16:06:11 EDT

  • Next message: Andrus Adamchik: "Re: Using a custom PK Table"

    > Hello.
    >
    > I am creating a ExtendedType that uses a parser-object. I want to
    > reuse the parser object as much as possible. Will a single instance
    > of my ExtendedType be used by more than one thread at a time? If so -
    > I guess I will use a ThreadLocal to hold the parser instance.
    >
    > Regards,
    > - Tore.
    >

    ThreadLocal makes more sense. ExtendedType instances are not thread-safe
    and can be reused by multiple queries simulteneously.

    BTW, thanks for the "mapping geometries" Wiki post -
    http://objectstyle.org/confluence/display/CAY/Mapping+JTS+Geometries

    Andrus



    This archive was generated by hypermail 2.0.0 : Tue Jul 26 2005 - 16:06:11 EDT