Dealing with 1Million of records

i'm connecting to DB2 via JDBC. the DB i'm using is quite large. my question is will i get OutOfMemoryError if i just do a simple select such as
"select * from bigTable"
since this table contain 1Million records.
or is JDBC smart enough not to hold every record in the memory but fetching the record as they are used(after calling resultset.next())?
i see method Statement.setFetchSize(int size). what does it do?
if JDBC is not smart as i thought then the only way i can prevent OutOfMemoryError is to select a batch of records(i.e. 100/batch)?
any suggestions?

Hi,
Basically, I suggest that partition that big table properly.
one million records in one table might cost lots of resources
while database operate that table. It is possible to degrade
the performance of that table operation as well. Database is
good for us to deal with the large amount of data. But it needs
to be well controlled for the best performance.
good luck,
Alfred Wu

Similar Messages

  • CMR - how to deal with no child records

    Hi,
    I have developed a number of CMP EJBs, created relationships, mapped and deployed OK using WSAD v5 + DB2 backend. When I call findByPrimaryKey on the parent in the one to many, everything works unless there are no child records. The server generates a ObjectNotFoundException and the data in the parent record is not accessible.
    TIA for any advice.
    Jim

    Don't you love it when Sun does an implementation that sucks, does not document it properly, and does not even bother to answer your questions in the forum... You'd think that after these many years they would have gotten it right. I am also having a similar problem and I have seen it on many postings, but no answers... :P

  • How to deal with delete record in generic delta of generic datasource

    Hi,
       Anyone can give me suggestion about the delete record in generic delta  of generic data. I need extract data with a generic datasource and hope deleted record in datasource also can be "delete" in next delta extraction. I do a test with generic delta. It seem that the delete record can not be updated in ODS. but updated record can be updated in next delta extraction.
    How dose BW generic delta deal with the deleted record with generic delta mechanisim? Or how can I use generic delta mechanisim to realize that BW "delete" the deleted record of source system in ODS with delta extraction?
    Thanks in advance!
    Billy

    Delete is not supported in delta mechanism of generic delta extractor. You will need to add a workaround for that.
    - Capture the deleted records somewhere (maybe enhance the txn deleting the record so the key is written to a Z table). Take these records to BW and manipulate the recordmode to affect deletion of corresponding record from ODS.
    - If your generic delta is based on FM, and if the 'delete' is captured in change document tables, add the logic to check change document tables whether any records are deleted, and if yes, send those to BW with appropriate recordmode to achieve deletion.

  • How to deal with generated programs in eCATT SAPGUI recording?

    Hi experts and professionals,
    I am trying to automate testing of our solutions by eCATTs and so far i have not been able to find solution for following problem.
    Whole test scenario is very simple:
    Check InfoProvider data (query, lookup, listcube,...)
    Create DAP on InfoProvider
    Archive InfoProvider
    Check InfoProvider data (query, lookup, listcube,...)  again
    Compare results from step 1. and 4. (must match)
    Reload archived data
    Check InfoProvider data (query, lookup, listcube,...)  again
    Compare results from step 1. and 7. (must match)
    As you can see, one of the required test steps is to check InfoProvider's data in transaction LISTCUBE.
    But transaction LISTCUBE generates its program "name" every time it is executed and
    I am struggling to find a way how to deal with these generated programs in eCATT SAPGUI recording.
    Key is that solution must be generic and work for all SAP BW releases from 7.0 upwards
    (having in mind that LISTCUBE can read NLS data from SAP BW 7.3 release).
    Error description from eCATT log:
    Screen Check Error: Expected Transaction: LISTCUBE, Actual Transaction: LISTCUBE.
    Expected Program: GP0KOZE7EFIUBN10MZUFWX90W80, Actual Program: GPBP24INA6VV77SL0XKU5NA642O.
    Expected Screen Number: 1000, Actual Screen Number: 1000.
    There Is Probably an Error in SAPGUI recording.
    ExceptionClass:CX_ECATT_APL_CAPTURE  ExceptionId:SCREEN_CHECK_ERROR
    RaisingClass:CL_APL_ECATT_LINE_INTERPRETER  Include:CL_APL_ECATT_LINE_INTERPRETER=CM00J  Line:443
    Is there any way how to avoid program check in eCATT script?
    Anything that would help me to find solution will be greatly appreciated.
    Best Regards,
    Igor

    Dear Igor,
    Your issue is caused by the "screen check" which eCATT processes here.
    In General this screen check is a very usefull activity, since is ensures that only those screens are processed by automation, which initially where recorded. This should ensure as much as possible to invoke only intended activities.
    Remember, that the driver of the screen flow is still the automated transaction program ( but not the test tool). So application logic decides which screen is send next.
    Using screen check the test tool tries to ensure that menu items and buttons and other activities are only automated when the tool "believes" to work on the intended screen.
    For generic test scripts and often in context of generated programs the screen check might hurt a bit.
    To overcome this, one might try to make the check dynamic (as Sheetal suggests correctly).
    If here the name of program cannot be determined for any reason, one can use another method and do following:
    - Change the value of ProcessedScreen-Active to 'R'
    This will disable/skip the screen-check for this ProcessedScreen.
    Sure the solution includes a certain risk, since not checking the correct screen to appear might lead to automation of actions with not desired impact.
    Maybe this can improve your solution.
    Kind Regards
    Jens

  • How to deal with bass hum/noise while recording

    I recently got a bass guitar (fender p-bass) and its a little noisy. There is an electronic hum/buzz when my fingers are not touching the strings. I had my guitar tech look at it and he said the noise is normal. However, I plan on using this bass to record direct and when I plug into Logic this buzz/hum is audible. If I turn the tone knob on the bass down completely, the noise goes away. But when I start to turn the tone knob up at all the noise get louder.
    My question is if this is a common problem with instruments (bass, guitar, etc) and is it normal to use a plug-in to eradicate this noise (like a noise gate, or something else)? Also, does anyone else have any ideas on how to work with this buzz/hum? Thanks.

    I recently got a bass guitar (fender p-bass) and its
    a little noisy. There is an electronic hum/buzz when
    my fingers are not touching the strings. I had my
    guitar tech look at it and he said the noise is
    normal. However, I plan on using this bass to record
    direct and when I plug into Logic this buzz/hum is
    audible. If I turn the tone knob on the bass down
    completely, the noise goes away. But when I start to
    turn the tone knob up at all the noise get louder.
    My question is if this is a common problem with
    instruments (bass, guitar, etc) and is it normal to
    use a plug-in to eradicate this noise (like a noise
    gate, or something else)? Also, does anyone else have
    any ideas on how to work with this buzz/hum? Thanks.
    Hi JackQ,
    I had some experience a few years back with one of these basses,same model.Basically,the hum you are hearing is a grounding problem.Your tech does not know how to fix it,that's why he said it's "normal".It's not normal.
    You cannot get rid of that noise unless you do two things.One:get a reputable tech that is an expert on electric instruments,and ask him to solve the ground hum problem.It is not expensive to do so.
    Second,you can do a "home repair" kind of fix,like this:Take a RadioShack alligator clip wire (the ones that look like little alligator mouths,that clamp onto anything)and hook up one end to the bridge of your bass,and hook up the other end to your body,preferably where you have a high pain threshold.This second option,will work,but I only recommend it when you are going to record,otherwise if you leave the alligator clamp on you for a long time,it will leave a permanent mark(just kidding).This also is the cheapest and most efficient way of dealing with the hum problem.Plugins like a gate or other are not going to make it go away,and you'll spend wayyyyyy tooooo much time trying to get it(the plugin) to work.
    Cheers,
    noeqplease

  • How should I deal with exceptions?

    I have three possible choices that I see:
    (1) Deal with them in an exception handler class. Use try/catch/throw in the class. Have throw call a method in the exception handler class.
    (2) Use try/catch/throw and handle the exception in the same class where the exception occurs.
    (3) Use throws and deal with the exceptions in the mediator class. The mediator class allows for communication between my FileHandler class, my DBHandler class, my UIClass, and any future classes.
    Note that for each exception, I want to call a method in the UI class that displays a message to the user about the error so it can be debugged and a method in some class to write the error to an error log text file.

    Handling
    can mean as little as logging the error.I'm gonna have to go ahead and disagree with youthere, %.
    Disagree with me? This cannot be tolerated! 8)Watch it, lest yet get yer ass smote.
    Except for where you're intentionally
    smothering exceptions in finally blocks, or maybe
    just recording an InterruptedException, justlogging
    it is little better than smothering it. So what about unchecked exceptions? Are these .NET
    demon spawn?I let unchecked exceptions bubble up. I'd expect an appserver to catch and log them, so that a bug in one app doesn't cause the whole server to barf. But other than that kind of situation, these are exceptions that you usually shouldn't try to handle.
    >
    I'm curious, since this thread is so much about
    handling exceptions. What do people do besides
    report them? If you get a SQL exception, what
    recovery actions are you taking? Anything that I'm
    missing?Usually it just bubbles up, or it's a wrapped in a more appropriate or layer-specific exception and rethrown. Sometimes there might be a retry, but usually the exception bubbles up to the higher layers and gets presented to the user as something like, "Could not connect. Retry?" What I hate to see is this:
    try {
        // get stuff from the DB
    catch (SQLExeption exc) {
        // log it
    // Continue here (where "here" may be the calling method)
    // with no idea that anything went wong.If you do that, you might as well not have an exception mechanism. Just go back to return codes and don't bother checking them.

  • How can i deal with this problem

    For example, In my database, there are three records:
    field : a b c
    a.txt c:/a.txt adsfs
    b.txt c:/b.txt asdfsf
    c.txt c:/c.txt asfdsf
    Now I open one file b.txt to check the database whether have the same filename,filepath, hash value.
    the results display:
    The file: b.txt has not been registered
    The file: c://b.txt appears OK
    The file: b.txt has not been registered
    I want to do is to only shows the results of 'The file: c://b.txt appears OK'. I know the problem is the body of while(rs.next).
    is there any best way to conform to my demand
    try{
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    String url="jdbc:odbc:MD5";
    Connection connection=DriverManager.getConnection(url);
    Statement statement = connection.createStatement();
    String sql="SELECT * FROM MD5";
    ResultSet rs = statement.executeQuery(sql);
    while (rs.next()) {
    if (file.getName().equals(rs.getString("a")))
      if (file.getPath().equals(rs.getString("b")))
      if (m.equals(rs.getString("c")))
        jTextArea2.append("The file: " + file.getPath() +"appears OK"+"\n");
    else jTextArea2.append("The file: " + file.getPath() +"has been modified"+"\n");
    else jTextArea2.append("The Path for the" + file.getName() +"has been modified"+"\n");
    else jTextArea2.append("The file: " + file.getName() +"has not been registered"+"\n");
    rs.close();
    connection.close();
    }

    Why not add a WHERE clause to your statment to filter records having the name of the file in the first record. In this case you'd better use PreparedStatement and set the file name as statement parameter
    Because now you loop through the entire table for a thing you can deal with at DB level.
    And I agree with the others' remarks about those braces ;)
    Mike

  • I'm trying to transfer music from iTunes on an old PC that uses an external storage device to a new PC (Windows 7) that will use that same external storage device.  I am also dealing with new iTunes 11.  How do I do this??  What folder does iTunes use?

    I'm trying to transfer music from iTunes on an old PC (Windows Vista Home Basic) that uses an external storage device to store the files to a new PC (Windows 7 Starter) that will use that same external storage device.  I am also dealing with the new iTunes 11.  How can I accomplish this successfully?    What folder does iTunes use to store the data in?  I've tried several things.  Home Sharing caused duplicates but not all songs or apps transfered.  It is a large library! I've tried just setting the path in the Advanced Tab of iTunes preferences of the new computer with the external drive connected the same as the path when the external drive is connected to the old computer.  This was the best solution so far but still a few artists missing and some apps. Any suggestions?

    Here are typical layouts for the iTunes folders:
    With iTunes 11 you might also have a Home Videos folder inside iTunes Media.
    In the simplest cases you copy the entire iTunes folder from <User's Music> on the source computer to <User's Music> on the target machine, install iTunes, and it "just works"TM.
    If the media folder (inside the red outline) has been split out to a separate location then you can copy the library folder (outside the red outline) as before and connect the drive holding the media so that it has exactly the same path as before. If the drive appears as D: on one system and E: on the other then the library won't be able to find the media.
    The crucial file is iTunes Library.itl - this contains a record of the tracks that have been added to the library, ratings, play counts, playlists etc.
    See also: Make a split library portable.
    tt2

  • Is there a better way to deal with Verizon and my DSL issues?

    My family and I have been with Verizon for as long as we've had broadband internet. For the past 5 years or so the internet has been shaky at best. For the most part it works, but a coupe times a year it stops working all together or becomes VERY intermittent (and is usually working by the time I get finished sitting on hold and the test the technician runs shows no problems). Every time I have to wrestle with the "tech support" on the phone and listen to a recording tell me the same things over and over again that never fix my problems.
    Every time my internet gets to this point, it requires a visit from a Verizon technician. Usually they go out into the neighborhood and find a length of cable and replace it. Usually that fixes my issues for a while, but I know it will happen again. It always happens again.  It seems to me that the entire length of line that my internet runs through is old, and needs to be replaced. Instead of fixing the problem before it actually becomes a problem, Verizon continues to leave me and my family without service for periods of time.
    Last week was the most recent time we dealt with this situation, which was fortunately short lived (Only all day Sunday, into Monday when the technician arrived). It's getting VERY tiring dealing with this situation over and over again, and it's getting offensive honestly. To hear the tech support person tell me that I will be charged $91 if the problem is found and is inside my house is ridiculous. I would understand if this was the first time this situation had occurred, or if I frequently reported non-issues. But no, I'm simply reporting the same issue that Verizon has failed to fix MANY times before. 
    Perhaps the most frustrating part of this, is that we've never been compensated for our lost service. Last year we lost service for an entire week. That's an entire week with no internet service at all. After we finally got it back, we spoke with the billing department and they told us that we would be credited for the week we lost service. At this point, we are yet to see any credit for the time we have been without the service we pay for. Perhaps we would have tried dealing with Verizon again to get our weeks credit, but attempting to contact someone in Verizon seems futile. Unless you're calling sales you end up sitting on hold for extended periods of time, only to be bounced from person to person until you get to someone that has no excuse not to pretend to help you. 
    Unless something changes, this is Verizon's last opportunity to keep our service. We have dealt with the loss of service followed by the insult of attempting to deal with Verizon's customer support for the last time. Next time it happens (and I'm sure there will be a next time) unless Verizon shows us that they are actually going to correct the problem, we will cancel our service and give our business to the competitor. This post is being written for a few reasons. I'm hoping that perhaps Verizon can give me a better way to contact someone locally when we have a problem (I would LOVE to speak with a regional manager, or even a local manager of some sort), or at least recognize that there is a problem that will end up costing them money. 
    Thank you,
    A long time customer.

    I've decided to give up the fight and go to another provider.  I have work to do and having to wait at speeds slower than dial up is insane.  At least with dial up I'd have some stability.  I can't even run speedtest because it won't connect.  At hotels, wi-fi, and hanging by blackberry the laptop works fine but to actually use dsl, nope.  Multiple machines and multiple browsers - it's all the same worthless bandwidth.  
    If they won't give you fios then there is no reason to stay.  They've been promising me the service is coming for the last 6 years.  They could have run it here by now for the postage they've spent trying to get me to switch to it even though it isn't available.  Waste, waste, waste ....

  • How to deal with the rejected stock if it is rjected by QC

    Dear All,
    please let me know how to deal with the rejected  stock from Quality point of view.i.e., for incoming materails and Finished if returned from customer
    Regards,
    P.Vijaya

    hi
    if material is rejected for incoming material then you can create Notification for incoming material due to  you can return back material with print for that you have to record defects in result recording. in T-code QM02 if result is recorded with defects. or you can create with Qm01.against vendor
    if material is returned from costumer you can create inspection lot for that for that you have to maintained inspection type 06 in material master. you can result record for that you can create notification for that. or rework for this material as per quality check or can scrap
    if have any problem please come back
    regards
    Pravin

  • Dealing with large volumes of data

    Background:
    I recently "inherited" support for our company's "data mining" group, which amounts to a number of semi-technical people who have received introductory level training in writing SQL queries and been turned loose with SQL Server Management
    Studio to develop and run queries to "mine" several databases that have been created for their use.  The database design (if you can call it that) is absolutely horrible.  All of the data, which we receive at defined intervals from our
    clients, is typically dumped into a single table consisting of 200+ varchar(x) fields.  There are no indexes or primary keys on the tables in these databases, and the tables in each database contain several hundred million rows (for example one table
    contains 650 million rows of data and takes up a little over 1 TB of disk space, and we receive weekly feeds from our client which adds another 300,000 rows of data).
    Needless to say, query performance is terrible, since every query ends up being a table scan of 650 million rows of data.  I have been asked to "fix" the problems.
    My experience is primarily in applications development.  I know enough about SQL Server to perform some basic performance tuning and write reasonably efficient queries; however, I'm not accustomed to having to completely overhaul such a poor design
    with such a large volume of data.  We have already tried to add an identity column and set it up as a primary key, but the server ran out of disk space while trying to implement the change.
    I'm looking for any recommendations on how best to implement changes to the table(s) housing such a large volume of data.  In the short term, I'm going to need to be able to perform a certain amount of data analysis so I can determine the proper data
    types for fields (and whether any existing data would cause a problem when trying to convert the data to the new data type), so I'll need to know what can be done to make it possible to perform such analysis without the process consuming entire days to analyze
    the data in one or two fields.
    I'm looking for reference materials / information on how to deal with the issues, particularly when a large volumn of data is involved.  I'm also looking for information on how to load large volumes of data to the database (current processing of a typical
    data file takes 10-12 hours to load 300,000 records).  Any guidance that can be provided is appreciated.  If more specific information is needed, I'll be happy to try to answer any questions you might have about my situation.

    I don't think you will find a single magic bullet to solve all the issues.  The main point is that there will be no shortcut for major schema and index changes.  You will need at least 120% free space to create a clustered index and facilitate
    major schema changes.
    I suggest an incremental approach to address you biggest pain points.  You mention it takes 10-12 hours to load 300,000 rows, which suggests there may be queries involved in the process which require full scans of the 650 million row table.  Perhaps
    some indexes targeted at improving that process is a good first step.
    What SQL Server version and edition are you using?  You'll have more options with Enterprise (partitioning, row/page compression). 
    Regarding the data types, I would take a best guess at the proper types and run a query with TRY_CONVERT (assuming SQL 2012) to determine counts of rows that conform or not for each column.  Then create a new table (using SELECT INTO) that has strongly
    typed columns for those columns that are not problematic, plus the others that cannot easily be converted, and then drop the old table and rename the new one.  You can follow up later to address columns data corrections and/or transformations. 
    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

  • Dealing with DB table-entries in ABAP OO

    Hi everybody,
    in ABAP-Reports (normally) we have deal a lot with DB table entries.
    Is there a "state of the art" for doing this with ABAP OO?
    An easy example:
    Asuming I want to select table  entries into an
    internal table from BUT000.And than I want to write: the entries.
    How would this look like in ABAP OO?
    show the internal ZTable be my object?
    or should every BUT000-Table-record be my object?
    Regards Mario
    null
    Message was edited by:
            Mario Müller

    Hello Mario,
    A very good question. This is what is called as modeling.
    I shall give you an approach into this. There is no right and wrong way of doing it. Probably, only a more desriable or better way !!
    How you model it depends on what your object is.
    If you have an internal table of sales orders, still in real world the services or methods are on a single sales order. So the object here is a single sales order.
    => I would model the class to deal with one sales order. (this more or less answers your question)
    2. Just to take this a little further.
    What I would do is have 3 different layers of abstraction.
    A UI class, a business layer class and a DB class.
    UI class can only talk to business class, business can talk to DB class. And the DB class is a static class.
    The UI class is only responsbile to do the display job.
    The UI will display multiple sales orders for eg, so u have an internal table of instances to the business layer.
    The business layer itself does validation, processing for each sales order.
    The business layer can also have soem static methods (or class methods) to select multiple records from Database. This is static, as it is not acting on one sales order, but you are returning multiple. This method should simply call a method of the DB layer.
    The DB layer is meant only to read from DB and write to DB.
    Hope this helps. Remember to reward points, if it does.
    For more highlights into this, refer to some material on design approach or design pattern.
    Best Rgds,
    Prashanth.
    SAP.

  • Dealing with dropped frames and out of sync audio

    Hi!
    I'm using Final Cut Studio 3 and I'm trying to record some video from a pretty old MiniDV-camera. The problem is that a have some dropped frames and when I record the whole thing it gets out of sync.
    By default Final Cut aborts the capture (without saving) when it finds dropped frames. That won't work for me. I start recording, it records a couple of minutes and then it just aborts without saving anything.
    I tried to record the entire tape when using the option of not aborting on dropped frames. I recorded the entire video but not it gets more and more out of sync later and later in the video.
    So, do you have any suggestions on how to deal with this? Maybe I can use an external application for this cause I haven't found a way to deal with this in Final cut.
    Best
    Felix

    Hi(Bonjour)!
    Did you shoot in DV or HDV ?
    Did you try to capture HDV with Apple Intermediate Codec 1080i60 (or 50 for europe)?
    Does you downconvert HDV shooted to DV upon capturing from camcorder ?
    DV-NTSC 48 kHz is the way to go with downconverted material.
    Does your DV audio setting is 16 bit on FX1 ? (HDV is a fixed one).
    Michel Boissonneault

  • How to deal with variable length data struct in C/JNI

    I have another JNI related question. How do you handle variable length
    data structures in Java and pointer to a pointer?
    Basically, I have a backend in C which has records but we don't know
    how many. The API looks like
    typedef struct rec_list_s {
    int rec_list_cnt;
    rec_list_data_t rec_list_data[1];
    } rec_list_t;
    int rec_list_show(void handle, rec_list_t *list_ptr);
    /* Code snippet for rec_list_show */
    int rec_list_show(void handle, rec_list_t *list_ptr)
    rec_list_t *ptr;
    sz = sizeof (rec_list_t) +
    ((record_count - 1) * sizeof (rec_list_data_t));
    ptr = malloc(sz);
    /* fill the data */
    *list_ptr = ptr;
    return (0);
    So I need to wrap rec_list_show() in JNI call so I can have Java call
    it. How do i pass a pointer to a pointer from Java? I tried in the
    native C code for JNI to return the pointer to pointer as a result
    and store in a member in the Java class rec_list_t and then I pass
    that to JNI call for rec_list_show. The C backend code was fine
    since it got the pointer to pointer but Java become unhappy when
    the object it was referencing changed memory location (I suspect
    the garbage collection becomes unhappy).
    So what would be a good way to deal with this kind of code?
    Thanks,
    Sunay
    Edited by: st9 on Aug 30, 2010 5:47 PM

    I did not imply that you don't know C but you are implying that I don't understand C. Perhaps
    google Sunay Tripathi and click I am feeling lucky so that we don't get into teaching C
    discussions :) On the other hand, I am definitely looking for someone to teach me Java
    otherwise I wouldn't be asking.
    Anyway, let me explain again. The sample function rec_list_show() runs on the backend. It
    is a different process with a different VM space. It of course knows the size of the array
    and what to fill in. As a caller to that API (which is a separate process), I don't know
    what that size is but I need to get the size and corresponding data in one shot because
    the backend locks the table when its providing me the info to make sure its synchronous.
    Now I (the Java process) needs to get that count and data in one shot. Since the C library
    underneath me (wrapped around my JNI interface) has private IPC mechanism to copy
    the contiguous memory from the backend into my memory space, all I need is to provide
    a pointer to a pointer which gets filled in by backend and is available to my process. So
    my equivalent C frontend just passes a pointer to a pointer and casts the return value in
    rec_list_t. The rec_list_cnt tells it how many members it got. The first member is part of
    the struct itself but then following members are right after.
    Another way to help you understand this is with this code snippet from front end C program
    rec_list_t     *ptr, *save_ptr;
    rec_list_data_t *data_ptr;
    int          cnt;
    save_ptr = ptr = malloc(sizeof(rec_list_t));
    rec_list_show(handle, &ptr);
    assert(save_ptr != ptr);
    cnt = ptr->rec_list_cnt;
    for (i = 0; i < cnt; i++) {
         data_ptr = &ptr->rec_list_data;
    Notice the assert(). Also notice the for loop. How do I expect to walk more that one
    member when rec_list_data is a fixed size array of one member?typedef struct rec_list_s {
         int               rec_list_cnt;
         rec_list_data_t          rec_list_data[1];
    } rec_list_t;
    Anyway, I do understand that Java will not allow me to get a reference to a long and
    how Java memory management works. But the JNI native implementation is C
    and I was wondering if people have managed to do some tricks there between C
    and Java.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to deal with this problem?

    How to deal with this problem?
    We plan to use Oracle Coherence (In Memory Data Grid) for a large-scale application. In order to keep the database table data in Coherence caches, we will create all the corresplonding Java objects (entities) and construct the persistence system using JPA/EclipseLink+JDBC. In this way, any in-memory object update will be persisted to the corresponding database tables.
    The problem is that some existing application codes are updating these database tables directly now. If the direct-database-table update is not permmited in the persistence environment, we have to discard most of the existing application scripts.
    I want to know, in this situation, should I discard most of the existing scripts?
    Are there any other solutions?

    Allowing writes from both cache & DB is possible with its own set of issues.
    The main issue to consider is conflicts from updates on same record via both cache and DB. If your caches are write-through the conflict decreases - but then cache writes become slower. If your caches are write-behind potentially the older cache update will overwrite the latest DB update. Now you are back to Database 101 -- timestamps, versions, etc...
    If you use a DB trigger to initiate the resync request you might want to distinguish whether the update has come from the cache-store (in which case, you may choose to do nothing), or if the update was from the 'existing apps', etc...
    If you choose to inject the resync logic at the application code level - you have the usual sourcecode issues - can you modify the code, is all the DB code localized, what options do you have to link with Coherence functionality (DLL, external proc, webservice, etc), etc... Naturally though, if you have to make substantial changes to signal a resync....you might consider taking the extra step and change the code to write to the cache.

Maybe you are looking for

  • Minimize the Html standard editor by default in Textarea

    Hi, I'm using Apex 3.0.1 for my application. I've used text area in the UI with the Html standard editor. I see that the page loads slowly coz the editor takes time to load with all the icons and stuff. Is there a way by which I can show the editor t

  • I cannot view webpage in an iframe

    Hello, I have some embed code that was placed in an iframe and I cannot view that on Firefox 3.6.22 however many people I know can see it and they are using Firefox. I have tried starting the computer in safe mode and disabling all the Firefox add-on

  • Burning to folder & DVD

    My first time to post a note. For several years I have selected to burn DVD to a folder.  From there I burn it to a DVD.  I have reinstall premiere 12 now several times.  I select to burn to a folder and it seems to go through all the stages.  Howeve

  • I can't open iPhoto. Get a message "iPhoto is being updated."  Can't open.

    When I try to open iPhoto, I get a message "iPhoto is being updated.  iPhoto cannot be opened while being updated."  How do I get into the program to view my photos?

  • WMS - SAP Business One

    Estimados:      Una consulta queria saber cual son los proveedores de WMS con experiencia y con casos de exitos, en Perú Tenemos un proyecto grande un necesito saber cuales son los proveedores con experiencia. Gracias