Cant see my new data after ejb 3.0 Facade.create()

I am adding an address using EJB 3.0 Facade.create() method. On a separate page I call another EJB 3.0 customer.getAddressCollection() method, but the collection of addresses still has the old list. It does not have the new address in there. If I log out and back in it still does not show the new address. Only when I start another session can I see the new address.
I am using Sun App Server version 9.0.
Is there some App Server setting or some "flush" or "commit" method I am overlooking?
Here is the relevant code:
// update the database using the Facade EJB
        addressFacade.create(address);
        customerMaintenanceMessage = "finished adding address";
        request.setAttribute("activity","mainPage");
        request.setAttribute("customerMaintenanceMessage",customerMaintenanceMessage);       
        RequestDispatcher disp = getServletContext().getRequestDispatcher("/CustomerMaintenance");
        disp.forward(request, response);
//forward to the addressList page:
        Customer thisCustomer = customerFacade.find(customerId);
            List<Address> addresses = (List)thisCustomer.getAddressCollection();
            request.setAttribute("addresses",addresses);
            disp = getServletContext().getRequestDispatcher("/AddressList.jsp");
        disp.forward(request, response);
// Address List display JSP
        List<Address> addresses = (List) request.getAttribute("addresses");
        for (Address address : addresses){
                //display the address...
        }

I was able to get a working solution I added the following code right below the addressFacade.create(address) line in the update the database section:
     customer.getAddressCollection().add(newAddress);
     customerFacade.edit(customer);
Essentially, I had to update the address, the customer addressCollection, AND update the customer entity.
I think this is cumbersome, but maybe it is the price paid for the simplicity of EJB 3.0.

Similar Messages

  • Excel - Cannot see any new data in Excel Workbook

    Hi There,
    Wonder if anyone can help, we have a .xlsx file, we have it setup so that only one person at a time can edit the workbook.
    When a colleague edits some data and saves the change, I go into it but cannot see the new data. I then do the same but she cannot see the changes and neither can a 3rd colleague. In effect, whenever any one
    makes a change in the workbook, no one else can see the new saved data that has been added. 
    The work book is not protected. It is stored on a server, all users are running Office 2013 apart from
    1 who is using 2003, but it doesnt matter as even if a change is made using office2013, another office 2013 client still can't see the change.
    It doesn't seem to happen with any other workbooks.
    Tried open and repair which didn't work. Also tried saving a new version of the workbook, this works for a while but then the issue comes back on the new version.
    Any ideas, as currently we keep having to save new versions of the workbook.

    Hi,
    What's the extension of this particular file ?Try another file format to test this issue.
    Did you get any message when try to save the document? Also does this problem happens when use the 'save as' option within Excel to save the file?
    Also try to download the excel file to local driver, update the Excel file,then upload it to the server.
    Wind Zhang
    TechNet Community Support

  • I cant see personal hotpot option after downloading ios5 , I cant connect my iPhone with iPad

    Dear Sir,
    i cant see personal hotpot menu after downloding ios5 N coz of it i cant connnect my iPhone & iPad
    Solve myt problem as soon as possible 

    Have you had a look here
    http://support.apple.com/kb/HT3574
    Understanding
    http://support.apple.com/kb/HT4517
    Trouble Shooting
    http://support.apple.com/kb/TS2756

  • HT1351 My 2nd generation iPod Nano is not showing my new playlists after syncing (the playlists were created in my computer).  Help!

    My 2nd generation iPod Nano is not showing my new playlists after syncing (the playlists were created in my computer).  Help!

    So, your iPhone (and new shuffle) still work properly with iTunes, correct? 
    Your 1st gen shuffle... It's the white one with USB plug, that looks like a USB flash drive...?
    Are you able to see it in Windows, and maybe change the drive letter back to E:?

  • Cant see iphone in itunes after the most resent itunes update

    After updating itunes I downloaded the new iphone IOS. After connecting my phone, an error msg could not update iphone. Now my phone has the connect to itunes screen and will not come off regardless of what i do. I cant see it on the computer or itunes now. Ive uninstalled and reinstalled itunes and a number of other things on the apple website, no joy. To me it sounds like a software problem to me, but i dont know. Does anybody have ANYTHING else?

    I had the same problem yesterday and called Apple Support and was walked through uninstalling iTunes (I had just gotten the latest update to it) and reinstalling it. My computer (Windows Vista) did not recognize the phone and would not sync. I powered down my computer, took it home, powered it up and plugged in my iPhone 4 with a different sync cable and it worked. The computer found an Apple driver that it couldn't find with the other cable. The defective cable will still charge my iPhone 4, but it will not sync. I have used that same cable since October, and it is the original shipped with the product. Go figure. I have not yet updated to iOS 4.3 and am going to wait a bit.

  • BI Publisher: not able to see the xml data after creating a data model

    I am learning BI publisher and trying to create a report data model
    I created a new data model from the report tab, use query builder, able to see the results. Then i save it and try to launch XML view from clicking View .
    I am getting unexpected exception, not able to see the XML view .
    in the server console i got servlet exception, here is one of the line
    com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303
    Edited by: joysaha123 on Mar 17, 2010 6:07 PM

    Hi karthik
    Thanks for your response
    Actually iam a beginner in java coding hence struggling to come up with the things
    I tried putting your code and onserver side i see it is returning 09:12:17,234 INFO [STDOUT] [root: null]
    actually the same program i wrote in java
    and the same method i was calling from the main
    and it is working fine and the xml document is getting displayed one important thing to be noted here is that the factory.newDocumentBuilder().parse(new File(filename));is returing XmlDocument
    and the printing takes place
    but the in same method public static Document parseXMLFile(String filename, boolean b) in servlet
    the line factory.newDocumentBuilder().parse(new File(filename)); is returning DeferredDocumentImpl
    and this creating problem , had it returned XmlDocument
    i would have printed the elements one one
    but as it is returning deferredimpl
    iam unable to print the elements
    could you please tell me why factory.newDocumentBuilder().parse(new File(filename)); is returning DeferredDocumentImpl
    in servlets but in plain java pogram it is returing XmlDocument
    Thanks
    Bhanu

  • Airplay-ive got an iphone on 4.3.3 but cant see anything new?

    Hi
    Im not sure how long airplay has been out but i saw an advert for it today. Ive got an iphone 3GS on 4.3.3. Also got an ipad2, dont know if airplay is for both. Anyway, i cant see anything about aiplay on my phone. How do i get it? Thanks

    Do you have an airplay enabled device connected to your home netwrok?
    Using AirPlay

  • HRC 8.02 not finding any new data after upgrade

    Client CCX upgrade from 5.02 HA to 8.02 HA.  I used the PreUpgrade tool for the migration, no known errors.
    However, after installing the new Historical Reporting client and running some reports, no data is found since the upgrade.
    Anyone know if I need to enable something to fix this?
    Premium license if it matters.
    thx

    Hi,
    I have the similar issue. But I haven't upgraded my Servers. In my case I can see older reports only but not the recent ones.
    How to resynchronize historical database?
    Thanking you in anticipation.
    Regards,
    Amit.

  • End Routine is NOT modifying the DSO with new data after load into that DSO

    Hi all,
      I am creating an End Routine for DSO to populate a field ZFCMP_FLG (to store 'Y' ) with lookup from another DSO ZMDS_D01. This new field shows blank instead of 'Y', after activating the DSO. The RESULT_PACKAGE record is populated with 'Y' for ZFCMP_FLG  while debugging that End Routine and why it is NOT writing the modified records into DSO, please ? It is a Characteristic InfoObject with length 1 to store 'Y'. The following is some part of the code:
    DATA: wa_fcmp_flag   TYPE c VALUE 'Y'.
    LOOP AT RESULT_PACKAGE ASSIGNING <RESULT_FIELDS>.
        READ TABLE it_zmds_d01 INTO wa_zmds_d01 WITH KEY
                    /BIC/ZAUFNR    = <RESULT_FIELDS>-CS_ORDER
                    NOTIFICATN     = <RESULT_FIELDS>-NOTIFICATN  BINARY SEARCH.
         IF sy-subrc = 0.
           <RESULT_FIELDS>-/BIC/ZFCMP_FLG = wa_fcmp_flg.
        ENDIF.
    ENDLOOP.
    Thanks,
    Venkat.

    hi...
    Since you are using Field symbol to loop the internal Table there is no need to use the MODIFY Statement in the loop.
    So your code is correct only.
    But here you have to check the status of READ TABLE command in the debug mode.
    it may be failing that's why the RESULT_PACKAGE is not getting modified.
    Plz check it.
    Note: You may need to SORT the Int Table since you are using BINARY SEARCH. check below.
    DATA: wa_fcmp_flag   TYPE c VALUE 'Y'.
    Sort it_zmds_d01 by  /BIC/ZAUFNR    NOTIFICATN  .
    LOOP AT RESULT_PACKAGE ASSIGNING <RESULT_FIELDS>.
        READ TABLE it_zmds_d01 INTO wa_zmds_d01 WITH KEY
                    /BIC/ZAUFNR    = <RESULT_FIELDS>-CS_ORDER
                    NOTIFICATN     = <RESULT_FIELDS>-NOTIFICATN  BINARY SEARCH.
         IF sy-subrc = 0.
           <RESULT_FIELDS>-/BIC/ZFCMP_FLG = wa_fcmp_flg.
        ENDIF.
    ENDLOOP.

  • My osx machine cant see my new hd

    Got a G4 dual processor 466mhz, i have put OSX server 10.4.7 on it and have just put an additional HD in a 300gig, the system is only seeing 128gig on initialising.
    any idea
    cheers
    Cottie

    The disk controller on older Macs can only see 128GB You could put in a modern PCI controller card, or put the disk in a FireWire case. The newer cases do not have the disk size limit. There is also a modified disk driver available to get around the size limit, but it has limitations.

  • Cant see my airplay even after swipe up

    I havnt been able to see my airplay icon when I tried to mirror my IPad Air on to the T.V. . I went a purchased a HDMI Adapter for 53$ Apple brand because all I want to do is mirror, no movies and music, just for work and nothing pops up,  even swipe up from home page. I tried replacing the HDMI cord 3 times and tried it on 3 different T.Vs. I turned my ipad off with it plugged in and with it plugged out, reset the All T.Vs.. and stilll nothing.. I contacted Apple support but all they told me was exactly what i did and was told either exchange HDMI Cord or make a appointment with a apple store.( by they way this is my 3rd IPad since July 22 first two were defects)...so please dont tell my the only way to do this is through buying a IPad T.V. and pay more money for something i dont want and necessarily need. On website say you can mirror with a HDMI adapter. Thank you for reading.

    A couple years ago at a friend's house I did use an Apple HDMI adaptor with my iPad 2 (30-pin) as in theYouTube links I provide below and it worked fine.  (I use Apple TV in my own home.)   These vids are obviously old and implicitly imply that you don't have to diddle with the Settings or AirPlay button - that it just happens once you connect the adaptor to the TV.  That is my recollection also but obviously that was a few IOS versions ago and my memory may be faulty.
    I apologize if this seems very basic and that you already covered this - are you sure you have your TVs set to the correct external input when you attach the adaptor?   Similar to how you set up external DVD players and such?   Most TV's today have numerous HDMI, VGA, etc... input plugs on the back and sides of the  TV.  The plug you put your Apple Adaptor into must then be selected correctly by your TV remote control.  For my Sony TV for example I must push the TV/Video button that then lists all the input ports - DVD, HDMI1, HDMI2, Video Game 1, PC..... Etc...   Let's say I connected the Apple Adaptor to my HDMI2 port.  I would select that and when the screen refreshed it would now be mirroring the attached iPad.
    http://youtu.be/R1vhwpnyYgg
    http://youtu.be/F9pJ360Eu-c

  • HT4759 I am trying to set up icloud on my laptop but cant see where to go after download. Plus is tracking set up automatically on ipod touch as I have lost/had stolen.  Can you see from my serial no whether this is set up

    I a trying to set up icliuds on a laptop i am using and been round the houses so many times trying to see how to do this. I can do the download part and thats it. Also I have or had an ipod.(Daughters xmas pressie) ot got lost/stlen few days later. Can you check my serial no to see if icud set up on this

    After the download the program must be installed.
    If you did not setup Find My iPod it is not setup and can't be setup now.

  • Displying wrong data after entering estimated cost while creating travel request.

    Hi Team,
    We are facing an issue while creating travel request from portal.
    When we are entering estimated cost and after clicking on save and send button we are getting data is saved as correct.But after clicking on display form button the data is showing as different.
    But after clicking on display form it is showing as 298900(adding two zeros at end for every cost).
    Please help on this.
    Thanks & Regards,
    Kumar.

    Hi Shankar,
    Thanks For the reply. Can you please let me know what settings need to be there in SU3. This issue is effecting for all the users belongs to that country. Can you please suggest me!!
    Thanks in advance.
    BR,
    Kumar.

  • Couldnt see the AR Data

    Hi all,
    I read the installation guide and made some changes at these files ;
    1-Fiscal Week and fiscal month.csv
    2-Group account codes and group account names.csv
    3-Financial statement.csv
    and after conguring these files, I reset the datewarehouse and started the all tasks again.When I completed all the tasks , I can see the GL,AP,Profitability datas in the dashboards but I cant see the AR datas and I created a new task just for Receivables but still I couldnt see the AR datas.Before configuring these files above I can see AR but couldnt see GL.Where the problem can be?.What I am doing wrong?.

    Your situation seems interesting. I need to research some more but it sounds like your configuration files (CSVs) are not right

  • Reinstall Photoshop Elements 13 and Premiere Elements 13 on new PC after old one crashed ?

    How can I reinstall Photoshop E 13 and Premiere E.13 on new PC after old PC crashed? Obviously I was not able to disinstall prior to crash.
    Thanks for your help. EME

    Many thanks !
    De : Peru Bob
    Envoyé : vendredi 20 mars 2015 23:38
    À : Elizabeth Mac Eachran
    Reinstall Photoshop Elements 13 and Premiere Elements 13 on new PC after old one crashed ?
    created by Peru Bob in Photoshop Elements - View the full discussion 
    Scroll down and use the chat option from this link to get the old installation deactivated:
    Activation & Deactivation Help
    Then download and reinstall from here:
    Download Photoshop Elements products | 13, 12, 11, 10
    Download Premiere Elements products | 13, 12, 11, 10
    If the reply above answers your question, please take a moment to mark this answer as correct by visiting: https://forums.adobe.com/message/7322374#7322374 and clicking ‘Correct’ below the answer
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
    Please note that the Adobe Forums do not accept email attachments. If you want to embed an image in your message please visit the thread in the forum and click the camera icon: https://forums.adobe.com/message/7322374#7322374
    To unsubscribe from this thread, please visit the message page at , click "Following" at the top right, & "Stop Following"
    Start a new discussion in Photoshop Elements by email or at Adobe Community
    For more information about maintaining your forum email notifications please go to https://forums.adobe.com/thread/1516624.

Maybe you are looking for

  • Dynamic user credentials for XI receiver communication channel

    Hi Experts, I am working on File(XML ) to ABAP  proxy scenario. I want to know if I get the user-id and password information to login to R/3 system as part of the XML  payload, can I use this information to connect to R/3 system in my XI Receiver com

  • Messages not displayed in WebAccess

    Had a user report this morning that all of his messages in his Mailbox and Cabinet are not displaying. Sent Items and Trash are displaying fine. I did a Find and he does have messages in his Mailbox but they do not display. Any suggestions?

  • Why is it when i have £26.78 in credit they ask me for payment details

    when i try to download from itunes it ask me for payment details when i have £26.78 in credit on my itunes prepayment card*-++++++++++++++++++++++++++++++

  • Passing Data to a Paint Method

    Total newbie here just learning the basics of Java on my own. Working a little application that will display a filled polygon which shows the correct heading of ship based on previously input Ship Heading, length and width. I have the application wor

  • Is it possible to use the camera flash as light !!

    Can I use the camera flash for nokia N73 music edition as light ? For example : to find something in the dark places you can turn the flash on and use it as light.