this is sample how to lock the screen from background thread by pushing a Dialog.

private void notifyUser(String msg)
    {
        UiEngine ui = Ui.getUiEngine();
        EncodedImage icon = Theme.getIcon(false, true);
        Bitmap bm = null;
        if (icon != null) {
            bm = icon.getBitmap();
        } else {
            bm = Bitmap.getPredefinedBitmap(Bitmap.EXCLAMATION);
        }
        synchronized (Application.getEventLock()) {
            Screen screen = new Dialog(Dialog.D_OK, msg, Dialog.OK,
                    bm, Manager.VERTICAL_SCROLL) {

                protected void onUiEngineAttached(boolean attached) {

                    if (locked) {
                        locked = false;
                        foreGround();
                    }

                    super.onUiEngineAttached(attached);
                    addKeyListener(new myKeyPadListener());
                }
            };
            ui.pushGlobalScreen(screen, 1, UiEngine.GLOBAL_SHOW_LOWER);
        }
    }
private void notifyUser(String msg) {
        UiEngine ui = Ui.getUiEngine();
        EncodedImage icon = Theme.getIcon(false, true);
        Bitmap bm = null;
        if (icon != null) {
            bm = icon.getBitmap();
        } else {
            bm = Bitmap.getPredefinedBitmap(Bitmap.EXCLAMATION);
        }
        synchronized (Application.getEventLock()) {
            Screen screen = new Dialog(Dialog.D_OK, msg, Dialog.OK, bm, Manager.VERTICAL_SCROLL) {

                protected void onUiEngineAttached(boolean attached) {
                    super.onUiEngineAttached(attached);
                    addKeyListener(new SalatKeyPadListener());
                    Timer tmr = new Timer();
                    TimerTask tt = new TimerTask() {

                        public void run() {
                            invalidate();
                        }
                    };
                    tmr.scheduleAtFixedRate(tt, 500, 500);
                }

                protected void onVisibilityChange(boolean visible) {
                    if (notified) {
                        CancelNotification();
                    }
                }

              public boolean onClose() {
                    if (notified) {
                        CancelNotification();
                    }
                    return super.onClose();
                }
            };
            ui.pushGlobalScreen(screen, 1, UiEngine.GLOBAL_SHOW_LOWER);
        }
    }

[1] http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&message.id=21625