On 07/04/13 00:06, Sébastien Lorquet wrote:
> Le 03/07/2013 21:45, Ludovic Rousseau a écrit :
>> 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 don't know if is it easy or even possible to avoid this Java wrapper
>> "feature".
> Hello
>
> One possible method would be to use JNA to talk directly to
> libpcsclite.so (or winscard.dll on windows)
> This would allow you to use the pcsclite C API from java.

Yes, this is what I'm planning to do.. Have a POC for this, using some
helper tools to build the wrapper,
if appears to work, so I can use SCard.. methods from Java, but it looks
and feels pretty nasty as compared to
just using javax.smartcardio which uses libjpcsc which is also
built-in.. I also imagine it won't be trivial to get right,
e.g. with regards to object/connection lifecycle and Java Threads. I'm
mitigating this in our case by only
implementing privately for own use cases, and not to conform to
javax.smartcardio entirely. Still
it's probably more effort than one thinks. My idea is to create a
different backend for commons-eid::CardAndTerminalManager
based on that wrapper, and implement only Card and CardTerminal "by the
book", everything else low-level via the wrapper.

Since it's all GPLled, happy to collaborate :-)

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


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

Reply via email to