2 Replies Latest reply on Jun 20, 2007 6:54 AM by 843851

    Problem with modify a field of an applet from other applet

      Hi everybody,
      I am developing an application java card. This application has two principal functions. <br>
      1. To manage the student <br>
      2. To manage the loan of the books of the library <br>
      1. Manage the student<br>
      Each student is provided a smart card with a password. A student uses this card to be identified , for example: the entry of the university, the library... The card will store information of its content:<br>
      + pine code<br>
      + Name of the student<br>
      + Addresses it of the student<br>
      + Photograph of the student? ... <br>
      2. Manage the loan of the books of the library <br>
      It makes it possible to manage the loan the book of the library. Each time that a student borrows a book, the librarian will record information necessary to the card. If the student borrowed a number of the book which over the number of licences,he is not borrowed more. And if borrowed books which are exceeded the time to return, this card will be blocked till the student returns this book to the library. To carry out this function, the card will store following information: <br>
      1. The maximum number of books which one can borrow<br>
      2. The number of the books which is borrowed <br>
      3. The code, and the name of the books which is borrowed <br>
      4. delay <br>
      I built two applet, one for the student (StudentApplet) and other for the librarian (LibrarianApplet). The librarian and the student have his own pass. The Librarian can lock and unlock the card by his applet. I declare a variable lock (boolean, lock = false, the card is blocked). <br>
      My question is : how can I do for LibrarianApplet can read, and modify the variable lock of StudentApplet?

      Message was edited by:
        • 1. Re: Problem with modify a field of an applet from other applet
          Good application !
          First, I would recommend you don't store library information on the card simply because if the card is lost, you don't have a record of the books. I recommend you keep track of that information on the back-end. Why would the librarian need to unlock the student applet ? Two ways to approach this...1) I would just have a secure channel between the librarian and the student to store information onto the student card. 2) create a SIO librarian applet on the student card as well. The librarian would communicate to that applet and store data to that applet only. The student data is untouched, uncompromised and the student applet may read the SIO applet.
          • 2. Re: Problem with modify a field of an applet from other applet
            Thank you to recommend me, I do not store information of the books that the student borrowed. I store only information to control the loan and the time of the loan. The librarian has the right to block the card for better controlling the loan. I will test two ways which you presented. But the problem it is that there are little guides to do that, I find that the specification of JavaCard for these two technologies is too simple. I already tested a other solution, I declared the variable lock like a variable static, therefore I can read and modify this variable . But I am afraid that there is problem with security