Tom,
we have written SmartCard.start() and our IBM CardServices in a way that allows
you to do as many start/close pairs as you like and to use the CardServices from
parallel threads and still have them work correctly through the same CardChannel
against the same card.  I am not sure whether we postulated that as a design
giudeline for all CardServices (Chistoph, what do the new Gemplus CardServices
here?).

On the other hand it does not cost you much to do that singleton yourself.  I
recommend that you decide this based on the question if you have a good
abstraction for that singleton (can you find a plausible name for it and can you
easily describe its responsibility in your application?).

Registered as CTListener should be everyobject that needs to react on card
insertion or removal.  If all card-related function goes through an
application-specific singleton, then this singleton is the only object
interested in listening.
         Frank Seliger
IBM Pervasive Computing Division
Schoenaicher Str. 220,    71032 Boeblingen,   Germany
[EMAIL PROTECTED]                                                        Tel.
+49-7031-16-3142


[EMAIL PROTECTED] on 99-12-23 05:59:03

Please respond to "Tom McKearney" <[EMAIL PROTECTED]>

To:   [EMAIL PROTECTED]
cc:    (bcc: Frank Seliger/Germany/IBM)
Subject:  [OCF]  Application Design Help




I have many (about 5-10)  objects that need to use a single CardService.

Should I be doing a Smartcard.start() and CardRequest for each object (all
in same thread), or should I have a Singleton object that returns one
CardService for everybody?  Then, the Singleton would be registered as a
CTListener?

How would you recommend approaching this?

I welcome any and all suggestions.

- Tom





---
> Visit the OpenCard web site at http://www.opencard.org/ for more
> information on OpenCard---binaries, source code, documents.
> This list is being archived at http://www.opencard.org/archive/opencard/

! To unsubscribe from the [EMAIL PROTECTED] mailing list send an email
! to
!                           [EMAIL PROTECTED]
! containing the word
!                           unsubscribe
! in the body.






---
> Visit the OpenCard web site at http://www.opencard.org/ for more
> information on OpenCard---binaries, source code, documents.
> This list is being archived at http://www.opencard.org/archive/opencard/

! To unsubscribe from the [EMAIL PROTECTED] mailing list send an email
! to
!                           [EMAIL PROTECTED]
! containing the word
!                           unsubscribe 
! in the body.

Reply via email to