My midlet is meant to register an alarm but when I test it on my Nokia 2680s-2 this is what happens;
When I exit the midlet by pressing the soft key that has the exit command the midlet does not wake up at the required time meaning that the alarm time was not registered in the push registry. However when I exit the midlet by pressing the power off/on key, the phone prompts to respond as to whether you want the midlet to auto start (SecurityException) when you accept, the midlet alarm time is registered and it auto starts.

My commandaction listener handles the exit command as follows:
if (command == myExit)
{
notifyDestroyed();
}

The alarm registration is handled in the destroyapp() as below:
public void destroyApp(boolean unconditional)
{
notifyDestroyed();
try
{
setMidletWakeupTime(someTimeValueAsLong);
}
catch(ClassNotFoundException cnfe)
{
}
catch(ConnectionNotFoundException cnfe)
{
}
catch(SecurityException se)
{
}
}

The setMidletWakeupTime function code is as follows:

public void setMidletWakeupTime(long wakeupTime) throws ClassNotFoundException, ConnectionNotFoundException, SecurityException
{
String className = this.getClass().getName();
PushRegistry.registerAlarm(className, wakeupTime);
}