Not flushing changes made in current transaction

I encounter a problem that KODO doesn't flush changes made in current
transaction. I'm using an external transaction manager (JOTM) and XA
datasource (xapool). From the console output, I know I have an active
transaction. According to the KODO automatic flush behaviour
(http://solarmetric.com/Software/Documentation/3.1.2/docs/ref_guide_dbsetup_retain.html),
given kodo.FlushBeforeQueries is true and kodo.ConnectionRetainMode is
transaction, flush should happen before query.
The code is something like this:
userTransaction.begin();
String field1 = "abc";
long field2 = 10L;
String field3 = "123";
Foo foo = new Foo(); // Foo's PK is field1, field2 and field3.
foo.setField1(field1);
foo.setField2(field2);
foo.setField3(field3);
foo1(foo);
Collection foos = foo2(field1, field2);
System.out.println("foos.isEmpty()? : " + foos.isEmpty());
userTransaction.commit();
public void foo1(Foo foo)
PersistenceManager pm = null;
try
pm = getPersistenceManager();
System.out.println("PM.TX: " + pm.currentTransaction() + " active:
" + pm.currentTransaction().isActive());
pm.makePersistent(foo);
catch (ResourceException e)
e.printStackTrace();
finally
if (pm != null && !pm.isClosed())
pm.close();
public Collection foo2(String field1, long field2)
PersistenceManager pm = null;
StringBuffer filter = new StringBuffer();
HashMap parameters = new HashMap();
StringBuffer paramList = new StringBuffer();
Extent ex = null;
Query query = null;
Collection result = null;
Collection result1 = new ArrayList();
Long field2Long = new Long(field2);
try
pm = getPersistenceManager();
System.out.println("PM.TX: " + pm.currentTransaction() + " active:
" + pm.currentTransaction().isActive());
ex = pm.getExtent(Foo.class, true);
filter.append("field1 == paramField1");
filter.append(" && field2 == paramField2");
paramList.append("String paramField1");
paramList.append(" , Long paramField2");
parameters.put("paramField1", field1);
parameters.put("paramField2", field2Long);
query = pm.newQuery(ex, filter.toString());
query.declareParameters(paramList.toString());
result = (Collection) query.executeWithMap(parameters);
catch (ResourceException e)
e.printStackTrace();
finally
if (pm != null && !pm.isClosed())
pm.close();
return result;
From the console,
PM.TX: kodo.runtime.PersistenceManagerImpl@b34b1 active: true
PM.TX: kodo.runtime.PersistenceManagerImpl@b34b1 active: true
foos.isEmpty()? true
If the userTransaction is committed before invoking foo2(), then, the Foo
object is created and foos.isEmpty() returns false.
I am using KODO version: 3.1.2. Here is the kodo.properties:
javax.jdo.PersistenceManagerFactoryClass:
kodo.jdbc.runtime.JDBCPersistenceManagerFactory
javax.jdo.option.Optimistic: true
javax.jdo.option.RetainValues: true
javax.jdo.option.NontransactionalRead: true
javax.jdo.option.ConnectionFactoryName: jdbc/datasource
javax.jdo.option.IgnoreCache: false
kodo.Connection2UserName: <some user>
kodo.Connection2Password: <some password>
kodo.Connection2URL: jdbc:oracle:thin:@<some host>:1521:<some db>
kodo.Connection2DriverName: oracle.jdbc.driver.OracleDriver
kodo.jdbc.DataSourceMode: enlisted
kodo.jdbc.ForeignKeyConstraints: true
kodo.FlushBeforeQueries: true
kodo.ConnectionRetainMode: transaction
kodo.jdbc.VerticalQueryMode=base-tables
kodo.TransactionMode: managed
kodo.ManagedRuntime :
invocation(TransactionManagerMethod=foo.TransactionManagerUtil.getTransactionManager)
kodo.jdbc.DBDictionary : oracle(BatchLimit=0)
Any ideas are appreciated.
Regards,
Willie Vu

Abe White wrote:
Do you get the same behavior with local transactions?
I don't see anything immediately wrong with your code, but all our internal
tests are passing, and no other user has reported a problem.In a single transaction, I'm using multiple persistence managers which are
closed after usage (method foo1() and foo2() gets different persistence
managers and close them before return). I don't think I can use local
transactions, can I?

Similar Messages

  • "An autonomous transaction does not see any changes made by main transact"

    Hi,
    I'm trying to reproduce the "An autonomous transaction does not see any changes made by main transaction" reffered on :
    Oracle® Database Application Developer's Guide - Fundamentals
    10g Release 2 (10.2)
    Part Number B14251-01
    chapter 2 SQL Processing for Application Developers
    Paragraph : Autonomous TransactionsI set up a simple case...
    create table emp_ as select * from emp
    begin
      update emp_ set hiredate=hiredate+100 where empno=7934;
    end;
    create or replace trigger trg_emp_
    after insert or update on emp_
    for each row
    declare
        pragma autonomous_transaction;
        emp_var emp.hiredate%type;
      begin
        select hiredate
          into emp_var
          from emp_
        where empno=:new.empno;
        dbms_output.put_line('empno: '||:new.empno);
        dbms_output.put_line('old hiredate: '||:old.hiredate);
        dbms_output.put_line('new hiredate: '||:new.hiredate);
      end;Prior to any change...
    SQL> select empno,hiredate from emp_;
    EMPNO HIREDATE
    5498 21/4/1982
    5499 11/10/1981
    5411 10/10/1981
    5410 10/10/1982
    7369 17/12/1980
    7499 20/2/1981
    7521 22/2/1981
    7566 2/4/1981
    7654 28/9/1981
    7698 1/5/1981
    7782 9/6/1981
    7788 19/4/1987
    7839 17/11/1981
    7844 8/9/1981
    7876 23/5/1987
    7900 3/12/1981
    7902 3/12/1981
    7934 23/1/1982After the change...
    SQL> begin
      2    update emp_ set hiredate=hiredate+100 where empno=7934;
      3  end;
      4  /
    empno: 7934
    old hiredate: 23/01/82
    new hiredate: 03/05/82
    PL/SQL procedure successfully completedAccording to the Oracle doc the select of the autonomous transaction should not see the change made to the hiredate column of the table in the main transaction(in the anonymous block)....
    What may i do wrong..????
    Thank you,
    Sim

    Simon:
    As Tubby pointed out, your dbms_output commands do not display the value you selected in the trigger. Your trigger based demonstration needs to be more like:
    SQL> SELECT * FROM t;
            ID DT
             1 05-SEP-2009
             2 17-JUL-2009
    SQL> CREATE TRIGGER t_ai
      2     AFTER INSERT OR UPDATE ON t
      3     FOR EACH ROW
      4  DECLARE
      5     PRAGMA AUTONOMOUS_TRANSACTION;
      6     l_dt t.dt%TYPE;
      7  BEGIN
      8     SELECT dt INTO l_dt
      9     FROM t
    10     WHERE id = :new.id;
    11     DBMS_OUTPUT.Put_Line ('ID: '||:new.id);
    12     DBMS_OUTPUT.Put_Line ('Old dt: '||:old.dt);
    13     DBMS_OUTPUT.Put_Line ('New dt: '||:new.dt);
    14     DBMS_OUTPUT.Put_Line ('Aut dt: '||l_dt);
    15  END;
    16  /
    Trigger created.
    SQL> UPDATE t SET dt = sysdate WHERE id = 2;
    ID: 2
    Old dt: 17-JUL-2009
    New dt: 25-OCT-2009
    Aut dt: 17-JUL-2009
    1 row updated.So, the automomous transaction select did not see the changed value of dt.
    I know you are just trying to understand automomous transactions here and would never do sometihg like this in production right? :-)
    Your trigger, as written, has some interesting side effects because of the automomous transaction. For example:
    SQL> INSERT INTO t VALUES(3, sysdate - 25);
    INSERT INTO t VALUES(3, sysdate - 25)
    ERROR at line 1:
    ORA-01403: no data found
    ORA-06512: at "OPS$ORACLE.T_AI", line 5
    ORA-04088: error during execution of trigger 'OPS$ORACLE.T_AI'
    SQL> UPDATE t SET id = 3 where trunc(dt) = TO_DATE('05-Sep-2009', 'dd-mon-yyyy');
    UPDATE t SET id = 3 where trunc(dt) = TO_DATE('05-Sep-2009', 'dd-mon-yyyy')
    ERROR at line 1:
    ORA-01403: no data found
    ORA-06512: at "OPS$ORACLE.T_AI", line 5
    ORA-04088: error during execution of trigger 'OPS$ORACLE.T_AI'John

  • List view web part not reflecting changes made to list view in SharePoint Designer

    Dear All,
    When adding a list view web part containing a view modified in SharePoint designer (e.g. conditional formatting applied, or group headers modified) I'm finding that the changes made in SPD are not reflected in the web part. 
    For example, I go into SPD edit a view, and the view appears correctly when I go back into SharePoint, however when I link to the view within a list view web part it results in losing the changes made in SPD. 
    Becasue it's a publishing page I'm unable to edit the contents of the web part in SPD.
    I'm sure this is expected behavior but how do I get around this?
    Thnaks,
    MDB

    Try below
    http://stackoverflow.com/questions/19533998/sharepoint-designer-doesnt-show-anything-in-list-and-libraries-link
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/a63a1894-6b1d-420a-95dd-b6c546eab34d/updates-made-to-sharepoint-designer-2010-workflow-do-not-show-up-on-the-server?forum=sharepointcustomizationprevious
    http://stackoverflow.com/questions/5959521/sharepoint-designer-saves-the-changes-but-it-does-not-affect
    http://social.technet.microsoft.com/Forums/en-US/1e9a8c27-bbc5-4a6f-8daf-4b243182f543/changes-in-sharepoint-designer-2010-not-showing-in-sharepoint-server-2010-page?forum=sharepointadminprevious

  • Camera Raw not seeing changes made by DPP

    I am not sure whether this is a procedure problem or capability.
    When I edit a (canon 50D) CR2 file in Canon DPP ver 3.6.1.0 and save it as a CR2 file, then open the same CR2 file in camera raw ver 5.5 it does not see any changes made by DPP  it opens up the file as an original.  All changes made by DPP are gone.
    So my question is, is there a way for camera raw to see and use the changes made by DPP.

    Thanks Gabor
    You have confirmed my suspicion,  I am aware that any changes made by DPP or most other software to raw files is only recording changes and not actually applying the changes until it is converted and saved to another format.  Was hoping that ACR would be able to read the changes.
    The reason I wanted this is I find that DPP does a better job removing noise from high ISO images then ACR, but I prefer the rest of the editing features of ACR, so what I hoped to do was to use DPP to remove noise and finish editing in ACR.
    Was just a though, thanks for the help.
    Boris

  • Lightroom is not acknowledging changes made and saved in Photoshop Elements 11

    I purchased Photoshop Elements 11 and Lightroom 4 to use together.  I am a novice and new to photography and these softwares.  However, I used both together in trial versions and did not have this problem.
    When I start in Lightroom with an image, then take it to Photoshop to do some work with liquify,  save it, return to Lightroom... Lightroom is not acknowledging the new changes made in Photoshop.  When I ran the trial versions,  they did.   How do I get that feature to work again, is there a setting I'm missing?

    Actually  it started working and I'm not sure why or if I did anything different.  I did't do save as, no.  I kow I would have to go upload it again.    I ended up just shutting down both programs  entirely, fired them back up and it's working fine now.   I probably should have done that and/or rebooted my machine before writing in the question .   Thanks though!

  • Website not updating changes made in DW CS3 (though they show up in browser preview) what's wrong?

    this is the website:
    http://www.bsarchitects.co.uk/epic.html
    and the only changes made have been to the text, so it shouldn't be that hard?
    i am taking this website over from someone else and am fairly new to dreamweaver. as far as i can tell, the website uses frames and this might be the problem?
    Thanks!

    There are a few possibilities. First of all, you may be seeing a cached version. Clear your browser cache a try again. Another common problem is that the site definition is setup wrong, so you are uploading to the wrong folder on the server. Please show us your local and remote site definition. Finally, this is a frame site so make sure you are uploading the correct page.
    What is the text you are trying to change?

  • Aperture not exporting changes made to photo

    I am just getting into Aperture and have discovered this problem. When exporting a RAW photo to my desktop as a JPEG not all of the editing is coming through. It looks like everything but the 'sharpen' changes are appearing in the JPEG version.
    Any ideas?
    Thanks!

    I like how the header says the question is answered. Almost cheerfully even. The question about how Aperture does not export changes has been answered.Yay!
    I was delighted because in my hands Aperture DOES NOT EXPORT changes. Pictures I sharpened do not get exported that way. I can take a screen shot of the sharpened picture in Aperture, and the screen shot viewed in preview captures the sharpness. Any thing exported out of Aperture comes out EXACTLY as it went in.
    And I am not alone. There are all kinds of posted solutions. I've read a lot of lies and mumbo jumbo about why it is. The truth is my version of Aperture does not EXPORT changes. So what is the answer???
    I think the correct answer is the one on the page with the yellow star that indicates that the problem is a major flaw in the program and that Apple should FIX IT.
    So.... then...when is that going to happen? Funny how they are dragging their feet on this. They won't even address it solidly... they just start blog pages, and forums, and stall, and stall, and stall.

  • Bridge Not Showing Changes made in Camera Raw

    Hi I work on an iMac (Mac OS X, version 10.4.11), and am currently trialing CS4.  My problem is that I have been processing Canon Raw files in Camera Raw, but when I view the images in the preview pane of Bridge, it is not showing the changes that I have made.
    This is just a sudden problem.  I have been working like this for ages in CS3, and it was even working properly in this trial version of CS4, but literally all of a sudden in the middle of processing a wedding shoot it stopped showing the changes.  So half the images now show the changes but the rest do not, and it no longer shows any of the changes I make in Camera Raw
    Does anyone have any answers to why this suddenly changed?
    Cheers Da     ni

    DaniJumbo wrote:
    This is just a sudden problem.
    "Sudden" is usually a sign to trash your suddenly corrupted preferences.  Hold down the option key as you launch Bridge.
    You may also need to Purge the Cache for each offending folder through the Tools Menu in Bridge.
    Also check your thubmnail  options:

  • Is there a workaround for Aperture not displaying changes made in CS6?

    Previous versions of Aperture would sometimes not correctly display edits made in Photoshop CS5, but re-sizing the Aperture window was a workaround.  Currently, I am experiencing the same problem, but now with CS6, and the wordaround no longer works.  I would appreciate any help with this problem.
    Thanks -
    Dudley Warner

    Leonie -
    The workflow I use for my best images is to open the RAW file in Photoshop and edit it in ACR and CS6, and then import it into Aperture.   I tried changing the extention, but this did not fix the problem.  Here is what image looks like in Aperture.  There are supposed to be 2 top eagles, but the bottom eagle was moved and resulted in both images showing.  The image looks like it is supposed to in CS6.
    Thanks -
    Dudley

  • Bex iView does not show changes made in web templates

    Hello,
    I have a Bex iView that presents a web template which is exposed in two portals.
    I made a certain change in the web template in portal A and I can see the change through the Bex iView in this portal.
    I than transfered the change to portal B and I can see this change at the Web application designer's code when it is connected to portal B.
    The problem is that I can't see the change through the Bex iView in portal B, it keeps presenting the old version of the web template. Also, if I preview it from WAD, which opens it in the portal, it shows the old version as well.
    <b>I've already tried/verified the following:</b>
    1. It's not a client related issue as it happens to all clients.
    2. I have tried clearing both the client and the portal's pcd caches.
    3. No cache whatsoever is configured in this iView's properties (Cache Level: None, Cache Validity Period: 0,0,0,-1, Allow Client-Side Caching: No).
    4. When I run the iView in debug mode in the application integrator I can't see anything unusual I can think of. Also, I can see there that it points to the correct web template.
    5. Retransported the web template from server A to server B.
    What else can be done here? Any ideas...?

    Hello,
    did you resolve your problem ?
    Best regards

  • Bridge Preview Images not showing changes made in ACR

    Suddenly my raw (Nef) files in Bridge are not reflecting the changes I make to them. In other words after downloading from my CF card, I work on raw files in ACR either one at a time or sometimes applying changes across several pictures. The changed files show up in Bridge briefly and then revert back to the unchanged looking raw. All changes actually exist because if I open the file in ACR or PS they appear just fine. In Bridge however, no changes including cropping, etc. show up. When I open Bridge the files are fine for a moment and then they revert to the uncorrected raws. I can also go to View and hit "refresh" and they will all show the proper changes for an instant and then revert to the original state again.
    I've tried resetting preferences, purging and rebuilding cache, deleting temp files, removing and re-doing xmp files, expanding cache size and all the various rendering options in Prefs. Nothing works.
    I cannot use the Bridge Light box or Preview function to compare photos because the corrections I made aren't there to be seen. The only way to see them is to open each file one at a time in ACR. This problem has forced my workflow to a crawl as I have to edit one pic at a time without being able to compare two together. Any help would be appreciated.

    Hi All:
    I had similar problems plus constant crashes that made Bridge unusable.
    It drove me to try alternatives to bridge and to try Lightroom. I like
    Lightroom better than bridge but it has an operational limit that leads me
    to be reluctant switch. But here is the rub, now Bridge is working
    perfectly! What I think fixed Bridge is running a disk/registry cleaner
    called Ccleaner multiple times. I ran it almost every day for a week. It
    found lots of stuff in my registry that it didnt like but as time went by
    it found less and less. It also let me turn on or off services that run at
    startup. I shut off anything that I could see that I didnt need, like
    Adobe downloader; I dont need automatic downloading, as I can do it
    myself. The result is at some point Bridge started to work again. It has
    stayed working for more than 2 weeks now without one crash. I dont know
    what was fixed that did the trick but so far Im happy. Ccleaner is a
    free program and can be found at http://www.ccleaner.com/. Its a live
    program as there have been several updates since I started using it. Try
    it; I think it worked for me.
    John Passaneau
    PS
    After Bridge started to work again, I had to purge the cache and rebuild
    it. I use cache distributed to folders as I keep my photos on a network
    attached drive and access them from 2 computers and a local cache will not
    work for me.

  • DNG files exported from LR4 not showing changes made when opened in PSE10?

    I have LR4, and once I make some develop changes I've been exporting the files I want to use as DNG.  I then open them in PSE10 to make final edits.  It's been working fine, actually I had an older version of Adobe Raw in my PSE on my other computer.  So when I opened in PSE it would ask if I wanted to conver to compatible version to edit in camera raw.  I always said no b/c I didn't need to do anymore raw edits.  Now that I have installed PSE on my new computer, it has the new ACR version I guess.  When I open the DNGs to edit now I no longer get this error message, but it's showing my contrast, etc. as a standard raw setting instead of the changes I made in LR.  Some are showing....like vibrance, but "recovery" which I know is "highlights" in LR, and other things are not showing correctly.  I know that the options are different, but I don't want to use the ACR settings that it's using when I open the file, or have to go through them again.  I'm sure there's something I'm missing but can't figure it out.  Thanks for any help!

    I quite simply did not comment on the issue of "it is supposed to be better to keep DNG files as opposed to NEF files now, right?"
    The issue you raised in your original post, and the issue of choosing DNG versus NEF, are completely separate and independent.
    The issue of transferring photos to PSE would cause the exact same problems in your case whether or not you use DNG or NEF.
    On the issue of converting photos from NEF to DNG, there are advantages and disadvantages, some people do and some people don't. If you'd like to know more, I suggest you search this forum, there are plenty of discussions on this topic.

  • ICal on Mac will not sync changes made in Mobileme or my phone via Mobileme

    I cannot get iCal to accept any calendar changes from Mobile to my laptop. Only events created, deleted or edited on my laptop with iCal are syncing correctly. I've tried creating/deleting from my iphone. The events show up on my mobileme calendar on the web. But when I sync my laptop, the changes do not show up. This renders my phone calendar useless for calendar management

    jsheehan,
    Welcome to Apple Discussions.
    Go to MobileMe Support>United States>Syncing with MobileMe>Troubleshooting MobileMe Sync issues>"Chat Now."
    Be sure to let us know what happens.
    ;~)

  • Uploads not capturing changes made in Lightroom

    Hi, I'm having problems with uploads using Lightroom 2.3 on a Mac OS X. I have noticed that the pictures I upload to the internet don't show all the changes I make in Lightroom. Specifically, the uploads seem to lose adjustments that I make to specific colors using HSL tool. When I export the files from Lightroom to my desktop, I have even tried naming the picture files differently to see if anything happens. After exporting pictures from Lightroom I open them through Preview and it shows all the changes, but when I upload the picture seems to lose all the updates. Does anyone have any idea what could be causing this issue?

    You'll find a number of posts on the subject of color space, color-managed applications, and those which are not. In general, Exports for the web should be in sRGB, but even then there can be anomalies, sometimes related to the monitor on which it's viewed.

  • IPhoto does not save changes made to picture properly

    Hi everyone,
    I just started using iPhoto, and that my first problem: when I edit photo information (f.e. change the name of the photo) in the information panel at the iPhoto window left-bottom corner, these changes are accessible via iPhoto only. It means, that if I copy a picture to my friends computer (by dragging it from iPhoto) all this information is not preserved. The same is when I drag picture to desktop (it looses name info) and when i reimport back to library (no new names already). When after changing the name I check iPhoto originals/modified/data foldes, new names are nowhere to be seen (file names are old ones). The same problem is when I send photos with email - attaching photo from library does not preserve the name.
    Does this has to do with some settings I am not aware of? Could I change something to solve this problem?

    Hi,
    Instead of dragging, try using the Share > Export option and under 'Name:' make sure to select 'Use Title'...
    Rick
    iMac G5 iSight 20" - 30G iPOD in Slimming Black - Mac OS X (10.4.7) - HP Pav 15" WS and Toshiba Sat 17" WS LP's - Canon 20D & A620

Maybe you are looking for

  • How can i access the internet using a non-wireless...

    Before upgrading my BT broadband to BT Infinity, I was able to connect my two desktop PC's to the BTHUB2 without a problem. One of them is running Windows 7 and has a wireless connection, the other is running Windows XP and does not have a wireless a

  • Javascript to decide to load or not to load an applet

    Hi experts, I have the html containing two applets. I want that the second applet will be loaded or not depending on the result of the first one. How can I use javascript to check that? Now the bad result of the first applet is to redirect to other p

  • Killed by fonts

    About every month I try to switch to Arch, and every month I give up after spending hours and hours trying to get firefox to display fonts properly.  The combinations of WM, LCD vs CRT, AUR, nVidia, font packages, results in a never ending  battle to

  • (SOLVED) How do I remove dependencies of AUR packages?

    I rather not use sudo and thereof I issue a 'makepkg' instead of a 'makepkg -s' and install dependencies manually. I wonder though what happens when I issue a 'pacman -Rns' to remove an AUR package. Pacman doesn't seem to remove the dependencies. Do

  • Error, 907 invalid cod

    My device type is blackberry torch 9810, software version is 7.1.0 Bundle 1909, Free storage Application storage : 140.4 MB. I have been trying to download blackberry app world used wifi connection, but this is what I keep seeing when is about comple