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

Tags: Java

Similar Questions

  • Why the execution time increases with a while loop, but not with "run continuously?

    Hi all

    I have a problem of severe weather that I don't know how to fix it because I don't know exactly where it comes from.

    I order two RF switches via a data acquisition card (NI USB-6008). One job at the same time can be selected on each switch. Basically, the VI created for this feature (by a colleague) resets all the outputs of acquisition data and active then those desired. It has three entrances, two chain simp0le controls and a cluster table, that contains the list of all the outputs and some practical information to know what is connected (specific to my application).

    I use this VI in a complex application, and I have some problems with the execution time, which increased whenever I said the VI, so I did a test VI (TimeTesting.vi) to determine where the problem came. In this special VI I record the execution time in a csv file to analyze then with excel.

    After several tries, I found that if I run this criterion VI with the while loop, execution on every cycle time increases, but if I remove the while loop and use the funtionnality "Continuous run", the execution time remains the same. In my high level application, I have while loops and events, and so the runtime increases too.

    I someone could explain to me why execution time increases and how can we avoid this? I have attached my VI test and the necessary subVIs, as well as an image of a graph that shows the execution time with a while loop and «run permanently»

    Thanks a lot for your help!

    Your SetReset_DO VI creates a channel whenever it is called.  And that you never delete a task.

    When running continuously, that it's as if it only runs once and LabVIEW has internal mechanisms to close references that will not be used again.  When a VI is used as a Subvi, LV does not know if she will be called again, and lacks these things until the first level VI stops. You have a memory leak.

    Just as you open and close your file outside the loop for, create your channel out of the loop.

    Lynn

  • Why the total time required for the test sequence is different during the test runs

    Hello

    -J' have different test resources to test our product which includes engines and the NOR-Box (6351).

    -Number of test files in sequence that are called during the test (ca. 20)

    -The problem is that when I run these test sequence files separate (say only 3 out of 20), total time by these tests are t1, t2 and t3, but when - I left all 20 tests to run without jumping all the time needed by the 3 tests above is t1 + 60 s, t2 + 80 s and t3 + 50sec. Why it is so and how can I avoid this problem.

    -The tests are motors to move, take samples or box then save them on my computer after testing the limits. Since they are time critical, when I do all the running tests in a test go a lot do not PASS. I can't run them separately because it takes more time, more interference by user and also more than one report that is not desired.

    -J' tried unloading after execution steps, but it did not help.

    Kind regards

    RB

    This probably depends on that made your sequence. Have you tried shrink where extra time is being spent? You can time how long different parts of your sequence are following the steps of the expression as follows:

    Locals.StartTime = Seconds()

    Locals.ElapsedTime = Seconds() - Locals.starttime

    You can also watch time module in your reports. There is nothing specific on TestStand that should cause some sort of slow down like this. I recommend trying to figure out where the extra time is being spent. I suspect once you do, the cause will become obvious.

    -Doug

  • Execute multiple procedures at the same time calls


    HI - does anyone know how run as many procedure calls in parallel without using DBMS_JOB and DBMS_SCHEDULER?  For some reason, we are not allowed to use this feature, so I have to find another way.

    Thank you

    Christine

    JustinCave wrote:

    Without knowing your version of Oracle or why prevents you from using the most obvious tools, it's hard to say.

    If you are on 11.2, you can use the package dbms_parallel_execute but which simply called dbms_scheduler under the covers.  And some restrictions on the use of dbms_scheduler would most likely also create problems for the use of any other approach which had about the same effect.

    Justin

    Unfortunately, according to the doco 11.2 to dbms_parallel_execute.

    To perform the pieces at the same time, the user must have CREATE JOB system privilege.

    A solution could be to move the multi-threading for outside of the database and use the multi-threads of something like Java or C capabilities. You can even do it using the command or a shell script, depending on your environment, but it could be a bit annoying. Overall, the simplest solution would be to convince that the DBA is to authorize the use of a feature standard and well understood by the database called the Planner, rather than circumvent their authority by using external multi-thread techniques.

    Concerning

    André

  • Why the OSB is called stateless?

    Hi team,

    I often hear this "OSB is stateless and BPEL is dynamic," but never had an explanation for the same support. I went by this blog once again the same are mentioned here, but any theory about it Can I get some information as possible to this?

    Thanks in advance,

    Malcolm.

    Hi seb,

    I'll try to give you my explanation in this regard.

    The main difference between the two components of Oracle SOA Suite (OSB and SOA Infrastructure service engines) is that SOA Infrastructure, i.e. the BPEL service engine, mediator, business, Human Workflow rules widely uses the underlying database called Infrastructure SOA metadata store. For instance when you call a synchronous service developed in BPEL service engine BPEL and SOA infrastructure c a number of inserts in the base of SOA INFRASTRUCTURE. This process is also known as dehydration. Things get more complicated when we have an asynchronous service - then we have the two dehydration - storing the State of an application in the dehydration store (the store Infrastructure SOA metadata) and restore it later (rehydration) on the back of the State in the memory of the server for execution.

    However, the OSB does not such store of dehydration, i.e. OSB acts as a proxy that passes through (with some intermediate processing) to the demands of consumers of services to service producers.

    That is why the OSB is stateless (it does not store the intermediate state of executions application OSB) as opposed to SOA that stores the application States in the store of dehydration.

    There are some cases where a composite SOA application can be configured as stateless, which will prevent the SOA to store its State in the store of dehydration.

    Hope you find my useful and reasonable response!

    Kind regards

    A.

  • Why the Info screen called my back camera air ipad 2

    Why the Info screen name my back camera air ipad 2?

    You have two cameras - the front and rear camera - this information window that you have pursued photography

    LN

  • [ADF, JDev12.1.3] viewScope bean can not recover sessionScope bean. Why? (How to day uploading of a session bean scope whenever a page with params is called)

    Hallo,

    to the login page of my application, I created a viewScope managed bean loginView.

    In the login page, I put a "dummy" inputText (whose value is related to dummyInitEditValue bean attr) to perform lazy loading of the page itself.

    In the initData() function I call a function of a bean sessionScope connection which should initlialize some of its attributes.

    public class LoginView {
      private Integer dummyInitEditValue;
    
      public LoginView() {
      }
    
      private void initData() {
        Login loginBean = (Login) FacesUtils.getManagedBeanInSession("login"); // loginBean = null !!!
        loginBean.initData();
        dummyInitEditValue = 1;
      }
    
      public void setDummyInitEditValue(Integer dummyInitEditValue) {
        this.dummyInitEditValue = dummyInitEditValue;
      }
    
      public Integer getDummyInitEditValue() {
        // Per lazy loading
        if (dummyInitEditValue == null)
          initData();
        return dummyInitEditValue;
      }
    }
    
    
    

    The problem is that the initData() rises a null pointer exception because the bean connection is not found.

    What's not in my approach?

    I create this hoping to resolve this issue: the login page has 2 URL parameters (defined in his point of view in the config.xml file - adfc) and I have according to them I need to update some of the bean sessionScope uploading connection every time the page is called / refreshes (possibly with new values for the parameters).

    BdW I do not know if there is a better alternative you can advice me.

    Thank you

    Federico

    Well, you need to instantiate bean connection somehow.

    You can try to link an attribute of connection bean to the page and see if this will help or you can try to resolve expression programmatically (something like #{connection}).

    Or you can try adding session bean defined as managed property for your bean view extended (something like this: http://umeshagarwal24.blogspot.ba/2012/09/using-managed-property-to-evaluate.html).

    Dario

  • Why the airport Time Capsule for P/W after update to 7.7.7

    Time Capsule ask P/W when I click on it in the Airport utility to see whats connected to it, but never recognizes the P/W or back with the icon to forget.

    He returns to normal after a disconnect and a return to the restart card. This happens since the latest firmware update to 7.7.7.

    Once the Capsule is back to normal and you can access the settings in AirPort Utility, my suggestion would be to delete the current password on the Base Station and add a new password. It worked for me with the same question, and it might for you as well.

    Make sure you remember the password in the keychain in your Mac is checked, and then click Update at the bottom right of the window to save the new settings.

  • Why the message time / date uses the original sent time?

    Hello
    I noticed that emails that are delayed come using the time sent initially, rather than when they reach my server. It is unusual, because it may end with a 'new' message finish well down the list of the other messages sent more recently.
    What's the intended operation?

    Note the following header: This shows up in my Inbox based on time 02:57 was created, even if he won't even let the original that much server later.

    The - Wed Mar 25 21:59:03 2014
    X key account: Account2
    X-UIDL: UID86003-1263191493
    X-Mozilla-Status: 0001
    X-Mozilla-Status2: 00000000
    X-Mozilla-keys:
    Return-path: < [email protected] >
    Envelope-to: [email address removed]
    Delivery date: Tuesday, March 25, 2014 15:11:16-0700
    Received: og1.ijnet.net ([216.246.89.40]: 47913)
    by napkin.mysitehosted.com with esmtp (Exim 4.82)
    (envelope - from < [email protected] >)
    ID 1WSZYx - 00074-n. b.
    [removed email address]; Tuesday, March 25, 2014 15:11:15-0700
    X-envelope-From: [email protected]
    X-envelope-To: [email address removed]
    Received: From hopkins.tea.state.tx.us (198.214.98.149) by og1.ijnet.net (MAILFOUNDRY) id VQwf2rRqEeOelwAw [removed email address]; Tuesday, March 25, 2014 22:10:59-0000 (GMT)
    Received: from ([198.214.97.182])
    by hopkins.tea.state.tx.us with ESMTP id 5503449.345156795;
    Tuesday, March 25, 2014 16:48:03-0500
    Received: Miller (miller.tea.state.tx.us [198.214.97.182])
    by miller.tea.state.tx.us (AIX5.2/8.11.6p2/8.11.0) with ESMTP id s2PLgCe45034;
    Tuesday, March 25, 2014 16:42:12-0500
    Received: by LIST. TETN.NET (LISTSERV-TCP/IP 14.5 release) with the id of coil 204073

             for [email address removed]; Tue, 25 Mar 2014 16:32:55 -0500
    

    Approved-By: [removed email address]
    Received: from hopkins.tea.state.tx.us (hopkins.tea.state.tx.us

             [198.214.98.149]) by miller.tea.state.tx.us (AIX5.2/8.11.6p2/8.11.0)
             with ESMTP id s2PJvne69120 for <[email address removed]>; Tue, 25 Mar 2014
             14:57:49 -0500
    

    Received: from ([198.214.97.51]) by hopkins.tea.state.tx.us with ESMTP id

             5503449.345151870; Tue, 25 Mar 2014 14:57:47 -0500
    

    Of workaround applies only to an IMAP account, where only the headers are downloaded. Quite rare really that is not the default.

    The date of receipt is available in the pane always, just right clicking on the headers and select it from the list is all that is needed. Sort by the order received however denies all dates and maintains strict order of the received mail. However, all these things are on the view > menu sort order, including consolidation of beloved today yesterday last week so the sort of Outlook users.

    Curiously, I find everything on Outlook without exchange awkward and somewhat limited, but it's an exchange client really not a customer of general e-mail in my opinion.

  • Why the fuse is called called fuse CC Preview?

    It's the full version of what is expected of fuse?

    Mixamo is somehow related or belonging to Adobe? Mixamo animation and other technologies to Mixamo library is certainly vital to fuse.

    What does Adobe/fuse with all this? Fuse is a another version of Daz/ask or fuse opens up a whole new direction, as these characters could be captured live motion and be used as avatars replacing people in their own Youtube videos, for example? Obviously, Adobe must have some sort of vision for this. Where it says that the fuse is really about and serve possibly?

    Hmmm, it's a difficult question!  Let's start with the easy part. D "Preview" is the term of Adobe for a beta, produced non-maniere formatting.  This means that we are testing something!

    Mixamo was acquired by Adobe in June 2015, when we hung the web services to use Adobe ID Mixamo and launched the new version of fuse CC.  Prior to joining Adobe, Mixamo was really focused on game designers, but under fuse Adobe is branching out to appeal to several designers, composers and video animators with fuse CC which have a more realistic, focused content on the modern compared to the previous version (which focused on the content on the fantasy for the games theme for example).

    However, I can't really tell what the future holds for fuse and Mixamo for now.  We have posted the preview version of fuse to get comments and are attentive listening, but no updates planned in the near future.

  • Why MobileMe first synchronization alert several times with Vista Outlook 2007 and iPhone 3G?

    I'm in long discussions with Apple Support, which are very polished, but we are not making much progress, after some time and effort. The installation program is Outlook + Vista Business + MobileMe, iPhone 3G. Everything correctly the program installation insofar as Apple is concerned. Everything worked OK. Now, all of a sudden, every time there is a new entry or deletion on Outlook or iPhone, sync (for the most part successful, sometimes not) is followed a few minutes later with a first synchronization Alert, telling me that MobileMe has needed attention because "this time around the first of may you have synced or you have reset your data." The First Alert Sync then you offers a number of options for resolution, including data to merge or replace. Fact is, even if I agree to "merge data" or choose another options presented to me (for example replace MobileMe with data from Outlook), MobileMe never stops with its first Sync alerts, no matter how many times I followed the instructions from Apple mail. What is important, Apple did suggest trying a new Vista user account - and the problem do not appear to arise here, although perhaps a handful of test on a new installation of Outlook inputs would be very difficult. My questions: (1) are there the obvious things that might spoil MobileMe on a particular user account, because of this problem? (2) at - it's not a "bot"? or diagnostic application that Apple or MS could foresee that would actually identify what actually firing off the illogical Sync First Alert? Thanks a lot for all the suggestions for the non-technical user. David, London

    Try assigning to the Office Discussion groups:
    http://www.Microsoft.com/Office/Community/en-us/flyoutoverview.mspx

    All the best!

  • Why iTunes putting same artist several times?

    Recently, I added a song iTunes (from soundcloud) and edited metadata to add the name of the artist. He appeared as a separate iTunes tab even if it was the same artist name? Then, I removed the name of all the songs and their renamed by the same artist, now all the songs are in separate tabs?

    I also have this problem. I have tried everything I can find via Google for example adding Album artist, grouping as a compilation (which is not the case), the removal and re - enter the name of the Album and the name of the artist of the Album. I even tried to delete the data from drive X of Y. Nothing works...

  • 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

  • How to call a method of the AM with parameters of Bean managed?

    Hello world

    I have a situation where I need to call the Managed bean (setDefaultSubInv) AM, under value changes Listner method. Here's what I do, I added the AM method on page links, and then at the bean call it

    Class [] paramTypes = {};
    Object [] params = {};
    invokeEL ("#{bindings.setDefaultSubInv.execute}", paramTypes, params);

    It works and be able to call this method, if there are no parameters. Say that I pass a parameter to setDefaultSubInv(String a) method AM, I tried to call it bean but raise an error

    The string available = 'test ';
    Class [] paramTypes = {String.class};
    Object [] params = {DISP};
    invokeEL ("#{bindings.setDefaultSubInv.execute}", paramTypes, params);

    I'm not sure this is the right way to call the method with parameters. Can anyone tell how to call a method of the AM with bean to manage settings

    Thank you
    San.

    Just do the following

    1. your method in the Client Interface.
    2 - Add to Page Def.
    3 - Customize your Script like below one to reach your goal.

    BindingContainer links = getBindings();
    OperationBinding operationBinding = bindings.getOperationBinding("GetUserRoles");
    operationBinding.getParamsMap () .put ("username", "oracle");
    operationBinding.getParamsMap () .put ("role", "F1211");
    operationBinding.getParamsMap () .put ("Connection", "JDBC");
    Object result = operationBinding.execute ();
    If (! operationBinding.getErrors () .isEmpty ()) {}
    Returns a null value.
    }
    Returns a null value.
    }

    I hope it helps you
    Thank you

  • Control number of the howto of calls to a PLSQL inside a VORowImpl

    Hello experts!

    I am facing a problem of performance that I coded a calling a PLSQL procedure to calculate the value of an attribute to the get VORowImpl method.

    I noticed that the method is executed several times for each record. That I currently have 13 records and 56 calls are connected to the PLSQL (4 calls per type of registration, and in both cases, 6 calls!)

    Is it possible to control the PLSQL procedure is called only once for each record in the table?

    BTW, I use 11.1.1.5

    Best regards
    Jose.

    For example, createRowFromResultSet()?

    Create the ViewObjectImpl class, createRowFromResultSet() substitution, inside this method invoke functionality (super.createRowFromResultSet ()) by default and save the line created in a variable, call your plsql function, complete attribute and return created and initialized row.

    Dario

Maybe you are looking for