Sudden shutdown when plugged in, battery reads 0% but then charges okay
This has happened twice in the span of a few months, and I'm getting worried that my laptop is beginning to fail . . . My 2009 MacBook Pro i7 shuts down without warning when plugged in. I am able to re-start right away, but the battery shows that it has no charge, and immediately begins charging from 0% to 100% over the course of an hour or two, and everything appears back to normal. The first time it happened, I assumed the charger plug had inadvertently gotten loose at one end or the other, and that I just hadn't noticed that the battery was losing power; however, when it happened today, I'm certain nothing changed with the charger plugs at either end from the time it suddenly shut down to when I re-started and the battery began charging. Has anyone else had this same issue? Could it be a problem with my charger or with my laptop's battery? I am hours away from the nearest Apple Store, so I'm hoping someone here will have some insight.
A couple of notes about my laptop:
-- I use it more like a desktop system---it is almost always plugged in, because it is attached to several peripheral hard drives, an external monitor and keyboard, etc. Should I make more of an effort to periodically disconnect my laptop and use it with only battery power?
-- A year or two ago, I had my logic board replaced due to the "black screen" issue several of the 2009-10 MacBook Pro's were known to have, which mine had. That issue has not occurred since the logic board was replaced.
Thank you in advance for your help!
MacBook Pro, Mac OS X (10.6.8)