Entity Bean Rollback fails: caches are out of synch with the database

We are encountering a critical issue where the rollback of a session transaction rolls back any database changes, but doesn't roll back bean changes in memory. When we next access the bean, it returns information that should have been rolled back. The memory cache is out of synch with the database.
We have a simple session bean S, using container managed transactions. We also have an entity bean E using bean managed persistence. E has a single member <name>.
We implement a method s() in S with <trans-attribute> Required as follows:
public void s() {
Context lookupContext = getLookupContext();
SHome shome = (SHome) lookupContext.lookup(SHome.NAME);
S s = shome.findByPrimaryKey(thePrimaryKey);
System.out.println("-- current name = " + s.getName());
s.setName("IGNORE");
EJBContext ejbContext = (EJBContext) getContext();
ejbContext.setRollbackOnly();
Since this is BMP, the setName call issues our SQL update against the S record. When the session transaction rolls back, the database changes are also rolled back. But the entity bean in memory shows the modified name. We can see this in the next call to s() since the getName() returns IGNORE rather than the original value. We have also gotten debugged into the underlying instance cache associated with the S bean descriptor. I.e.
AbstractEJBHome ejbHome = (AbstractEJBHome) lookupContext.lookup(SHome.NAME);
AlternateHashTable aht = ejbHome.getBeanDescriptor().getCache();
Looking at this map of bean instances also shows that the bean instance for S is not rolled back.
From previous conversations with the server technologies team, we understand that during the transaction, we should be working on a cloned copy of the S bean. Upon rollback, the copies should be discarded rather than merged back to the cached bean. They seem to be merged regardless of rollback state.
We are using OC4J 10.1.3.0.0 (build 060119.1546.05277).

Actually, what one or the developers in my group found out is two things:
1) The clone is a shallow copy.They copy the references but not objects themselves. This has been causing problems for us.
2) It seems that you don't work on a copy and you work on the original and they keep a copy. Now, this is fine IF you don't have multiple threads working on the same Entity bean and we moved our application from Weblogic where it throws an exception if that Entity bean is in use to OC4J which is suppose to copy the bean and doesn't so you have multiple threads possibly modifying the same object.

Similar Messages

  • After REFRESH the cached object is not consistent with the database table

    After REFRESH, the cached object is not consistent with the database table. Why?
    I created a JDBC connection with the Oracle database (HR schema) using JDeveloper(10.1.3) and then I created an offline database (HR schema)
    in JDeveloper from the existing database tables (HR schema). Then I made some updates to the JOBS database table using SQL*Plus.
    Then I returned to the JDeveloper tool and refreshed the HR connection. But I found no any changes made to the offline database table JOBS in
    JDeveloper.
    How to make the JDeveloper's offline tables to be synchronized with the underling database tables?

    qkc,
    Once you create an offline table, it's just a copy of a table definition as of the point in time you brought it in from the database. Refreshing the connection, as you describe it, just refreshes the database browser, and not any offline objects. If you want to syncrhnonize the offline table, right-click the offline table and choose "Generate or Reconcile Objects" to reconcile the object to the database. I just tried this in 10.1.3.3 (not the latest 10.1.3, I know), and it works properly.
    John

  • Adf faces tutorial - Toplink model is out of sync with the database.

    When running the adf faces tutorial I encountered some problems. The starter workspace uses toplink and the model should be based on the OE schema database objects. However the Customers class is different from the database table, especially the custAddress (but also the phoneNumbers).
    Thus when running the application, the creation and update of a customer (with data for the address) raises the following error:
    javax.faces.FacesException: #{ManageCustomers.doUpdate}: javax.faces.el.EvaluationException: Exception [TOPLINK-4002] (Oracle TopLink - 10g Developer Preview 3 (10.1.3.0 ) (Build 041116)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-00932: inconsistent datatypes: expected OE.CUST_ADDRESS_TYP got CHAR
    Error Code: 932
    Besides, the application is not able to display the address properly (due to the same problem) but shows something like: oracle.sql.STRUCT@43e and it cannot display the order_date (timestamp with timezone) correct.
    I get the impression that the toplink model is based on an old or modified OE schema and has not been updated. I like the tutorial, but I would appreciate it when it is correct and does not contain such flaws as descibed. Please update the workspace.

    Ship missing arch files to the standby arch dest manually and initiate recovery of the standby db.No need to regenerate the controlfiles. You might want to investigate the reason why they were not sent to the standby db.

  • Video out of synch with audio premiere cs4

    Hi, im really new to Adobe premiere pro cs4 and i just wanted to import a video. Most of the videos I import are out of synch with the audio.  The audio is in time, but the video is sped up about 6 times as fast????

    We will need a lot more information about those Videos. This ARTICLE will give you ideas on the info that will be so very useful for us to help you.
    This ARTICLE will give you some background on Video formats/CODEC's.
    Good luck, and please let us know more about those files. A screen-cap of G-Spot would be very useful.
    Hunt

  • InstantOn DVD - Audio out of Synch with Video

    Hi
    I have a MegaPC 865 Pro.  I am having problems with the InstantOn DVD Player.  The Audio is out of synch with the video. (the Audio is slower than the Video).  It happens on both analog and digital spdif out modes.
    CPU: Celeron 2.66
    RAM: 1G
    Optical Drive: LG GSA-4081B
    HDD: 40G Seagate
    Audio and Video are the inbuilt ones that came with the MegaPC 865.
    In Windows XP Media centre, it works fine (the audio/video synch works fine, the 5.1/7.1 audio mix mode has problems, but thats a different topic!!)
    Can anyone offer any suggestions??  Thank you.

    For iPod specifications, see beneath the subtitles for Audio and Video here: http://www.apple.com/ipod/specs.html
    Video
    Video formats supported: H.264 video, up to 1.5 Mbps, 640 by 480 pixels, 30 frames per sec., Low-Complexity version of the H.264 Baseline Profile with AAC-LC audio up to 160 Kbps, 48 kHz, stereo audio in .m4v, .mp4, and .mov file formats; H.264 video, up to 768 Kbps, 320 by 240 pixels, 30 frames per sec., Baseline Profile up to Level 1.3 with AAC-LC audio up to 160 Kbps, 48 kHz, stereo audio in .m4v, .mp4, and .mov file formats; MPEG-4 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per sec., Simple Profile with AAC-LC audio up to 160 Kbps, 48 kHz, stereo audio in .m4v, .mp4, and .mov file formats
    Audio
    Frequency response: 20Hz to 20,000Hz
    Audio formats supported: AAC (16 to 320 Kbps), Protected AAC (from iTunes Store), MP3 (16 to 320 Kbps), MP3 VBR, Audible (formats 2, 3 and 4), Apple Lossless, AIFF and WAV
    User-configurable maximum volume limit

  • Video out of synch with audio

    Sometimes when I use my camera the audio is out of synch with the video.
    This has happened when I use the 8mm apps as well.
    Is there a way to fix this or make it not happen at all?
    Evan Jacobs

    Sorry that didn't help, Jon.
    This kbase search makes me wonder if perhaps you have some kind of conflict with something you are doing in Logic or some other AV Pro App?
    If you can rule that out, too, somebody else might have suggestions. It may help them to know if you have exactly the same problem when you try to record movie clips with some other application.
    I have no other ideas.
    EZ Jim
    PowerBook 1.67 GHz  2GB RAM    Mac OS X (10.4.10)    G5 DP 1.8 4.5GB RAM  External iSight

  • Why is audio out-of-synch with video on VOB files

    I used a Pioneer DVR to import ~120 8mm and Hi8mm and Digital8 analog tapes to convert them to DVD's.  These ~120 DVD's are in VOB format.  These are 4:3 video (not HD).  I did test this flow and didn't notice a few of the VOB's did not have the audio tracking properly.
    When importing them into Premiere Elements 8.01 some of the VOB files have their audio out of synch with the video, yet, they play okay in the Premiere preview window.
    Is there a setting so that when it 'conforms', that it will track the audio correctly?
    Do I need to buy a conversion tool to go from VOB to mpeg-2 (or other format?) and then import to Premiere Elements 8?
    Is there a better video editing tool to use?
    I simply want to take all these 8mm tapes / DVD's to splice the best scenes.
    I am running Windows 7 Ultimate 64-bit AMD Athlon II X4 630 2.8GHz processor, 4GB of DDR3 memory; and installed an ATI HD-4350 pcie gen2 graphics card. I have a memorex bluray dvd player.
    Thanks, SJK.

    I have NOT used those products, I only forward due to other mentions
    Convert http://premierepro.wikia.com/wiki/FAQ:How_do_I_convert_my_files%3F
    Edit Vob http://premierepro.wikia.com/wiki/FAQ:How_do_I_import_VOB_files_/_edit_a_DVD%3F
    $99 http://www.corel.com/servlet/Satellite/us/en/Product/1175714228541#tabview=tab0
    $99 http://www.womble.com/products/mvw.html
    $80 http://www.nchsoftware.com/prism/index.html
    $75 http://www.videoredo.com/en/index.htm
    $75 http://www.magix.com/us/movie-edit-pro/
    $70 http://www.nchsoftware.com/prism/index.html Converter
    $40 http://www.daniusoft.com/dvd-ripper.html#135
    $40 http://www.deskshare.com/dmc.aspx Digital Media Converter
    $00 http://www.squared5.com/ Converter
    $00 http://www.erightsoft.com/SUPER.html Converter
    $00 http://www.virtualdub.org/ Converter

  • Mappings out of synch with OWB repository

    Hi,
    I have a global problem with my repository, every mapping reports validation errors (many) advising to reconcile inbound or outbound.
    First question is how could this happen on such a global scale (affects every mapping) ?
    Second is how to fix, when I reconcile inbound a) All the links to columns are lost and I have to manually re-attach which is very risky let alone tedious b) After reconcile inbound some tables dont match what is in the repository (columns missing). The only way around this was to delete and drag the table back into the mapping and re-attach columns.
    Third question is, since the prod version of these mappings are running successfully if I deploy a mapping that is out of synch with the repository will it still function as it should ?
    Any help appreciated.
    Cheers,
    Brandon

    I think the problem you are having is that your mapping objects are not reconciled to the repository objects. It is purely a logical OWB problem of matching an mapping operator to an OWB object. It should not effect your busines logic or code that is generated by OWB.
    The warnings are just that, warnings. If you were missing a connection between objects, you'd get an error.
    Even though an operator in your map exists as an object in your repository, they are not properly bound. If your reconcile inbound each object (match by UOID and by name), you should stop getting the warnings.
    This is one of those quirks with OWB (at least with 9.2.0.8 that I am using). I noticed that if I import a mapping from another repository, the operators become unbound. I've given up trying to fix them each time. I just ignore the warnings.

  • Bluetooth audio out of synch with macbook video

    The bluetooth audio is out of synch with the video playing on on my macbook.  Does anyone know how to synch them up?

    For iPod specifications, see beneath the subtitles for Audio and Video here: http://www.apple.com/ipod/specs.html
    Video
    Video formats supported: H.264 video, up to 1.5 Mbps, 640 by 480 pixels, 30 frames per sec., Low-Complexity version of the H.264 Baseline Profile with AAC-LC audio up to 160 Kbps, 48 kHz, stereo audio in .m4v, .mp4, and .mov file formats; H.264 video, up to 768 Kbps, 320 by 240 pixels, 30 frames per sec., Baseline Profile up to Level 1.3 with AAC-LC audio up to 160 Kbps, 48 kHz, stereo audio in .m4v, .mp4, and .mov file formats; MPEG-4 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per sec., Simple Profile with AAC-LC audio up to 160 Kbps, 48 kHz, stereo audio in .m4v, .mp4, and .mov file formats
    Audio
    Frequency response: 20Hz to 20,000Hz
    Audio formats supported: AAC (16 to 320 Kbps), Protected AAC (from iTunes Store), MP3 (16 to 320 Kbps), MP3 VBR, Audible (formats 2, 3 and 4), Apple Lossless, AIFF and WAV
    User-configurable maximum volume limit

  • Movie Clips Actions Get Out Of Synch With Audio

    My movie is five about minutes long with audio and an offscreen timeline move clip containing action script to control other movie clips or play the root directory.   After about a minute or so, movie clips get out-of-synch with the audio, apparently its getting bogged down.
    My swf file doesn't seem that big, about 2.2MB and my move clips aren't that complex, although up to three levels deep.
    My version is Flash 8 Professional and my laptop was on the high end about 18 months ago.
    Am I missing something or expecting too much from Flash?
    Thanks,
    Mike (who seems to know enough to be dangerous)

     

  • Since upgrading to 3.6.15 some settings are not saved, and the alerts when changing between encrypted content are totally out of synch to the actually occurence

    The settings dialog box cuts off the bottom ofthe box content as it seems to be having problems with font rendering.
    Settings such as "Show download window" and "Ask me where to save" apparently revert to defaults rather than saving the settings.
    The encrypted content alerts are out of synch. They claim to be going from encrypted to non-encrypted when neither page is encrypted. Or warn of non-encrypted content on an encrypted page when the whole page is unencrypted.
    3.6.14 had none of these problems.

    Update to 3.6.16 has fixed this problem.

  • Eclipse XQuery expression validation failed: The current configuration is out of sync with the XQuery resource in the repository.

    I created a wsdl based on a dbadapter in jdeveloper, imported into eclipse and created the biz and the proxy and uploaded to oracle service bus, it works fine,
    but happens now that i need to have a xsd and wsdl with business names and not table names, invented to create a xsd and wsdl file in jdeveloper
    and then went to eclipse and tried t xquery tranformation, but when i add the replace in the message flow in the filed in Variable : body and Expression i look for the xquery and in the binding trying to put
    $body/input parameter, get the following error [RouteNode1, Replace action] XQuery expression validation failed: The current configuration is out of sync with the XQuery resource in the repository.
    what im doing wrong or its configuration
    thanks in advance sonia

    thanks
    ok have created a table with only in column varchar2(1)
    then the type object and the procedure to insert it works the proxy in the osb if i test it inserts
    now in jdeveloper i created an xml file with
    <?xml version="1.0" encoding="windows-1252" ?>
    <vessel>
    <barco>a</barco>
    </vessel>
    then i created a xsd based on this xml, and a wsdl based on the xsd
    in eclipse created a xquery transformation and selected source as the xsd created in adf and target the xsd input parameter, dont know why in the purple ball of the input parameter it puts a ?, an a f.
    then in the proxy xpath not writing anything in variable body and in the expression select the xquery and in binding select the parameter

  • Error -90032 occurred at Error in function centref at line 5 column 8: The indexes are out of bounds for the variable you specified

    Sir, 
    i am running a matlab code in mathscript of labview but getting an error
    Error -90032 occurred at Error in function centref at line 5 column 8:  The indexes are out of bounds for the variable you specified
    this code running successfully in matlab 
    please help me in this regard
    a .vi format file is attached named as mfcc_new.vi
    Attachments:
    mfcc2.vi ‏35 KB
    mfcc_new.vi ‏111 KB

    May I see you have 6 inputs to your Mathscript Node. When you test it in Matlab I suposse that you're using some values for this inputs and everything work as expected. Then, run it in Labview using highlight execution, retaining wire values and using single stepping. Check the values which are being inserted to your Mathscript Node and ensure that they are correct. You're having an "indexes out of bounds" mistake, so it probably means that there is something  wrong with the inputs according to your expectations. You can also put the MathScript alone in another VI and insert the inputs you're expecting manually and check in the same way.
    Good luck!

  • Just bought an iMac and use iCloud.  calendar appointments on iMac are displayed 24 hours out of sync with the iPhone.  the iPad and macbook air pick up the same information correctly.  why is this?

    just bought an iMac and use iCloud.  calendar appointments on iMac are displayed 24 hours out of sync with the iPhone.  the iPad and macbook air pick up the same information correctly.  why is this?

    Hi smokeondz,
    Thanks for visiting Apple Support Communities.
    If your iCloud calendar entries are not displaying as expected, start with the troubleshooting steps in this article:
    iCloud: Troubleshooting iCloud Calendar
    http://support.apple.com/kb/ts3999
    Best Regards,
    Jeremy

  • Looks like we are running out of the maximum connections IAS 6.0 SP4 can open with the database. Where is the setting and how can we change it?

    We are using IAS 6 SP4. We have 4 kjs engines and we see total 112 jre threads being spawned to database. The code is not able to open connection with the database when we go beyond 60 users (approx)
    Any clues?
    Thanks in advnace
    Sangeeta

    Hi,
    Fine,Its always better to increase the Max pool Size settings to a large value corresponding to KJS's max thread value. Sometimes i had faced problems with Asynchronous database queries eventhough i increased the Max thread value of the Driver to a good maximum value.
    If an application has a very large number of users who access the same data, then Setting the Database Cache's Maximum Connections to a large value will surely help.
    I think its always better to have a clear database connection settings strategy ,considering your Complexity of your Application 'We are using IAS 6 SP4. We have 4 kjs engines and we see total 112 jre threads being spawned to database'.
    Regards,
    T.Raghulan.

Maybe you are looking for