The MIDP security model needs to be explained in two parts:
The phone (or emulator) contains a security policy.
Security policy consists of several domains.
each domain defines functional groups and root certificates.
the functional group decides which security settings (auto always agree, user always agrees, user agrees once ...) are available in the domain for which the protected API (i.e. messaging).
The domain that applies to your MIDlet depends on which root certificate trusts the certificate with which you signed your MIDlet.
Your problem is that there is a mismatch between what you consider the security settings for the API you want in the domain that you think belongs to your MIDlet and what is actually defined in the security policy of the emulator.
EDIT:
for WTK based emulators:
In the folder ${netbeans_installation_folder}\mobility8\WTK2.5.2\j2mewtk_template\appdb\ there are 3 _policy.txt* files.
Each of them contains a list of definitions of an "alias" and a list of "domain" definitions.
Make each domain the same content as the "maximum" domain.
After that, your emulator will no longer request any user rights .
If you have already used the emulator contained in Netbeans, you probably want to make the same changes to the ${netbeans_installation_folder}\mobility8\WTK2.5.2\appdb\ .
michael aubert
source share