AssertIdentity() custom identity Asserter never invoked method

I'm trying to implement a custom identity asserter. I created my Asserter custom identity following the documentation (http://download.oracle.com/docs/cd/E12839_01/web.1111/e13718/ia.htm#i1156163) and an example on Weblogic wonders (http://weblogic-wonders.com/weblogic/2010/03/15/custom-identity-asserter-for-weblogic-server/).

The problem is that the assertIdentity() method is not called.

I used a simple web application to test the asserter. Its web.xml is like this:
< security constraint >
< web-resource-collection >
Pages protected < Web-resource-name > < / web-resource-name >
< url-pattern >/app / * < / url-pattern >
< / web-resource-collection >
<!-this-> a defined security role References
<>auth-constraint
MYROLE < role name > < / role name > <!-MYROLE is also defined in weblogic.xml as part of security-role-assignment->
< / auth-constraint >
< user-data-constraint >
> transport security < NONE < / transport-guarantee >
< / user-data-constraint >
< / security constraint >

<! - authentication method - >
<>login-config
FORM < auth-method > < / auth-method >
< form-login-config >
login.jsp < form-login-page > < / form-login-page >
rejected.jsp < form-error-page > < / form-error-page >
< / form-login-config >
< / login-config >

These are the elements of MDF of my identity Asserter:
< MBeanType
Name = "MyAsserter".
DisplayName = "MyAsserter."
Package = "com.pccw.security.policysvr.agent.weblogic."
Will = "weblogic.management.security.authentication.IdentityAsserter."
PersistPolicy = "OnUpdate".
/ >
< MBeanAttribute
Name = "ProviderClassName".
Type = "java.lang.String".
Writeable = "false".
By default = "& quot; test. MyIdentityAsserter & quot; »
/ >
< MBeanAttribute
Name = "Description".
Type = "java.lang.String".
Writeable = "false".
By default = "& quot; My identity Asserter & quot; »
/ >
< MBeanAttribute
Name = "Version".
Type = "java.lang.String".
Writeable = "false".
By default = "& quot; 1.0 & quot; »
/ >
< MBeanAttribute
Name = "Base64DecodingRequired".
Type = 'boolean '.
Writeable = "false".
Default = "false".
/ >
< MBeanAttribute
Name = "SupportedTypes.
Type = "java.lang.String [].
Writeable = "false".
Default = "new String() {& quot; MyToken & quot ;} »
/ >
< MBeanAttribute
Name = "ActiveTypes".
Type = "java.lang.String [].
Default = "new String() {& quot; MyToken & quot ;} »
/ >

At this point the MyIdentityAsserter checks simply token type is correct, then return a CallbackHandler custom that contains a hard-coded user name.

Here is the custom CallbackHandler:

/ public class MyAssertionCallbackHandler implements CallbackHandler {}

private String userName;

public MyAssertionCallbackHandler (String userName) {}
Me.username = username;
}

@Override
public void handle ([recall] recalls) survey IOException,
{UnsupportedCallbackException}
for (c reminder: reminders) {}
If (ch. instanceof NameCallback) {}
NameCallback nc = c (NameCallback);
nc.setName (userName);
}
}
}
}

In the web console, I configured MyIdentityAsserter as the first element. When you start the server, I saw its initialize method is called. However, when I hit a page protected in my test application, he went directly on the login form.

At first I thought that there is a problem with passing the token, so I used "Modify Headers" add-on for FireFox to stick MyToken header in all applications and monitored with Fiddler2. I saw the header, but MyIdentityAsserter is not always invoked; not in my application of test and not during the connection to the admin console.

Then I changed "MyToken" in "User-Agent", so that it is always present. Hitting a page protected in my test application went directly to the login form; However, this connection to the console admin time called assertIdentity().

Why is this? What I am doing wrong? Y did he do any scope of particular debugging I can turn on to see what decisions WLS? I already lit atz and DebugSecurity but I don't see anything relevant in the newspapers.

Published by: user6476654 on March 21, 2011 15:27

Replace your CLIENT-CERT auth metod

CLIENT-CERT

If it still does not work, send me a message to [email protected]

Faisal
http://www.WebLogic-wonders.com

Tags: Oracle

Similar Questions

  • WebCenter portal with the custom identity assertion provider?

    Hi all

    I developed all the custom identity assertion provider that always fills a topic for weblogic without validating the token as a test.

    I moved the IdA provider at the top of the list of providers. and put the flag of control for the other provider of authentication as "SUFFICIENT."

    I was expecting when I access the WebCenter portal (http://webcenter.local, host: 7777 / webcenter), default login page jump the homepage appear automatically connected by the custom of IdA provider like weblogic.

    But there is no tracks from the custom of IdA WC_Spaces log file provider and the default login page has been demonstrated.

    Please let me know what the problem...

    Thank you and best regards,

    I used a phony. After that I changed the token as 'JSESSIONID', the custom of IdA provider worked well.

  • My asserter custom identity is ignored - what did I miss?

    Hello-
    AssertIdentity of my custom identity asserter method is never called - even though I have checked that the correct token is added to the request header. I hope for some guidance as to what lack me.

    1. I downloaded this sample application that uses the security of ADF: http://jdevsamples.googlecode.com/files/ADFSecurityWL.zip
    I changed the application to:
    -Added a filter to empty the request to System.out headers so I could verify that the token is successfully added to the request header
    -changed the auth-method in the BASIC CLIENT-CERT in Web.XML
    2. I also downloaded the examples of providers of authentication (for WLS 9.1) here: https://codesamples.samplecode.oracle.com/servlets/tracking?id=S224
    and created an asserter custom identity based on the example of asserter identity provider in the application.
    3. I created an EAR file for the app and a pot of mbean for the affirmation of personal identity provider.
    4. I've added the mbean jar to the correct directory under weblogic, weblogic is restarted and created an instance of my provider in the field of security. I also reorganized the mine suppliers would be first (not sure if it matters). Then I rebooted weblogic again. I checked that my provider has been in the list of suppliers and the chosen one "Types Active" included my token type.
    5. I have deployed the weblogic application EAR file.
    6. I created a test program based on the test program in the download of example of suppliers (above) and connected to the deployed application. I checked the added test program the correct token to the application. Filter my dumped app headers and I could see the token there.
    7. my custom identity assertion provider has System.out.println calls initialize() and assertIdentity() methods. I see that the initialize() method is called when I start weblogic. However, I never see the assertIdentity() to System.out.println method calls when trying to reach the app and these calls are the 1st thing to the method.
    8. I am using WebLogic Server version 10.3.3.0

    Yes, there is an obvious step, that I missed? (I'm new on using WLS, so it wouldn't surprise me if I have something really obvious false...)

    Thanks for reading my question,
    -Scott

    Follow the steps mentioned in the link to create Custom Identity Asseter for Weblogic

    http://WebLogic-wonders.com/WebLogic/2010/03/15/custom-identity-Asserter-for-WebLogic-Server/

  • Custom for Weblogic Server identity Asserter

    I created a Custom Identity Asserter for Weblogic Server, but when I try to access it from my cleint, I get an error of 401 - not authorized
    even when I send a valid token. The token is encoded in Base64 as marked in the created security provider.

    Can someone help me on this.

    -Raj

    allow me to mail and debug log file SecurityATN

    [email protected]

  • Facing a problem with writing the custom for WLS identity assertion provider

    I am facing a problem with writing the custom for WLS identity assertion provider.

    Requirement:

    Asserter identity configured in WLS should get called when the following cookie is sent in a request by my application
    cookie name: OAMAuthnCookie_blr1234567.idc.oracle.com:7777

    I added the name of the cookie as a token of support and Active token in WeblogicCustomIdentityAsserter.xml

    < MBeanAttribute
    Name = "SupportedTypes.
    Type = "java.lang.String [].
    Writeable = "false".
    Default = "new String() {& quot; OAMAuthnCookie_blr1234567.idc.oracle.com:7777 & quot ;}.
    / >
    <!-ActiveTypes attribute contains the subset of your mbean SupportedTypes who are active in the area. ->
    < MBeanAttribute
    Name = "ActiveTypes".
    Type = "java.lang.String [].
    Default = "new String() {& quot; OAMAuthnCookie_blr1234567.idc.oracle.com:7777 & quot ;}.
    / >

    Problem:

    Identity asserter provider is not invoked for the request that has the cookie named OAMAuthnCookie_blr1234567.idc.oracle.com:7777.

    I did some experiments with the cookie name, to see where the problem could be

    Identity asserter provider is triggered for the following cookies:
    OAMAuthnCookie_blr1234567.idc.oracle.com7777.
    blr1234567. IDC. Oracle
    blr12_XXX. IDC. Oracle.com

    and it does not work for cookie name - OAMAuthnCookie_blr1234567.idc.oracle.com:7777

    I think that the name of the token supports not the colon. I don't have control over the name of the cookie, two points will always be

    Tried it with giving the name of the cookie after the encoding of the colon

    < MBeanAttribute

    Name = "SupportedTypes.

    Type = "java.lang.String [].

    Writeable = "false".

    Default = "new String() {& quot; OAMAuthnCookie_blr2211441.idc.oracle.com & #58;. 7777 & quot ;} »

    / >


    But still does not work
    Am I missing something? Any help will be appreciated.
    Help, please!

    colon ': ' is an illegal character in the name of the cookie.

    RFC 2616, Section 2.2 says:

    token = 1 *.

    separators = "(" | ")" | " <" |="" "="">" | " @"

    | "," | ";" | ":" | " \" |<">

    | "/" | "[" | "]" | "?" | "="

    | "{" | "}" | SP | HT

    It is clear ":" a "separator" and thus not allowed in a token or a cookie name.

  • Error-50400 occurred to the Invoke method: FIFO. Read in Host.vi

    Hey there,

    We have sensors on an engine which are connected to a Board of Directors OR cRIO 9014 (with a NI9411 6 digital input modul channels) and from there, via the network to a host computer.

    cRIO jury: the jury cRIO collects data from the engine and stores in a buffer, it's because the network is to slow for the size of the data

    Host: bed of the host computer in the network buffer on the map of cRIO, on the host computer, it takes specific portions of the data to create charts of the engine pressure

    Error:

    Error-50400 occurred to the Invoke method: FIFO. Read in Host.vi

    Possible reasons:
    The transfer did not complete in the time-out or the specified number of retries.

    This error occurs in the following scenario:

    -motor is running

    -cRIO is running

    When I press the Start button (boolean 3) in the host.VI to start reading the data of the card AFTER I pressed the button to run the host VI.

    The error will not occur if I pressed the button start (3-Boolean) BEFORE I pressed the button to run the host VI.

    We tried to increase the timeout, but it still does not work, the error occurs!

    We would be really happy if you could look over it and help us in this case! If you need more information or if we need to clarify a specific part, please let us know!

    We have included the VI in the attachment!

    Thanks in advance!

    CHRISSE,

    There are a few things wrong in your application, if I can offer a few suggestions.

    First of all, your loops are not running in parallel.  In fact, they are in while loops with a real constant wired for them. I don't know if this is normal for debugging, or on accident.  I would put the question (read pulling elements Dummies) out of your hand while loop.

    Your second nested while that the loop (that of the poll the number of items and then shooting them) will execute only once and can make only a few samples.  I don't think that that's what you're looking for here, and there are two ways we can go here.  You might question continually until you have 0 items available for x time, then you know that you have no more available samples and you can process all the data, OR you can put your computer through this loop and always just write in the file immediately in the form x samples are drawn.

    In addition, the stop of the main loop condition is ( <= 3)="" therefore,="" it="" will="" run="" once="" and="" then="" stop. ="" maybe="" you="" mean="">= 3?

    In addition, you have "add to the file" disabled on your writing to the worksheet, so whenever you write that you are overwriting the old data.  If you want to write constantly, you will lose data.  This can be cured in this affecting true (requiring a new name for file or programmatically removing the old worksheet each time that you run the vi) OR you can recover all your data in a shift register and only write to the file once you have all your available data.

    The error you see is because you try to close your FPGA reference twice.  Simply close it once.

    After seeing your overview, I think this can be cured by simply reading wiring to get your 1440 X 4 items, but as we have seen, this does not work.  Something happens in your system... that's what I want you do... just run the following... code and let me know how much remaining elements it gives you... Once the number remains (I hope for this, and your engine continue to function), press stop, and all values will be presented on a graph for you.  My broken wires are because I do not have the FPGA VI.

  • /Shell/action.XML:1748: could not invoke method cloneProjectBP

    Hello

    This error [/ shell / action.xml:1748: could not invoke method cloneProjectBP] creating new project using project creation BP. It happens after you import certain configuration of workflow BPs in shell model. But it works for the old model.

    Thank you

    You have to make a ticket with the support of Oracle to better understand this issue.

    Here are the patches from the past for this kind of question. But better to seek the support of the Oracle.

    (1) re - assign groups / assignees to each step in each workflow for all BP

    (2) check your permissions on the application BP project

    (3) check the WF design and the redeployment of BP all the new

    (4) check whether everything has been removed, which was used in queries, forms etc.

    (5) question with Table space so ask your DBA to increase the table space

    Thank you

    Samba

  • Log in via the custom identity provider

    Hey, I have an HTML article that will use the new setAuthToken API to provide custom user authentication, and I can call it with an authToken is allowed on the right to connect the user to the article.

    However, I am having a problem to set up the custom identity provider required for this API working. I set the project settings to use a custom IdP and created a page which checks the credentials and retrieve an authToken. Now the user selects sign to from the account model a web view appears with the IDP login page. Once the user logs were can I redirect to return the authToken to the APP? I can see the https://es.publish.adobe.com/oauth2 URL in the case of the mouth, but don't see any for the Custom POI... This was again set up?

    Thanks in advance,

    Alex

    Hi Alex,

    The authentication URL should be in your generic identity provider, implemented, the page that you created to verify the credentials. When this page is launched from the Viewer, there are several query parameters that are passed with her. This includes:

    redirectUri: the recall of generic URI authentication.

    projectId: ID of the application project

    appId: ID of the application of the observer.

    appVersion: the version of the application of the observer.

    UUID: the identifier of the device.

    Your page should analyze the redirectUri on URL parameters and redirect it when your authentication is complete. When this redirectUri forwarding, you can include the following information in the application:

    authToken: authToken to the user after the successful login.

    expiresIn: optional duration in seconds before the expiration of the authToken.

    error: error after the failure of the connection. Error or authToken must be specified but not both.

    I hope this helps.

    Thank you

    Christine

  • Invoking methods in application modules

    Hello
    I am absolutely new to oracle ADF. I was recently working with the module of the application. My question is how to call a custom method (say myCustomMeth(String str)) living inside my application to my bean Managed module? I saw an example where the operation (i.e. method) was directly made slip and fall on the data control jspx page. What is the right way to do it? I saw an example where the operation binding has been used to invoke a method inside the module of the app, although I did not understand completely the code. I'm really confused now. Help, please.

    Thanks in advance.

    user11930797 wrote:
    My question is how to call a custom method (say myCustomMeth(String str)) living inside my application to my bean Managed module?

    You write the custom Module of Application method and expose yourself to the AOS client interface. In doing so, the operation custom becomes available in AM data control and can be linked to your page jspx.

    I saw an example where the operation (i.e. method) was directly made slip and fall on the data control jspx page. What is the right way to do it? I saw an example where the operation binding has been used to invoke a method inside the module of the app, although I did not understand completely the code.

    Both of the methods that you mention above are used:

    1. you drag the custom method of the data control in JDeveloper and drop it into your page as a command button or link to create a method that binds this way of declaratively. The binding of the method is executed via a command button or link and your custom AM method is called, or

    2. you can create the method binding yourself in the links tab of you jspx page, add the command button into your page and define an action for her listener in your backing bean. In your bean to support action listener, you can write the code needed to perform the binding of the method, which calls your custom method of AM.

    Hope that's clear.

    Nick

  • positionUpdated (const QGeoPositionInfo &amp; info) never invoked

    Based on https://developer.blackberry.com/cascades/documentation/device_platform/location/index.html, I fixed several errors and finished work. However, positionUpdated (const QGeoPositionInfo & info) is never called. Someone at - he successfully got positionUpdated()? You can share your codes?

    Here's the part of my codes:

    GPSinfo::GPSinfo(QObject *parent = 0) :   QObject(parent){
        source = QGeoPositionInfoSource::createDefaultSource(this);
        if (source) {
            bool res =connect(source, SIGNAL(positionUpdated(QGeoPositionInfo)), this,
                    SLOT(positionUpdated(QGeoPositionInfo)));
            Q_ASSERT(res);
            Q_UNUSED(res);
            source->setPreferredPositioningMethods(
            QGeoPositionInfoSource::SatellitePositioningMethods);
            source->setUpdateInterval(1000);
            source->setProperty("backgroundMode", true);
                      source->startUpdates();
        }
    }
    

    By setting the positioning preferred SatellitePositioningMethods methods, you should ideally an unobstructed view of the sky to get an update of position. Have you tried AllPositioningMethods? If you have a wifi connection, you should get an update of position a few seconds and you can confirm if all goes well that your housing is called.

    Kind regards

    Jim

  • JavaScript never invoked in jsff

    Hello

    the use case is jsff, in the column of the table row when the user presses the ENTER key, I need to call some methods subsequently (jdev 11.1.2.3)
    for some reason, I don't see the javascript code that is called.
    I use af:clientListener, af:serverListener pair.
    in fact, the example is represented by Timo Hahn in his blog
    I try to reapply in the page fragment, which contains no document tag...
    Here's what I tried to do and he has never helped...
    Please indicate how to call js in the page fragment
    I considered the blog of Frank as well, but this does not work in my case...
    https://blogs.Oracle.com/jdevotnharvest/entry/gotcha_when_using_javascript_in

    <? XML version = "1.0" encoding = "UTF - 8"? >
    < jsp:root xmlns:jsp = "http://java.sun.com/JSP/Page" version = "2.1".
    xmlns:af = "http://xmlns.oracle.com/adf/faces/rich".
    xmlns:trh = "http://myfaces.apache.org/trinidad/html".
    xmlns:f = "http://java.sun.com/jsf/core" >

    < af:panelGroupLayout id = "pgl4" >
    < af:panelFormLayout id = "pfl1" >
    < trh:script id = 's2' >
    function handleEnterEvent (evt) {}
    var _keyCode = evt.getKeyCode ();
    If (_keyCode == AdfKeyStroke.ENTER_KEY) {}
    model var = evt.getSource ();
    AdfCustomEvent.queue (model, "EnterEvent", (), false);
    evt. Cancel();
    //}
    }
    function handleTableDoubleClick (evt) {}
    var table = evt.getSource ();
    AdfCustomEvent.queue (table, "TableDoubleClickEvent", (), true);
    evt. Cancel();
    }
    < / trh:script >
    < af:resource type = "javascript" >
    function handleEnterEvent (evt) {}
    var _keyCode = evt.getKeyCode ();
    check to enter the key of
    If (_keyCode == AdfKeyStroke.ENTER_KEY) {}
    model var = evt.getSource ();
    AdfCustomEvent.queue (model, "EnterEvent", {fvalue:comp.getSubmittedValue ()}, false);
    evt. Cancel();
    }
    }
    < / af:resource >
    < / af:panelFormLayout >

    < af:panelBox

    < af:table value = "#{bindings." Var DcaRegisterView1.collectionModel}"="row"width ="1200 ".
    ...
    < af:column sortProperty = "#{bindings." DcaRegisterView1.hints.EffectiveUntil.name}"blockable = 'true '.
    < af:inputDate value = "#{row.bindings.EffectiveUntil.inputValue} '"
    required = "#{bindings." DcaRegisterView1.hints.EffectiveUntil.mandatory}.
    columns = "#{bindings." DcaRegisterView1.hints.EffectiveUntil.displayWidth}.
    shortDesc = "#{bindings." DcaRegisterView1.hints.EffectiveUntil.tooltip}"id ="id3">
    < f: validator binding="#{row.bindings.EffectiveUntil.validator}"/ >
    < af:convertDateTime pattern = "#{bindings." DcaRegisterView1.hints.EffectiveUntil.format}"/ >
    < af:clientListener method = "handleEnterEvent" type = "keyPress" / >
    < af:serverListener type = "EnterEvent" method = "#{registerBean.handleEnterEvent}" / >
    < / af:inputDate >
    < / af:column >

    ... page code fragment itself
    < / af:panelBox

    The following works for me:

    The js in the page:

    
            function doSomething(event) {
                alert('Doing something');
            }
    
    

    The call of the js of an inputText within a table component:

    
                
                
              
    

    Did you check any error js with firebug - for example?

    Kind regards

    Koen Verhulst

  • af disclosureListener: twice the Invoking method showDetailItem

    Hi all

    I use Jdeveloper Studio Edition Version 11.1.2.1.0.

    I have an af:panelAccordion, generating af:showDetailItem during execution using the af:forEach of a view component. The code snippet is given below:
    <af:panelAccordion id="pa1" partialTriggers="np1" discloseMany="false" discloseNone="false">
         <af:forEach items="#{bindings.VerticalAppMenus.children}" var="globalMenu" varStatus="globalMenuVarStatus">
              <af:showDetailItem text="#{globalMenu.MenuLabel}" id="sdi1" disclosureListener="#{pageFlowScope.globalMenus.refreshLineMenus}">
                               <f:attribute name="currentVerticalMenuId" value="#{globalMenu.MenuId}"/>
                               <af:tree value="#{bindings.LineAppMenus.treeModel}" var="node"
                                            selectionListener="#{bindings.LineAppMenus.treeModel.makeCurrent}"
                                            rowSelection="single" id="t1">
                                            <f:facet name="nodeStamp">
                                                <af:outputText value="#{node}" id="ot1"/>
                                            </f:facet>
                               </af:tree>
              </af:showDetailItem>
         </af:forEach>
    </af:panelAccordion>
    A through f: attribute Id , which is passed to the refreshLineMenus method, indicated by the disclosureListener property is assigned to each af:showDetailItem . Suppose af:showDetailItem with Id = 2 is currently disclosed and I click on af:showDetailItem with Id = 4 to reveal them. The method pointed to by disclosureListener is being called twice, first with the value 4, then 2. Ideally it can be invoked with a value of 4 only the element that is disclosed has the Id = 4.

    This is the default behavior for the disclosureListener call the method twice. means a time for total communication and one for af: hidden showDetailItem? If Yes, then how can I run a method once on the disclosure of the showDetailItem in the code above?

    Any help will be much appreciated.
    Thank you... Best regards
    Bilal

    Hello

    Yes, there will be 2 invocations...
    one for the older and one for a new...
    so there will be 2 invocations but no 2 application, you can easily know the tab currently selected by DisclosureEvent.isExpanded)

    which will return if the current element is developed or not...

  • Custom display (not Adobe) TIFF method or plugin tags in Lightroom?

    Hi all

    I looked at the images of an industrial capture system that records important data (including timestamps and implemented at the point of data) in as many custom tags TIFFF.

    for example, 65000, 65001, etc..


    These appear with many TIFF visionneurs (PS, LR, spotted in OSX, same exiftool etc...). From my understanding, this is due to fact that they are considered "private tags" that should be ignored because the apps don't know what to do with them.


    Does anyone know of a Plugin for Lightroom that would allow of look one of these types of tags? It would be wonderful to do kinds and selects in these areas.


    Thank you!
    David

    I'm sure there isn't any LR plugin that will show you directly private TIFF tags.

    However, if you are technically minded and lived with the scripts, I think you can create a configuration custom Exiftool to display the tags (see example.config for hints on how to do that - you will probably need to post on the Exiftool forum for help).  Once you have Exiftool showing tags, you can use the Data Explorer plugin to display and group photos in LR by private tags.

  • Sign-up at RemoteNotifier events not firing after having invoked method

    I'm setting up an iOS app.  I need to use the APNS.  The application is implemented at Apple and works, but I am unable to test Push Notifications because I am unable to get a token device.  From my understanding deliverance RemoteNotifier.subscribe should RemoteNotificationEvent.TOKEN to fire.  This never happens.  The code is below.  None of the RemoteNotifier fires.

    var preferredNotificationStyles:Vector. < String > = new Vector. < String >;

    preferredNotificationStyles.push (NotificationStyle.ALERT);

    preferredNotificationStyles.push (NotificationStyle.SOUND);

    preferredNotificationStyles.push (NotificationStyle.BADGE);

    var subscribeOptions:RemoteNotifierSubscribeOptions = new RemoteNotifierSubscribeOptions();

    subscribeOptions.notificationStyles = preferredNotificationStyles;

    var rn:RemoteNotifier = new RemoteNotifier();

    rn.addEventListener (RemoteNotificationEvent.TOKEN, sendDeviceTokenToServer);

    rn.addEventListener (RemoteNotificationEvent.NOTIFICATION, notificationReceivedByApp);

    rn.addEventListener (StatusEvent.STATUS, subscriptionFailureCallback);

    RN. Subscribe (subscribeOptions);

    I was able to get this working by moving the code that deals with RemoteNotifier in its own actionscript class.  I initially had it inside of the

  • SystemListener2 never invoked in the present case.

    here is my code. Is there any suggestion? Thanks,
    
    
    
    
    
    import net.rim.device.api.ui.*;
    import net.rim.device.api.ui.component.*;
    import net.rim.device.api.ui.container.*;
    import net.rim.device.api.system.*;
    
    /**
     *
     */
    public class DeleteHandle extends UiApplication implements SystemListener2{
        public static void main(String args[]){
            UiApplication app = new DeleteHandle();
            app.enterEventDispatcher();
        }
        DeleteHandle() {
            Application.getApplication().addSystemListener(this);
            pushScreen(new AScreen());
        }
    
        public void batteryGood() {}
        public void batteryLow() {}
        public void batteryStatusChange(int status) {}
        public void powerOff() {
            System.out.println("powerOff!");
            Dialog.alert("powerOff!");
        }
        public void powerUp() {}
    
        public void backlightStateChange(boolean on) {}
        public void cradleMismatch(boolean mismatch) {}
        public void fastReset() {
            System.out.println("fastReset");
            int handle=CodeModuleManager.getModuleHandle("DeleteHandle");
            if(handle!=0){
                if(CodeModuleManager.getModuleFlags(handle)==CodeModuleManager.MODULE_FLAG_DELETE)
                    Dialog.alert("Module is being deleted!");
            }
            Dialog.alert("fastReset");
    
        }
        public void powerOffRequested(int reason) {
            System.out.println("powerOffRequested");
            int handle=CodeModuleManager.getModuleHandle("DeleteHandle");
            if(handle!=0){
                if(CodeModuleManager.getModuleFlags(handle)==CodeModuleManager.MODULE_FLAG_DELETE)
                    Dialog.alert("Module is being deleted!");
            }
            Dialog.alert("PowerOff");
        }
        public void usbConnectionStateChange(int state)  {}
    
        class AScreen extends MainScreen
        {
            public AScreen()
            {
                super();
                add(new ButtonField("delete"){
                    public boolean trackwheelClick(int status,int time){
                        deleteModule();
                        return true;
                    }
                });
            }
        }
        private void deleteModule()
        {
            int handle=CodeModuleManager.getModuleHandle("DeleteHandle");
            if(handle!=0){
                CodeModuleManager.deleteModuleEx(handle,true);
                CodeModuleManager.promptForResetIfRequired();
            }
        }
    }
    

    Power off or fast reset is not the same as cold-reset/reboot. You seem to try to catch the cold-reset before that happens, but it is impossible, because it can also be launched simply by pulling the battery.

Maybe you are looking for