Need suggestions for concurrent reads while deleting all entities

Hello,
we need some suggestions for the following use case, as we cannot seem to find the correct transaction locking combination to meet our needs.
We are using BDB JE 4.1.10, and the entityStore is transactional. In a nutshell, BDB JE is used as a Cache for specific data that is pulled and updated regularly from a source Oracle DB. The application that holds BDB is a realtimel app, and response time is critical.
In order to avoid having to merge (Insert/update/delete) entities for some of the tables that are very static and small (a few hundred records that might change every day or so), we are trying to simply delete all records (with an EntityCursor loop, since there is no 'deleteAll' that we could find) and reinsert all data every 5 minutes, and then committing when the whole process is complete. This should always be very quick, but we are not immune to timeouts from the source Oracle DB, so the transaction can be long.
Ideally, while the delete/insert is happening, we want any concurrent read operations to return the old data (before the delete). We have made a test that locks the updater thread between the 'delete all' and 'update all' methods, so that the delete cursor is closed, but the Tx is not yet commited. We have tried the following for our reader thread:
1- If we get() a deleted entity with a LockMode.READ_UNCOMMITTED, we get a null entity back.
2- If we get() a deleted entity with LockMode.READ_COMMITTED, we get a LockTimeoutException.
We have also considered simply using truncate on the EntityStore, but this requires closing and reopening the DB, so this would not work for our need to always return a value, instantly.
Any ideas, suggestions on how we could do this in a simple manner?
Thanks,
Max

Hello Max,
I understand the issue you're describing.
I think the best performing solution by far is to load the new data into new databases while servicing reads from the old databases. When the load is complete, reads can be diverted to the new databases, and the old databases can then be removed.
Unfortunately, this is easier to do with the base API than with the DPL, because the DPL is managing the underlying (base API level) databases for you.
However, even using the DPL, this approach could be very straightforward if you happen to be keeping this data set (the one that needs to be reloaded) in a separate EntityStore, or you can change your application to do so. If so, you can create a new (empty) EntityStore with a different name and use this store for loading the new data. When the load is complete, divert reads to the new EntityStore object and remove all databases for the old EntityStore.
If this is impractical, please explain, and I'll try to suggest a different solution. If you cannot use a separate EntityStore for this particular data set, then the solution may be more complex.
--mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • When I try to print sth I can´t choose my printer. Adobe Reader only shows a printer I used years ago.I aleady deleted and reinstalled the Reader and deleted all other printers from the computer.How can I add a new printer to Adobe Reader?Thanks for help!

    When I try to print sth I can´t choose my printer. Adobe Reader only shows a printer I used years ago.I aleady deleted and reinstalled the Reader and deleted all other printers from the computer.How can I add a new printer to Adobe Reader?Thanks for help!

    Hi,
    I would suggest you to uninstall Adobe Reader using the cleaner tool and then re-install the latest version.
    Adobe Cleaner Tool:- Download Adobe Reader and Acrobat Cleaner Tool - Adobe Labs.
    Latest version of Adobe Reader:- http://get.adobe.com/reader/
    If you still experience the same issue, please share the following information:-
    - Screenshot of Adobe Reader showing printer options
    - Screenshot of Microsoft Word showing printer options
    - Screenshot of control panel- Control Panel\All Control Panel Items\Devices and Printers
    Regards,
    Nakul 

  • Need Suggestion for Archival of a Table Data

    Hi guys,
    I want to archive one of my large table. the structure of table is as below.
    Daily there will be around 40000 rows inserted into the table.
    Need suggestion for the same. will the partitioning help and on what basis?
    CREATE TABLE IM_JMS_MESSAGES_CLOB_IN
    LOAN_NUMBER VARCHAR2(10 BYTE),
    LOAN_XML CLOB,
    LOAN_UPDATE_DT TIMESTAMP(6),
    JMS_TIMESTAMP TIMESTAMP(6),
    INSERT_DT TIMESTAMP(6)
    TABLESPACE DATA
    PCTUSED 0
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 1M
    NEXT 1M
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    LOGGING
    LOB (LOAN_XML) STORE AS
    ( TABLESPACE DATA
    ENABLE STORAGE IN ROW
    CHUNK 8192
    PCTVERSION 10
    NOCACHE
    STORAGE (
    INITIAL 1M
    NEXT 1M
    MINEXTENTS 1
    MAXEXTENTS 2147483645
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    NOCACHE
    NOPARALLEL;
    do the needful.
    regards,
    Sandeep

    There will not be any updates /deletes on the table.
    I have created a partitioned table with same struture and i am inserting the records from my original table to this partitioned table where i will maintain data for 6 months.
    After loading the data from original table to archived table i will truncating the original table.
    If my original table is partitioned then what about the restoring of the data??? how will restore the data of last month???

  • If my phone says it needs to be restored will it delete all of the stuff i have on it? Such as music i have on an app? The music has not been synced to itunes. Will all my pictures get deleted aswell?

    if my phone says it needs to be restored will it delete all of the stuff i have on it? Such as music i have on an app? The music has not been synced to itunes. Will all my pictures get deleted aswell? My phone is not working for some reason, when i was downloading ios6.1 it crashed or something. PLEASE HELP!!

    Purchased iTunes content can be re-downloaded:
    http://support.apple.com/kb/HT2519
    Any photos in your camera roll, not previously imported to your computer, you will lose. You should be regularly importing these photos, as the iPhone's camera roll is not designed as a storage device.
    Had you been regularly syncing/backing up, you wouldn't lose anything. Now you know, don't backup your data, and you will eventually lose it all, guaranteed.

  • I have been trying for an hour to delete all of the photos from my iphone5.  Can't do it, except for 1 at a time.  I can't even connect it to my PC and delete them from my computer.  Why isn't this easy and intuitive?

    I have been trying for an hour to delete all of the photos from my iPhone 5.  I have googled it several times and there doesn't seem to be a solution.  Have tried deleting them from my PC. One at a time deleting is impractical - I have 1000 photos!  Why isn't this easy and intuitive?

    When you hooked up to your PC did they attempt to import? Had you imported them previously and not deleted when the import was complete?
    If you have to delete them directly on your device, you need to press the select button and just keep selecting until you have all of them selected, then put them in the trash.
    You do not need to select one then trash it, then select another then trash it. You can select as many as you like before clicking on the trash icon.
    Cheers,
    GB

  • Need suggestion for designing a BEx report

    Hi,
    I need suggestions for designing a BEx report.
    Iu2019ve a DSO with below structure:
    1. Functional Location u2013 Key
    2. Maintenance Plan u2013 Key
    3. Maintenance Item u2013 Key
    4. Call # - Key
    5. Cycle u2013 Data Field
    6. Planned Date u2013 Data Field
    7. Completion Date u2013 Data Field
    This DSO contains data like:
    Functional -
    Plan --- Item -
    Call# --- Cycle -
    Planned Dt -
    Completion Dt
    Location
    11177 -
         134 -
         20 -
         1 -
    T1 -
         02-Jan-2011 -
         10-Jan-2011
    11177 -
         134 -
         20 -
         2 -
    T2 -
         15-Feb-2011 -
    11177 -
         134 -
         20 -
         3 -
    T1 -
         15-Mar-2011 -
    11177 -
         134 -
         20 -
         4 -
    M1 -
         30-Mar-2011 -
    25000 -
         170 -
         145 -
         1 -
    T1 -
         19-Jan-2011 -
         19-Jan-2011
    25000 -
         134 -
         145 -
         2 -
    T2 -
         20-Feb-2011 -
         25-Feb-2011
    25000 -
         134 -
         145 -
         3 -
    T1 -
         14-Mar-2011 -
    Now Iu2019ve to create a report which will be executed at the end of every month and should display the list of Functional Locations whose Cycles were planned in that particular month, along with the last completed Cycle/Date.
    Thus based upon above data, if I execute report at the end of (say) March then report must display:
    Functional ---     Curr. Cycle --- Planned Date --- Prev. completed Cycle --- Prev Completed Date
    Location
    11177 -
         T1 -
         15-Mar-2011 -
    ---     T1 -
    --     10-Jan-2011
    11177 -
         M1 -
         30-Mar-2011 -
    ---     T1 -
    --     10-Jan-2011
    25000 -
         T1 -
         14-Mar-2011 -
    ---     T2 -
    --     25-Feb-2011
    Any idea how can I display Previous Completed Cycle and Completion Date (i.e. the last two columns)?
    Regards,
    Vikrant.

    hi vikrant,
    You can a Cube at the reporting layer  which gets data from DSO and which has these 2 extra characteristics completion date and previous cycle along with other chars and keyfigures from DSO.
    You can populate these  based on your logic in the field routine.
    Hope it helps.
    Regards
    Dev

  • Need suggestion for headphones (not buds) for noisy environment with IPad/IPod.

    Very difficult to get adequate sound level from IPad with present earphones(IPod seems louder?) do not do well wit earbuds. Would like recommendation for earphones for noisy areas, particularly airplanes. Cannot tolerate too much pressure, although realize must have some to shut out noise. Have heard of Sennheiser HD 280--any comments appreciated. Have not been able to watch movies, listen to lectures, etc with present sets. Is it expected that IPod is able to deliver louder sound than IPad?

    Along with all the other useful suggestions,  focus on noise reducing.  The Bose are great, but there are a number of less expensive alternates around.  A side benefit of the noise reducing approach is that they all have a built in amp that will increase the volume from what the pad puts out by itself, while cancelling, so some extent, the unwanted noise.
    The issue is finding a quality set, if you do not want to pay the Bose or senheiser price.
    For me there are two issues, quality, and comfort.  I just don't like to wear the big things over my ears, and they are just not convenient for me for airplane travel.
    I have gone through 4 or 5 off brand sets, and have found a ( oddly enough) coby set that works well.  They are buds, but comfortable, and the active noise reducer works well. They have more than one model, and the cheap white ones did not do the job for me.  The slightly more expensive ( 25 ish) black set works good.
    So you either need to spend a fair amount, or experiment with the loaned devices to find one that works for you, but in any event, you need active notice cancelling.

  • Need suggestion for a database connection issue in an EJB Application

    Hi Friends,
    I am facing some serious problem in my EJB application. Some times, my application is waiting for unknown reason while it connects to database as executing a stored procedure to get and assign a unique number to a transaction.
    This stored procedure is used to get a unique number from database and update the database with the new unique number which is incremented by previous number.
    During this waiting time, if any other transaction hits my application, then my application assigning same unique number to these 2 transactions.
    But It is not happening always. It is happening very less number of times. What should I take care of the code to not happen this? Can I implement any synchronization kind of thing here?
    If I implement synchronization kind of thing, If the first transaction gets the lock and waits for some time, then I think it will effect for subsequent transactions. Could You please suggest me on this issue?
    Thanks in Advance to All.

    Here is my datasources.xml :
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
    <beans>     
         <bean id="myDataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
              <property name="jndiName" value="jdbc/myDS"/>
              <property name="resourceRef" value="false"/>
         </bean>
    </beans>

  • Need suggestion for USB Bluetooth Adapter for HP Z230 Workstation

    I've just purchased an HP Z230 Workstation, with an I7 processor.  I need to equip it with Bluetooth capability so that I can connect the computer to an old Palm Tungsten T2. 
    There are gobs of USB 4.0 Bluetooth adapters / dongles on the market, but reading buyer's comments, they all seem to have some type of problem with compatibility or installation issues on something.
    Does anyone have a suggestion for a USB Bluetooth adapter that has worked well with the Z230?
    Thanks in advance for any help.
    Terry
    This question was solved.
    View Solution.

    I suggest joining the Enterprise Buisness forum and posting your query there.
    Your  HP Z230 Workstation is a business class HP product and not than a consumer class device. This is the HP Consumer support forum.
    ****Please click on Accept As Solution if a suggestion solves your problem. It helps others facing the same problem to find a solution easily****
    2015 Microsoft MVP - Windows Experience Consumer

  • Need suggestion for small USB/FW camera for chat

    I have an old (Tiger, PPC) laptop. My wife has an old (Panther, PPC) mini. I'm going on a trip and want to use Skype or iChat to be able to see the kids when we talk. Can someone suggest a camera USB/firewire camera which would be good for this purpose? I don't need too many fancy features but it would be nice if it weren't big and heavy (since I'll be traveling with mine). If it's on a flexible stick or mounts to the top of the monitor/laptop screen, that would be great. I see a bunch on Amazon but it's not clear which work with Panther/Tiger, which have Mac drivers, etc. Thank you!
    Mike

    Hi,
    Yes and no (Again)
    Any Camera is going to have to suit your Mac and it's input ports.
    iUSBCam Utility only works for iChat.
    It was originally designed to get the External iSight working on G3 computer less that 600Mghz.
    Very quickly they added in the USB 1.1 camera option (At a push you could get a USB 1.1 camera to work n a G3/450Mghz processor as well)
    It only works for iChat though. Or rather it is need for iChat as it manipulates the video from the camera into something iChat will accept.
    I am not that sure if the current version of Skype will work with an older Camera.
    If it does it will still need a Mac Driver for it if you only have USB 1.1 port on your computer.
    There are two main Third Party Drivers out there for this (If the camera Manufacturer does not supply a Mac Driver)
    Macam
    and IOXperts
    The IOXperts site does list a Firewire Driver for earlier OS versions (As it was not included originally) the OS has Firewire driver form about OS 10.2
    They also state on their Site some restriction and workaround are needed for certain apps.
    Summary.
    The same info about camera types and Drivers still applies in the broadest sense.
    You will not need the iSUBCam thing for Skype.
    However I have not used Skype in some while and don't know if they still support USB 1.1 cameras.
    NOTES
    In theory as Skype does not produce such good a Video Pic as iChat it uses less processor power to create the Video stream.
    However strangely this can have positive effects in lower Spec Machines as they can then produce a coherent Stream rather than something that breaks up due to their Processor not keeping up.
    You seem to mention that you have Laptop running Tiger and the specs suggest this is a G4
    What is the Mac Mini's processor.
    Panther itself is not the limiting factor.
    It is Input ports and availability of cameras to suit that.
    Any G4 processor is going to let you have one to one chats - subject to the Internet Access at each end (Hotels can be a nightmare).
    For the points
    9:22 PM Monday; September 6, 2010
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"

  • Need suggestion for choosing Java development enviroment

    Hi Evereyone,
    I am new to Java Desktop Application.I need help on choosing proper Java technologies and development tool.
    We have an existing CLIENT/SERVER based distributed control system, which was developed in C++(Server side) and VB(Client GUI).Now we are think of migrating the system to Java platform.
    Here is the outline:
    We want to create web based application that will run on windows and linux (linux on embedded PC).
    The application should be able to support 10 � 100 users at once accessing/editing database.
    We will also need to create a communication server that will run on web server P.C. that will communicate tcpip to field panels/log to db, as well as allow web screens to send/receive commands with field panels etc.
    Could any one give me some suggestion about it?
    I am thinking of Using J2SE 5.0, including RMI, JDBC and Swing for GUI. As for field panels, may choose J2ME.
    Thank you very much in advance.

    Thanks, zadok .
    Actually, I don't have the system requirements neither. All I know is the following outline:
    "We want to create web based application that will run on windows and linux (linux on embedded PC).
    The application should be able to support 10 � 100 users at once accessing/editing database.
    We will also need to create a communication server that will run on web server P.C. that will communicate tcpip to field panels/log to db, as well as allow web screens to send/receive commands with field panels etc."
    It is a interview question, which need me to do research and give some suggestions. What I want to know is to figure out what kind of Java technology is necessary for developing this system because I want to make sure I head to right direction.
    I know somehow it is hard to give suggestion based on this limited information.
    One more thing I was confusing is the server-side architecture.
    I need suggestion about sever side architecture:
    a. write a dedicated server-side program, which act
    as communication server to monitor and control field
    panel, also act as server-side applicaiton by using
    RMI to communicate with Client-side communication.
    b. choose a general web server architecture. Put
    everything in server side in Web Server, for example
    Tomcat AS container, implementing the Communication
    server as Web Service and the request from
    Client-side go to Web Server first, then dispatch to
    a proper web service.Why did you not include this information in the original question!
    Why don't you just use Tomcat?
    For your answer, "Why don't you just use Tomcat?", does it mean Tomcat without Web Service will be enough for this system development? Could you give me some detail about it?
    Thank you very much, zadok.

  • Need suggestions for install Solaris10 on IBM R52

    Hi all,
    I am trying to install Solaris 10 on my IBM R52 laptop, most of the hardwares looks working, except sound card and wireless network card(ethernet card working).
    I am just a newer to Solaris, so it would be really appreciated if you could give me some suggestion about it, or where can I find those kind information.
    Thank u in advanced.
    Cheers,
    Teng

    I concur with the others on going straight to Leopard. Then resolve any issues before installing non-Apple applications (or older Apple ones, for that matter).
    However, make sure ANY applications are Leopard-compatible before you install them.
    And note that the iLife '08 installer is for a 30-day trial installation (fully functional for those 30 days) after which it needs to be purchased.

  • Need suggestions for what order to install software on new computer

    I have had an iMac (with Panther) for 3 1/2 years but have never made any major changes to it and plan to leave it as it is. We got a second computer yesterday, one of the last of the white iMacs, via an Apple reseller. It came with Tiger 10.4.6 installed with a Leopard 10.5 drop-in disc and an iLife 08 disk. I set up the new Mac so I have a web connection, but have not yet transferred any data from my back-up external hard-drive, nor have I attempted to install Leopard or iLife 08. I'm looking for recommendations for what order I should do these tasks. Or does it matter?
    That is, should I play around with Tiger for awhile (I've never used Tiger before), move all my data and confirm all is OK before adding Leopard?
    Or should I get Leopard on the computer right as the next step?
    Should iLife 08 be installed before or after Leopard? or is either order OK?
    Any suggestions that would be helpful to me?

    I concur with the others on going straight to Leopard. Then resolve any issues before installing non-Apple applications (or older Apple ones, for that matter).
    However, make sure ANY applications are Leopard-compatible before you install them.
    And note that the iLife '08 installer is for a 30-day trial installation (fully functional for those 30 days) after which it needs to be purchased.

  • Need suggestion for searching words in a document

    Is there any option to search the words in a document, where I want to make a user designed words or phrases saved itself in a PDF docment. For e.g I need to search the data with words like Salary, Compensation, Remuneration, etc in an annual report (PDF Version). For which I need to type these words hundreds of times everyday. So if I have a option to upload these words in the adobe reader itself it will save most of my time. please help me with ur opinions and suggestions.

    Nothing in Reader itself. A macro program might help.

  • I need suggestions for an online trading application

    Hi,
    I am going to develop an online trading application. I have decided to use JAVA EE 5 and I have read "The Java(tm) EE 5 Tutorial". Because I am a (C++) programmer and new to Java, I need suggestions to start development.
    Here is summary of the system in my mind. There will be
    a database to store user's information and operations,
    a web client for creating and managing user accounts,
    a desktop application and web client for users for online trading and
    an application client for brokers for risk management.
    Here is a sample scenario for flow,
    - User wants to create an account
    - Company creates an account for user
    - user gets the prices and trades via application client (web or desktop)
    - system informs dealers and broker via their client platform
    - broker perform necessary operations.
    Java EE 5 Application model fits the system I am trying to develop but I feel I still need some guidance and there are a few things I couldn't figured out yet. For these reasons I want to develop a prove of concept system and this is the system in my mind.
    - A simple database
    user (user_id, user_login, user_password, user_name)
    stock (stok_id, stok_name)
    operation (op_id, user_id, stok_id, op_type, op_amount, op_value)
    - A price server
    will generate random prices and push new values to registered clients
    - A web client to create new users (for admin)
    - A web client to display operations of users (for user)
    - A desktop application and web client for operation entries (for users)
    displays prices coming from price servers, sends users trade requests
    - A desktop application client for informing admin about trades (for admin)
    when a user buys or sells something, this client notified (user buy/sell something)
    What do you offer for this sample system?
    Which is the best IDE?
    Which Application Server should I use (scalability and speed is critical)?
    Which Java EE APIs should I use?
    JSP or JSF?
    Will I need hibernate?
    And so on.. I need some points to start and go.
    Thanks for any help.
    Ahmet

    It wouldn't be an arbitrary track. However, maybe you could make an arbitrary track by dividing the track into segments. Each segment is either a straight line or an arc. These are easy to model the cars' behavior on, because you'll have a straightforward way to determine the direction the car should be facing, and the range to the left and right where the car can stray and still be on the track.

Maybe you are looking for

  • OLE Objects are not displayed properly-overlap characters and empty page

    I'm using CR4E 12 Runtime libraries to load and view reports that are created in CR designer  v10. Some of the OLE Objects (not all) are not displayed properly. 1) A full page contains terms and conditions as ole object is not at all displayed and ju

  • BUG for sort column with Oracle 11g and APEX 3.2

    I have BUG in Report region(Oracle 11g and APEX 3.2). if i have more than 746 Char for my column's value and i want to sort them, this error appear Report error : ORA-00910: specified length too long for its datatype. But in an other environement in

  • Copy the structures in a query

    hi,   Can we copy the structure of one query to another query ?    If so, please let me know how to do it. Thanks in advance.

  • IProcurement World wide usage?

    I am looking for some implementation information and perhaps some best practice sharing on a roll out of iProcurement under one Oracle instance (ERP, but enabled via catalog and non-catalog purchasing on a world wide (US, AP and EU) basis. We are in

  • Can't start smc ...

    # /etc/init.d/init.wbem start # /etc/init.d/init.wbem status Solaris Management Console server not running on port 898. # ps -ef| /usr/xpg4/bin/grep -e smcboot root 1370 1 0 07:25:01 ? 0:00 /usr/sadm/lib/smc/bin/smcboot root 1372 1370 0 07:25:01 ? 0: