• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help needed understand JTWI 1.0 Spec

 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On page 14, section 3.2 of JTWI 1.0 Specification, it says that "A compliant implementation must allow a MIDlet suite to create a minimum of 10 simultaneously running threads" under the heading "Requirement Text". And under the heading "Justification/Notes", it says that "Although many implementations can support more threads, MIDlet developers are encouraged to stay within these bounds."

Does it mean that the device that is conformed to JTWI 1.0 Specification must allow at least 10 simultaneously running threads and that amount of threads is limited for MIDlet developers? So does it simply mean that only 10 threads are allowed for MIDlet developers?

The thing is that I am not quite clear with the sentence "MIDlet developers are encouraged to stay within these bounds".... Anyone? Help me!!!
 
manoj pillai
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes JTWI guarantees upto 10 simultaneous threads in all compliant devices and it doesnt restrict the developer from opening more than 10 threads. All it says is it cannot guarantee that your 11th thread will run in all JTWI compliant devices. So in order to keep your application portable across all JTWI compliant devices you have to stick to the 10 threads max rule.
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by manoj p:
Yes JTWI guarantees upto 10 simultaneous threads in all compliant devices and it doesnt restrict the developer from opening more than 10 threads. All it says is it cannot guarantee that your 11th thread will run in all JTWI compliant devices. So in order to keep your application portable across all JTWI compliant devices you have to stick to the 10 threads max rule.


But, manoj, on page 14, section 3.2 of JTWI 1.0 Specification, it says that "A compliant implementation must allow a MIDlet suite to create a minimum of 10 simultaneously running threads" under the reading "Requirement Text".

It is not the maximum of 10 threads... But I do understand what u mean by 11th thread is not guaranteed... Thank you for your explanation...
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know that that wording can be confusing, but it means what was already said, that you can get up to 10 without worrying if the device will allow it or not. If it is JTWI compliant then it must allow up to 10 at least.

If you were to word it saying that up to 10 is guaranteed, how would you say it.

Mark
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got it, Mark... It means that maximum of 10 threads is allowed and JTWI-compliant device should allow at least 10 threads for the developers... Thanks...
 
Sathya Srinivasan
Ranch Hand
Posts: 379
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Err... Looking at Ko Ko's response, it looks like something got lost in the translation.

So, here's my bid at the explanation.

Any J2ME device can allow an application to create a set of threads depending on its ability.

However, if this were the case, different J2ME devices will have different values for the maximum threads that can be started by an application in that device. For example, a Nokia 6610 may allow a max of 5 threads, a Sony T610 may allow a max of 2 threads and a Sony P800 may allow a max of 15 threads since they have different memory and processor capacities.

Since JTWI is all about creating standards between J2ME devices, it specifies some arbitrary, but reasonable MINIMUM values to features such as maximum threads, timer resolution, number of record stores that can be open, etc. so that developers need not worry about the limitations of each device on which the application may be installed.

In this case, JTWI says that any J2ME device that claims to be JTWI 1.0 compliant must allow an application to use AT LEAST 10 threads.

That is, an application can happily create UP TO 10 threads without having to worry about the model of the device where it is being installed, as long as that device is JTWI 1.0 compliant.

The application, of course, can start more threads if it knows that the device where it is installed supports more than 10 threads, but then it is not platform independent anymore. If it is installed on another JTWI 1.0 compliant device, it might not get 15 threads because the device is required to support at least 10 threads, and for all you know, it might support up to 12 threads and not more than that.

Although long winded, hope it makes things clearer!
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, Sathya for your great and clear explanation...

But one quesiton has just arised in my mind... So do u mean Nokia 6610 and Sony T610 in your example are not compliant to JTWI 1.0 Specification? I hope this would be the last question and I got clear in everything about the maximum thread in JTWI 1.0 Spec...

Thanks again, Sathya...
 
Sathya Srinivasan
Ranch Hand
Posts: 379
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To my knowledge, they aren't.

In order to be JTWI 1.0 compliant, a device must mandatorily support

  • MIDP 2.0
  • CLDC 1.0 and
  • WMA 1.1


  • It can also optionally support MMAPI 1.1.

    As far as I know, all Sony models prior to P800 don't even support MIDP 2.0 and hence, are not compliant.

    You can check the product websites for these devices though. It will definitely mention if the device is JTWI 1.0 compliant or not.
     
    Ko Ko Naing
    Ranch Hand
    Posts: 3178
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Great! Thanks a lot, Sathya... Your explanations are really helpful...
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic