• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: SimpleDateFormat vs [Deprecated] NSTimestampFormatter
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SimpleDateFormat vs [Deprecated] NSTimestampFormatter


  • Subject: Re: SimpleDateFormat vs [Deprecated] NSTimestampFormatter
  • From: Ken Anderson <email@hidden>
  • Date: Wed, 9 Jul 2008 10:56:55 -0400

umm...  pretty much all of it.

If you're allocating all the objects you deal with inside your components, you probably aren't faced with many issues, but any time you start considering anything that is shared, you have to consider the fact that java is natively multi-threaded, and there are always other threads running, even if you're not concurrently handling requests.

For instance, if you always instantiate a formatter inside your component and that thread is the only one that know about it, you should be fine. However, if you're sharing an instance (usually for performance reasons), you need to be aware of the fact that it could be called from multiple places at the same time.

Ken

On Jul 9, 2008, at 10:18 AM, Gennady Kushnir wrote:

Hmm...
I'm not quite shure in what parts of WO programming it is vital to be
thread safe?

2008/7/9 Ken Anderson <email@hidden>:
I'm sure Pierre could answer this better than anyone else, but I always lock
NSTimestampFormatter when used in multi-threaded situations...


On Jul 8, 2008, at 7:03 PM, Chuck Hill wrote:

Also note that unlike NSTimestampFormatter, SimpleDateFormat is not thread
safe. At least NSTimestampFormatter is not documented to be non- thread
safe.



_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: SimpleDateFormat vs [Deprecated] NSTimestampFormatter
      • From: Chuck Hill <email@hidden>
References: 
 >SimpleDateFormat vs [Deprecated] NSTimestampFormatter (From: "Gennady Kushnir" <email@hidden>)
 >Re: SimpleDateFormat vs [Deprecated] NSTimestampFormatter (From: Chuck Hill <email@hidden>)
 >Re: SimpleDateFormat vs [Deprecated] NSTimestampFormatter (From: Ken Anderson <email@hidden>)
 >Re: SimpleDateFormat vs [Deprecated] NSTimestampFormatter (From: "Gennady Kushnir" <email@hidden>)

  • Prev by Date: Re: SimpleDateFormat vs [Deprecated] NSTimestampFormatter
  • Next by Date: HINT: If you ever switch to ERPrototypes ...
  • Previous by thread: Re: SimpleDateFormat vs [Deprecated] NSTimestampFormatter
  • Next by thread: Re: SimpleDateFormat vs [Deprecated] NSTimestampFormatter
  • Index(es):
    • Date
    • Thread