On 03/07/2013 21:45, Ludovic Rousseau wrote :
> 2013/7/3 MURILO COSTA <[email protected]>:
>> I thought that maybe can be a Java problem, do you know some
>> software to do this kind of test (parallelism) ? I'll check if pcsc-tools
>> can do that...
>
> I guess it is a javax.smartcardio "limitation".
>
> You need to create one context per reader using SCardEstablishContext.
> I bet the Java wrapper creates only one context for all the readers.
> In pcsc-lite the context is associated to a mutex. So all your
> commands will block on the same mutex even if they use different
> readers.

I confirm that the C code I have which achieves concurrency
both under Windows and PCSC-lite uses a separate context (as
obtained by SCardEstablishContext) per thread.

Anyone has first-hand experience invalidating the following theory?
- Window's PCSC allows concurrency between readers, provided
  there is a thread per pending SCardTransmit;
- PCSC-lite allows concurrency between readers, provided there is a
  thread per pending SCardTransmit and each one uses its own
  context as obtained per SCardEstablishContext;
- javax.smartcardio uses a single SCardEstablishContext;
- hence javax.smartcardio allows concurrency on Windows, but not Linux.


_______________________________________________
Muscle mailing list
[email protected]
http://lists.musclecard.com/mailman/listinfo/muscle_lists.musclecard.com

Reply via email to