Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User msfasha's Avatar
    Join Date
    Mar 2003
    Posts
    2
    is it possible to send an object (serialise) using j2me? if not, is there any alternative for sending an object that could be rebuilt at the server side?

  2. #2
    Registered User ppohja's Avatar
    Join Date
    Mar 2003
    Posts
    11
    I assume that you're referring to J2ME/MIDP.

    Mobile Information Device Profile (MIDP) is built over Connected Limited Device Configuration (CLDC). CLDC specification says (5.2.3) that CLDC-conforming Java Virtual Machine does not have reflection features (i.e. features that allow inspection of object structure).

    Consquently, as Java's serialisation relies on reflection, the default serialisation behaviour is not available on J2ME/CLDC/MIDP combination.

    Object serialisation, also known as object marshalling, can however be achieved by coding the functionality by yourself: decide what fields in the object are required in order to save the object's state, define a suitable transfer protocol, and on server side, do de-serialisation.


    Conclusion: Automatic object serialisation is not available on J2ME/CLDC. This functionality can, however, be done on each specific case with some coding.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved