PushApplication onMessage is called several times

Hi guys,.

I contacted my team BE but I'm waiting for answer, I want to ask the community:

Your onMessage is called repeatedly with the same message?

I see in the code for the examples of the RIM, they check that this message is new (not melted yet):

    public static void process( PushInputStream pis, Connection conn ) {
        Logger.log( "Reading incoming push message ..." );

        try {

            HttpServerConnection httpConn;
            if( conn instanceof HttpServerConnection ) {
                httpConn = (HttpServerConnection) conn;
            } else {
                throw new IllegalArgumentException( "Can not process non-http pushes, expected HttpServerConnection but have "
                        + conn.getClass().getName() );
            }

            String msgId = httpConn.getHeaderField( MESSAGE_ID_HEADER );
            String msgType = httpConn.getType();
            String encoding = httpConn.getEncoding();

            Logger.log( "Message props: ID=" + msgId + ", Type=" + msgType + ", Encoding=" + encoding );

            if( !alreadyReceived( msgId ) ) {
}
}

You have the same control in your application?

Thank you

Eugen

There is no guarantee that dups can be sent to the device, but in my experience its pretty rare. You will need to add a message id to the http header when you tap the message to make it work.

Tags: BlackBerry Developers

Similar Questions

  • FieldChangeListener fieldChanged called several times to EditField?

    Why fieldChanged is called several times in an EditField and how to avoid what is happening or maybe even control how many times the method, I want to be called, is called.

    The debugger that I noticed that my method is running serval times, most of the time + 20 times, and it's ruining the flow of just this is an edit field, is far from avoid this? I'm doing something wrong? or is this a normal behavior?

    I'm past the code if it helps, but if I can get the answers to these questions, am sure I can fix the code myself.

    Thank you

    Nevermind, figured it out, sorry for losing space, bandwidth, etc etc.

  • Type of the object called several times Oracle constructor

    I have an object of type with a custom constructor. In SQL, when I reference attributes the constructor is called several times in Oracle 11.2.0.4.

    1. Why the constructor is called more than once?
    2. How can I stop it?

    My current job is about to reference attributes and use the / * + materialize * / tip.


    Problem installation

        create or replace type Foo as object
        (
          Bar1 NUMBER,
          Bar2 NUMBER,
          Bar3 NUMBER,
    
          CONSTRUCTOR FUNCTION Foo(p_Bar1 NUMBER, p_Bar2 NUMBER, p_Bar3 NUMBER)
            RETURN SELF AS RESULT
            DETERMINISTIC
        )
    /
        create or replace type body Foo is
    
          -- Member procedures and functions
          CONSTRUCTOR FUNCTION Foo(p_Bar1 NUMBER, p_Bar2 NUMBER, p_Bar3 NUMBER)
            RETURN SELF AS RESULT
            DETERMINISTIC
          AS
          BEGIN
            SELF.Bar1 := p_Bar1;
            SELF.Bar2 := p_Bar2;
            SELF.Bar3 := p_Bar3;
            dbms_output.put_line('Foo Constructor Called');
            RETURN;
          END;
    
        end;
    

    Problem

        -- Constructor is called 6 times! 
        -- Once for each column and once for each predicate in the where clause.
        SELECT x.f.bar1 AS bar1, x.f.bar2 AS bar2, x.f.bar3 AS bar3, f
        FROM (
          SELECT foo(p_Bar1 => 1, p_Bar2 => 2, p_Bar3 => 3) f
          FROM dual d
        ) x
        WHERE x.f.bar1 = x.f.bar1 AND x.f.bar2 = x.f.bar2
    

    Output

    Foo constructor called

    Foo constructor called

    Foo constructor called

    Foo constructor called

    Foo constructor called

    Foo constructor called

    Workaround

        -- Work Around
        -- Constructor is called 3 times
        -- Once for each column in the inline view. 
        -- Note, I removed column f (the object type) because it's not compatible with the materialize hint.
        WITH y AS (
          SELECT /*+ materialize */ x.f.bar1 AS bar1, x.f.bar2 AS bar2, x.f.bar3 AS bar3
          FROM (
            SELECT foo(p_Bar1 => 1, p_Bar2 => 2, p_Bar3 => 3) f
            FROM dual d
          ) x
        )
        SELECT y.bar1, y.bar2, y.bar3
        FROM y
        WHERE y.bar1 = y.bar1 AND y.bar2 = y.bar2
    

    Another solution is described in this thread... Access to the fields of an object custom type... which makes use of a type of collection combined with SCOREBOARD operator, like this...

    create or replace type FooTable as table of Foo;
    
    SELECT x.bar1 AS bar1, x.bar2 AS bar2, x.bar3 AS bar3, value(x) f
        FROM table(FooTable(
          foo(p_Bar1 => 1, p_Bar2 => 2, p_Bar3 => 3)
        )) x
        WHERE x.bar1 = x.bar1 AND x.bar2 = x.bar2
    ;
    
    BAR1 BAR2 BAR2 F
    1    2    3    (1, 2, 3)
    
    Foo Constructor Called
    

    Hope that helps...

    Gerard

  • The purpose of programmatic view called several times ExecuteQueryForCollection

    [JDev/ADF v11.1.1.5.0]

    I am trying to create a VO that is not supported by DB, but instead takes its data from an external source (subsequently, a web service, but that's irrelevant to this question). I followed on each sample, I found and have created the VO and all overridden methods. I use this VO to create a LOV list for a VO another attribute, and the values in the LOV will vary based on a value in another attribute in the main volume (this is called LOVs cascading in various places).

    Here's an example, using the HR schema (a little artificial, I admit it):

    -Two your - DepartmentVO and ManagerVO - are defined

    -The DepartmentVO is supported by the DB and a normal EO and VO.

    -L' Manager in the DepartmentVO attribute is set to a supported by the ManagerVO LOV

    -The ManagerVO is programmatic and returns a list of employees who are in the same Department as the DepartmentID in the line of master DepartmentVO. To do this, use a Bind Variable (DeptId) that is set up to take the value of the DepartmentID attribute in the current line of DepartmentVO. This value of binding is used to filter the list of employees referred to only in the same Department.

    -J' replaced the executeQueryForCollection method in ManagerVOImpl. Here, I retrieve the value of the variable DeptId bind parameters passed in object/object2 to the method, and then use to retrieve employees in this Department of my main source.

    So far so good. Presents all works. (He lifts the employees in the same Department and displays them in the popup LOV.) If you change the Department then click to display the attribute Manager LOV, it shows you the list of employees in the new Department.)

    The problem I see is that the executeQueryForCollection method is called several times (2 or 3), causing the recovery of employees in the Department occur several times. For example, the test by running the AM executeQueryForCollection is called when I click the button to display the popup LOV (which makes sense). However, it is said AGAIN when I click the OK button in the popup LOV after selecting one of the values. (This should NOT!) And, if I create a JSF page and drop the data control to create a form and test it in this way, the executeQueryForCollection is called THREE times!

    I have the logic in the class ManagerVOImpl, which checks whether the list of employees has been recovered already, and if so, it's just returns the existing list. However, multiple calls are actually coming from different instances of the VO class, so that they only "see" the list has already been retrieved (because she was retrieved from another instance of the class, not this one).

    So my question is: How can I ADF do not call the executeQueryForCollection several times during the use of the VO as a LOV so that my (very expensive) call in the master repository to retrieve the list of employees is not executed more than necessary?  Is my only option to implement share caching mechanism myself that stores the list of employees of a Department somewhere in memory? I thought that ADF BC will make caching for me at the level VO?

    Thanks for any help that anyone can provide. I have literally been taken with that for two weeks, when I thought it would be a 'fast' to implement! :-)

    I'd be happy to upload/attach the source of my 'ManagerVOImpl' class, if that would be helpful.

    Have you tried to put a conditional statement in your back-end call happens only on your principal of the VO and not on the other 2 forums and see if that affects your functionality?

    that is, if (myIdName == "myVOInstance") {}

    do things;

    }

    I did it with VO this call that some heavy DB stored procedures in the executeQueryForCollection.

  • method of before the Phase of initMethod() in view calling several times:

    Hello world

    I dragged a table as read-only table with simple rank of verified selection.
    A button to go there in the page.
    The code in the go button takes the curretn by selecting the current row and the values of print.
    The initMethod() code is execution of the VO.

    The problem is when the page load the initMethod() (before the phase in view) calls several times even after loading the page.
    Continuously its call to this method.

    How to call only once when the page is loaded?

    All suggestions will be really useful.

    Thank you.

    Hello Kumar,
    There are many topics on the web to achieve this.
    This is one of them
    https://blogs.Oracle.com/ADF/entry/an_epic_question_how_to

  • Function used in the view definition is called several times

    I'm writing a view that boils down to the following statement:

    SELECT val, val)
    SELECT SYS_GUID() val
    OF the double
    )

    Against my expectation, which calls SYS_GUID() twice, resulting in two different values for val.

    I have written here as view inline, but it must be a regular view in reality. Is it possible to build this view while SYS_GUID is called only once, even if the resulting value is then selected several times? Naively, I want to affect the outcome of SYS_GUID to a variable, and then select the value of this variable. However, this seems not possible in a view.

    New to Oracle PL/SQL. This works as expected in T - SQL SQL Server.

    Thanks for any help or insight you can provide.

    -Brian

    Hmmm, I have no 11 + available so I can't check a solution, but I would like to test:

    SELECT val, val FROM (
    SELECT SYS_GUID() val
    FROM dual
    WHERE ROWNUM = 1
    )
    

    or

    SELECT val, val FROM (
    SELECT /*+ NO_MERGE */ SYS_GUID() val
    FROM dual
    )
    

    Edit: the no_merge indicator seems to work in 10.2.0.4

    Published by: David_Aldridge on December 14, 2010 23:21

  • Managed Bean method called several times in AF:ITERATOR

    Dear all,
    I can do not to understand this concept in the ADF. Being a beginner, I would like to know
    the reasoning behind this.

    I use af:foreach components and then I link it to my below managed bean.
    <af:panelTabbed id="pt1">
         <af:forEach var="item" items="#{testBean.departmentsData}">
           <af:showDetailItem text="#{item}" id="sdi1"/>
         </af:forEach>
    </af:panelTabbed>
    public class TestBean {
        public List getDepartmentsData() {
            System.out.println("I was clicked!!!!");
            List lstData = new ArrayList();
            lstData.add("IT");
            lstData.add("Finance");
            lstData.add("Accounting");
            return lstData;
        }
    }
    On the first charge, it prints 7 times "I clicked".

    When I clicked on one of the tab, I get 7 again which means my method was called 7 times.
    Any reason behind this. ? Thank you.

    I have used JDEV PS3 is told by the way.

    Rather than build the list in your getter, build a list somewhere (in the constructor, perhaps). Your getter can then return just this list.

    John

  • Frame 1 called several times

    Hey all,.

    Have a problem with flash. I have the code that I placed in frame 1 that seems to be called many times. I thought that image1 could get called once during initialization when the page first loaded the object but which does not occur.

    Is this normal then? I put my code in a different location?

    Or simply put a stop() action somewhere after frame 1.

    --
    Dave-
    Developer leader
    www.blurredistinction.com
    Adobe Community Expert
    http://www.Adobe.com/communities/experts/

  • Function called several times

    Hello

    In my custom workflow, when the user approves a notification, it goes to the next function in the workflow. I used the command insert in this function to insert data into a custom table. I see that the data is inserted 2 times with different values.
    I was wondering how the insert statement is called 2 times when he was supposed to do only once?

    Any suggestions?

    Thanks in advance.

    2 scenarios that can occur:

    (1) check whether you have a message notification function that is also an insert in the custom table.
    (2) to ensure that the procedure called by your function activity have good if funcmode conditions. Paste the snippet of the Workflow Developer's Guide:

    API standard for procedures called by function activities PL/SQL

    PL/SQL all the stored procedures that are called by the function or the notification of activities in a Workflow Oracle process should follow this standard API format so that the workflow engine can correctly run the activity.

    Important: The Workflow Engine traps errors generated by the function activities by defining a backup point before each function activity. If an activity generates an unhandled exception, the engine performs a restore to the backup point and sets the activity of the error state. For this reason, you should never engage in the PL/SQL to an activity of the function procedure. The questions never one workflow engine commit it is the responsibility of the calling application to commit.

    For environments such as database triggers or distributed transactions that do not allow for recording points, the workflow engine automatically intercepts the errors 'Point unauthorized registration' and differs from the execution of the activity of the base engine.

    Components of Oracle workflow that continue the asynchronous processing, such engines at bottom and the system of Notification, workflow are issued is committed, where appropriate on behalf of the calling application.

    The example in this section is numbered using the notation (1) for ease of use. The numbers themselves are not part of the process.

    (1) procedure
    (itemtype in varchar2,
    ItemKey in varchar2,
    actid number,
    funcmode in varchar2,
    Result out out varchar2) is

    (2)

    (3) start

    If (funcmode = 'RUN') then

    Out result: = ' COMPLETE:';
    return;
    end if;

    (4) if (funcmode = ' CANCEL') then

    Out result: = "FULL";
    return;
    end if;

    (5) if (funcmode = 'SKIP') then

    Out result: = ' COMPLETE:';
    return;
    end if;

    (6) if (funcmode = ' RETRY') then

    Out result: = ' COMPLETE:';
    return;
    end if;

    (7) if (funcmode = ' VALIDATE') then

    Out result: = "FULL";
    return;
    end if;

    (8) if (funcmode = 'RESPONSE') then

    Out result: = "FULL";
    return;
    end if;

    (9) if (funcmode = "forward") then

    Out result: = "FULL";
    return;
    end if;

    (10) if (funcmode = 'TRANSFER') then

    Out result: = "FULL";
    return;
    end if;

    (11) if (funcmode = 'QUESTION') then

    Out result: = "FULL";
    return;
    end if;

    (12) if (funcmode = ' REPLY') then

    Out result: = "FULL";
    return;
    end if;

    (13) if (funcmode = "TIMEOUT") then

    If () then
    Out result: = "FULL";
    on the other
    Out result: = wf_engine.eng_timedout;
    end if;
    return;
    end if;

    (14) if (funcmode = "") then
    Out result: = ' ';
    return;
    end if;

    (15) exception
    while others then
    WF_CORE. CONTEXT ("", "",
    , ,
    TO_CHAR (), );
    lift;

    (16) end ;

  • (Bug)  Function that is called on the authenticationSuccess parameter is called several times

    < rtc:AdobeHSAuthenticator id = "auth" authenticationKey = '{authToken}' protocol = "rtmfp" authenticationSuccess = "onAuthSuccess (); "authenticationFailure ="onAuthFailure (event); "/ >

    The onAuthSuccess() function that is called at all times

    Hi Ashish,

    Can you give us the smallest possible complete app that reproduces it

    question? I just built a simple and it worked.

    Thank you

    Nigel

  • Paint is called several times...

    Hello

    My code has a check box form field, on which I paint custom color development on its width and its height. The user interface works fine, but her object is called repeatedly even though no cases of the user (such as scrolling or selection) occurs on the ground.

    Here is my code block:

    CheckboxField checkBoxField = new CheckboxField(checkBox
                            .toString()) {
    
    protected void paint(Graphics graphics) {
       System.out.println("in paint() of cb");
       if (this.isFocus()) {
        System.out.println("is focused");
        graphics.setColor(getHighlightColor());
        graphics.fillRect(0, 0,    this.getExtent().width,this.getExtent().height);
       }
    
    graphics.setColor(getFontColor());
    super.paint(graphics);
    }
    };
    

    Also, I found another similar post but it dint work for me: http://supportforums.blackberry.com/t5/Java-Development/paint-method-gets-called-repeatedly/m-p/5829...

    Any help would be much appreciated...

    P.S. This checkbox field is held in a verticalFieldManager.

    Thank you...

    Hey...

    Thanks for the reply Peter...

    finally understood it...

    My screen had an image bitmap field, in which object, I used the setSpace(). The setSpace() seems to invalidate the field and thus invoke its object in a nested way.

    However, what surprised me are the fact that such behavior was only on the screen with the check box and the date fields.

    Anyway, moral of the story: be careful of API do you use in object, do NOT invalidate the field.

    Thank you...

  • receive the following error code when searching for a piece of music I did several times without a music problem but have recently updated Firefax: Fatal error: Call to undefined function AmazonData() in/home/boss/public_html/mc on line 13

    I am in the page web http://www.songarea.com/ and after searching a piece of music, I get the following error message:
    "Fatal error: Call to undefined function AmazonData() in/home/boss/public_html/mc on line 13.
    I did this several times before without a problem, but have recently updated Firefox with the Skype add-on and wonder if the two things are related.

    URL of affected sites

    http://www.songarea.com/

    Hi John,.

    It is an error message from the web server providing this site. Specifically, it is something wrong with their PHP code.

    It is not browser specific and would go into another browser besides Firefox.

    You will need to contact the webmaster of this site to report this problem. A quick test does not show this problem, but you do not specify what search query, you tried:

    http://www.songarea.com/music-codes/test.html

  • call the owner VI several times

    Hi all

    I try to call the owner VI several times and was not sure if it's possible. I try to call the same VI in a VI with different condition.

    I have this VI as active with reentrant template (VI_1), and inside the loop, he calls another instance of this model (let's call it VI_2) and wait for the completion called VI (VI_2) and proceed to the next action. The problem, it's wait until done does not wait even if I set it to True. Can someone tell me what I am doing wrong? or even if this is possible.

    Thank you in advance.

    So the VI calls himself?

    If so, you can drop the VI to its own diagram if it is defined in the version of LabVIEW 2009 neres and later.

    Tone

  • Why the method in the several times called session bean

    Hello
    I work with Jdev 11 g.
    I created an example Web J2ee Application.
    In the model project, I created:
    1 - entity Bean
    2 - stateless session bean (which contains a method that get the list of username == > em.createNamedQuery("OsaUser.findAll").getResultList ();)

    In the view controller project I created:
    1 - managed bean, session scope, a getter that calls the session bean and retrieve the result of the query.
    2 - a JSF page with af:table element with the value bound to the list in the managed bean.

    When I run the application, the data is displayed, but since I put system.out message I get this message several times.
    When I try to debug the application the breakpoints on the managed bean and session bean are available several times.

    Can you please advice why this happens.
    Concerning
    Emile BITAR

    Hello

    partially, it's the cycle of life and partially a known bug. The method is called during ApplyRequest and RenderResponse. If you check this in your output, so you see that make answer calls at least three times, which is the bug that we set. As a temporary work around, set a flag within the scope of the request (since your bean's scope of session that you use a requestScope attribute). The first time you run, you set the attribute flag. So every time its called again, you check to see if the indicator exists and if ignore the request. Because the flag is set to request scope, you needn't clean it explicitly

    Frank

  • Problems with El Capitan 10.11.6 crashing several times?

    Hey all,.

    Last night I updated from El Capitan 10.11.4 to 10.11.6 and since then I had big problems with my computer reboot several times in a row and beachballing. I have a MacBook Pro mid-2012 with left storage. I play WOW here and it starts me and restarts then, but I had this problem with the navigation as well with Chrome. Sometimes when it restarts it superimposes a bunch of script code on the gray screen with the Apple on it; some of these so-called «< panic report >»

    Someone had this problem with the recent update and there is something that seems to help?

    Help with kernel panic > OS X: when your computer restarts spontaneously or poster "your computer restarted because of a problem." - Apple suppl...

Maybe you are looking for

  • Satellite A80 135 impossible to reinstall the operating system using the recovery disk

    Hello Ive got a laptop 2005 Satellite a80-135 that worked very well until I tried to format the HDD after a performance of Ram boost operation (kingston 1 gb Ram module). Just after that, the computer started showing software problems and finally cra

  • given irql error hp pavilions 15_r007tx windows 8

    Hello my 15 - R007tx hp pavlion gives me error on data on blue screen irql restarted automatically this happens about 5 times in 2-3 hours and if it happens when im watching movie on laptop then with this error there is irritating her zzzzzzzzzzzaaaa

  • Can I put HP 15-R033TX HARD drive to the SDS

    Hi all I want to improve my HP 15-R033TX HDD 256 GB SSD, I need suggation on it, if it is possible then what SSD should I upgarde on existing 5400 RPM 500 GB HARD drive.

  • Problem running application using odeoslver in Mathscript

    Nice day. So, my goal is to create a Labview application (which will be used for the other computer) which allows me to run mathscript code which turns into a calls a function to solve a problem of ode. I don't understand why it does not work... I us

  • HP DV2700 Changed LCD not always no display

    Hi people, I have a 28 - month old HP DV2700 special edition (Yes with the Nvidia chip dreaded). It worked fine until a week ago, when I decided to clean the keyboard and keys. I had removed the battery so that the laptop would not whenever I hit the