About multi process application.

We are using BDB for one application.
A.process: read-write data;
B.process: read-only;
A & B will share database;
For this kind of case,
1.how to set the env flag for A & B?
2.how to set contaienr flag for A & B?
3.how to set transaction flag for A & B?
Thanks.

As I had a similar problem with a multithreaded application recently I'll try to answer your questions.
1.how to set the env flag for A & B?DB_INIT_MPOOL | DB_INIT_LOCK (| DB_THREAD)
From what I understand you need to use DB_THREAD only if a process is multithreaded. If A & B are singlethreaded I think you don't need to use DB_THREAD.
2.how to set contaienr flag for A & B?(DB_THREAD)
Same as above (if you want to set DB_THREAD here you must have set DB_THREAD for the environment, too).
3.how to set transaction flag for A & B?That I don't know as I don't use transactions.
HTH,
Boris

Similar Messages

  • About multi process access BDB question

    I am designing one system using BDB.I have some questions about multi process access BDB.
    1.If there are two process, they are shared BDB cache or every one has self BDB cache? (My understanding is every process has cache by itself.)
    2.If one process write BDB and at the same time one process read BDB,how to make read processs can read data which write by write process just now?

    1.If there are two process, they are shared BDB cache
    or every one has self BDB cache? (My understanding
    is every process has cache by itself.)You can configure it either way. The cache is maintained as part of the so-called environment. The usual thing is to configure a shared cache. You need to read about environments in the BDB and BDB/XML documentation.
    http://www.oracle.com/technology/documentation/berkeley-db/xml/index.html
    2.If one process write BDB and at the same time one
    process read BDB,how to make read processs can read
    data which write by write process just now?Use transactions, set up deadlock handling, and think about what transaction isolation guarantees you need. Note that there are four different fundamental setups for BDB: DS, CDS, TDS and HA, which stand for Data Store, Concurrent DS, Transactional DS and High Availability. For read-write concurrency, you need TDS.
    http://www.oracle.com/technology/documentation/berkeley-db/xml/ref/intro/products.html
    For high concurrency at the expense of memory, consider using multi-version concurrency control (MVCC). You can read about it in the following thread, especially in George Feinberg's replies:
    Deadlock handling for beginners
    In addition, there is ample documentation included in the BDB/XML distribution. It's pretty complex, as BDB can be configured in many different ways.
    Michael Ludwig

  • Open VI Reference Function won't execute in multi process application

    I have a sub vi with Reentrant execution, and it has
    recursive call on some cases.
    It is very similar to OpenG VI “Read Key
    (Variant)__ogtk.vi”, my sub vi works without any problem unit LabVIEW’s Two
    Button Dialog is opened in other process loop.
    I have attached a Test VI, and would like to understand why
    would Loop 1’s Dialog box have any execution impact on Loop 2’s process?
    Why Open VI Reference Function won’t execute when Two Button
    Dialog is opened in other process?
    LabVIEW version 8.6
    Thanks,
    Attachments:
    Test Vi.zip ‏17 KB

    Broken Arrow wrote:
    LabVIEW's native dialog box is Modal. It will not let anything else run which requires (or MAY require) user input. In the case of your code, LabVIEW can't open a VI with a modal process going.
    Broken Arrow thanks for your reply, but not sure if I understand Modal dialog box would cause the problem.
      I already had a work around by using Three Button Dialog VI, and it is s Modal VI.
      I would still like to understand, why would DataFlow halt at Open VI Reference Function in Loop 2 when I use when Two Button Dialog?
    Attachments:
    Test Vi 2.zip ‏20 KB

  • Single Process Applications?

    I can't find anything on multi-process applications deployed by Java Web Start. Is just about everyone running apps with just the main process, perhaps multi-threaded? What if you had a main form with buttons for different applications? Back on the development side, you would have a separate project for each app, create the jar file for each, and add them as resources to your jnlp file.
    However, the Sun documentation says nothing about using jar files like this, it's always about accessing
    .jpg or .gif files, properties, and the like. When there are more than 1 jar files, it's always an extension installer.
    Why can't the main jar file access a second, third, or more jar files and then launch a separate process for each, not a separate thread, using the "java -jar file.jar" command?? I can't be the only person trying to do this with a Web Start deployed application, am I not seeing something basic that will allow me to do this?
    I need to point out that I am talking about Web Start installed jar files only, not by manually copying a jar file and then having the main Web Start installed jar launch a separate process to execute the manually copied jar file - I have tried that and it worked, but that's stupid because I had to manually copy over the jar file to the client's machine - why not just manually copy everything, which is why I want Web Start to do that like a normal install app should.

    why don't you runn the secondary applications also as Java Web Start application.
    Instead of doing "Runtime.exec("java -jar ...");"
    just do "Runtime.exec("javaws <url to second app's jnlp file>);"
    /Dietz

  • DOC BUG 4.2: About On Demand Application Processes

    There is an error in Oracle Application Express Application Builder User's Guide Release 4.2 §8.8.1 "About On Demand Application Processes":
    An On Demand process is special type of application process which has a Process Point of On Demand and executes when called from a page-level On Demand process or from an AJAX call from the browser. On Demand processes are useful when you have PL/SQL logic that you would like to run from different execution points across multiple pages.
    On Demand processes should typically be created on a page and not at the application-level. On Demand processes created at the application-level are created with an initial authorization scheme of Must Not Be Public User. This prohibits the processes being invoked from users in authenticated sessions.
    As it is perfectly possible (and indeed desirable) for On Demand application processes to be invoked [only] by authenticated users, this should presumably read:
    An On Demand process is special type of application process which has a Process Point of On Demand and executes when called from a page-level On Demand process or from an AJAX call from the browser. On Demand processes are useful when you have PL/SQL logic that you would like to run from different execution points across multiple pages.
    On Demand processes should typically be created on a page and not at the application-level. On Demand processes created at the application-level are created with an initial authorization scheme of Must Not Be Public User. This prohibits the processes being invoked from users in unauthenticated sessions.
    Furthermore, the second paragraph is a new addition to the documentation for APEX 4.2. What is the reasoning for not creating On Demand processes at application level? I have used them for a number of years as a means to provide reusable, application-wide components (for example, file downloads and AJAX content) only to authenticated APEX sessions.

    Hi,
    thanks again. I added a note to the 5.0 docs.
    It is certainly fine to still create application-level On Demand processes. However, if a process is related to a single page only, it is immediately clear that the process is part of this page's interface. This is good from a maintenance point of view, because if you only use app-level processes, it can be harder to determine whether the process is still in use and where it is called from.
    Regards,
    Christian

  • Configuring the DbEnv for multi-process single-writer scenario

    I have (1) a multi-process server program (Apache/PHP) using the XML container read-only and (2) a couple of scripts (Perl, PHP, whatever), one of which may be performing update work on the data at any given moment. There is, however, no concurrent write access.
    Write access, if I've understood correctly, commands the use of transactions in a multi-process scenario. Specifically, I'd use:
    * DB_INIT_MPOOL, DB_INIT_LOCK, DB_INIT_LOG and DB_INIT_TXN when creating the environment, so that all subsystems that will eventually be needed are in place;
    * DB_INIT_MPOOL, DB_INIT_LOCK, DB_INIT_LOG and DB_INIT_TXN for writing;
    * DB_INIT_MPOOL for reading.
    Please correct me if these assumptions are somehow flawed or simply wrong.
    Do I need more flags?
    Now, in the Berkeley DB Reference Guide, I read about Berkeley DB Concurrent Data Store Applications and the DB_INIT_CDB flag. I wonder if (a) this information also pertains to BDB XML and (b) this fits my scenario - only one write process at any given time.
    If I can use DB_INIT_CDB, what will I gain with respect to the scenario laid out above, or any other possible scenario?
    Michael Ludwig

    Hi John,
    thanks for pointing out that the flags used to open the environment have to be consistent among all applications.
    As for CDB:
    CDB puts a single big lock around the database, and
    won't let any readers get access to anything while a
    writer is operating. Generally it is advisable to use
    transactions in preference to CDB, which will allow
    concurrent reads and writes. You should also consider
    using MVCC, to increase concurrency more.Thanks for this info on MVCC. I remember reading an interview with the Interbase (then Groton Database) developer Jim Starkey, who seems to have invented MVCC, in which he told how, one morning in the shower, it appeared to him that multi-version concurrency control was the solution to almost all problems. Well, database problems, maybe.
    I read about MVCC in your Transaction Guide.
    http://www.oracle.com/technology/documentation/berkeley-db/xml/gsg_xml_txn/cxx/isolation.html#snapshot_isolation
    "What [MVCC] means is that every time
    a writer would take a read lock on a page,
    instead a copy of the page is made and
    the writer operates on that page copy.
    This frees other writers from blocking
    due to a read lock held on the page."
    I think an application featuring high concurrency of read and write operation will benefit from MVCC, provided there is enough memory to accomomate all the page copies. And I will eventually need this.
    At the moment, however, the update is done using the typical nightly crontabbed batch job. Not much traffic expected during the update, and no updates while the site is busy. I doubt I have much to gain from MVCC in this primitive scenario. What do you think? Would I still benefit from MVCC, or would I only incur the copy overhead without benefitting from it for lack of read-write concurrency?
    Michael

  • Helps!:How to start multi process in a single java program?

    I wanna to test the querying performance of a Database
    connection poll,and here,not only multi threads,but also multi process I need to start in the same java program cause i have only one PC available.....
    Does that possible?

    In pure java this is not possible.
    A java program with all its thread run in a single
    jvm,
    which is just one process.However, you can have multiple instances of the jvm, I've done it w/ I needed to test some row locking in my database app. If you are in windows and want 3 copies of you program just make a bat file that looks likejavaw.exe -classpath "classesGoHere" MainClass
    javaw.exe -classpath "classesGoHere" MainClass
    javaw.exe -classpath "classesGoHere" MainClassThat will create 3 instances of the jvm and thus three instances of your application. I'm sure the same can be done on multiple platforms.
    Peter

  • After effects multi processing issue

    hi i installed after effects cc2014 on the following machine:
    dell precision t7500
    dual zeon six core with hyperhreading
    36 gb ram
    ssd disks
    nvidia gtx590 gfx card
    ruing 3 dell 22 inch monitors
    on first install multi processing was fine was able to render multiple frames on multiple cpus ect,  i ended up having some heat issues with gfx card so removed it, and installed a nvidia fx 3700 card, after that after effects takes loads longer to load, and when i go to preferences multiprocessing it shows 0 cores used to render multi frames.
    i have set aside 2 cores for other apps, and each of them gets 1.5gb of ram, leaving:
    22 cores (with hyper threading) available to after effects and 33 gb of ram .
    i have tried many different configs but it will not use multi cpu. i switched off hyper threading, so there would be 12 actual cores set aside 2 for other apps and gave them 1.5 gb ram each to use so i should have had: 10 cores and 33gbs of ram left for after effects. i expected to be able to use 8 or 9 cores for multi cpu utilization, with at least a couple of gb for each. but still no multiprocessing available.
    do you think i will have to re install after effects? hope i dont as i have loads of plugins installed so dont realy want all the hassle, i had same problem in the past when i upgraded to the gtx590 card but i was doing a new windows install on new drives so was not much more of a hassle once new install was done multi processing worked ok again.
    any idea from othe who had same issues?
    thanks
    alun

    You shouldn't have to reinstall aftereffects, just delete your preferences and start from scratch. Multi processing is a very sensitive beast. Some footage, many codecs, and some of the effects do not play well with multi processing. If your projects contain any of these incompatible elements then multiprocessing will not work effectively.
    Without knowing anything at all about your compensation or the footage used or the codec you are rendering to it is impossible for us to give you suggested settings.

  • Multi-entity application

    Hi there,
    I'm developing a multi-entity application and I'm not sure how to optimize the data base. Let say big tables for each entity will have 15000 rows per year and we are expecting at least 150 entities, so we are talking about 2250000 rows per year. It´s a web application and we want an optimized response, there are complicated queries with a lot of JOINS so we did some test and it´s a bit slow.
    well, we thought in two options:
    1.- a column in each table to indicate the entity: tables with 2250000 rows each year.
    2.- each entity connects with a different oracle user wich contains its own tables (big ones): 15000 rows per year but 150 users.
    I asked about this, someone told me that 150 users wouldn't be efficent becouse oracle would spend too many memory to manage it (I dont know).
    Any answer will be welcome
    Thanks!
    PD: sorry about my english, I´m spanish ;-)

    So, wouldn´t you suggestuse a different user for each entity?
    Imagine you have 10 tables, 5 of them have around 15000 rows per year and there will be 150 entities like that. we thoght of using a different user for each one just for the eavy tables, and keep the rest of tables in a common schema. So the entity A access with the user A (all the schemas have synonims to the common schema).
    Ah, It´s a web app.

  • Multi-Thread application and common data

    I try to make a multi-Thread application. All the Threads will update some common data.
    How could I access the variable �VALUE� with the Thread in the following code:
    public class Demo {
    private static long VALUE;
    public Demo(long SvId) {
    VALUE = 0;
    public static class makeThread extends Thread {
    public void run() {
    VALUE++;
    public static long getVALUE() {
    return VALUE;
    The goal is to get the �VALUE� updated by the Thread with �getVALUE()�
    Thanks for your reply
    Benoit

    That code is so wrong in so many ways......
    I know you're just experimenting here, learning what can and can't be done with Threads, but bad habits start early, and get harder to kick as time goes on. I am going to give a little explanation here about what's wrong, and what's right.. If you're going to do anything serious though, please, read some books, and don't pick up bad habits.
    Alright, The "answer" code. You don't use Thread.sleep() to wait for Threads to finish. That's just silly, use the join() method. It blocks until the threads execution is done. So if you have a whole bunch of threads in an array, and you want to start them up, and then do something once they finish. Do this.
    for(int k=0; k<threads.length; k++) {
      threads[k].start();
    for(int k=0; k<threads.length; k++) {
      threads[k].join();
    System.out.println("All Threads Done");Now that's the simple problem. No tears there.
    On to the java memory model. Here where the eye water starts flowing. The program you have written is not guarenteed to do what you expect it to do, that is, increment VALUE some amount of time and then print it out. The program is not "Thread Safe".
    Problem 1) - Atomic Operations and Synchronization
    Incrementing a 'long' is not an atomic operation via the JVM spec, icrementing an int is, so if you change the type of VALUE to an int you don't have to worry about corruption here. If a long is required, or any method with more then one operation that must complete without another thread entering. Then you must learn how to use the synchronized keyword.
    Problem 2) - Visiblity
    To get at this problem you have to understand low level computing terms. The variable VALUE will NOT be written out to main memory every time you increment it. It will be stored in the CPUs cache. If you have more then one CPU, and different CPUs get those threads you are starting up, one CPU won't know what the other is doing. You get memory overwrites, and nothing you expect. If you solve problem 1 by using a synchronized block, you also solve problem 2, because updating a variable under a lock will cause full visiblity of the change. However, there is another keyword in java.. "volatile".. A field modified with this keyword will always have it's changes visible.
    This is a very short explaination, barely scratching the surface. I won't even go into performance issues here. If you want to know more. Here's the resources.
    Doug Lea's book
    http://java.sun.com/docs/books/cp/
    Doug Lea's Site
    http://g.cs.oswego.edu
    -Spinoza

  • Multi user application control data access

    Dear all,
    i am using Oracle Developer Suite 10g and database 10g, windows xp plate form.
    i want to develop multi user application regarding education.
    i have two questions.
    1. i take a start from creating an HR database which have 30 tables.
    this database has 10 users.
    the users will log on from their own schema.
    how they will access the HR schema?
    should i create a public synonym for each table in the HR Schema?
    or should i create a view for each table in each user schema?
    or should i grant select,insert,update etc to each user on HR schema?
    2. i want to control the data access for each user.
    i.e. every student could access his own academic record. each teacher access his own related record, the manager the owner and so on.
    how to accompolish this task? oracle roles are not sufficient for this purpose.
    Your help is highly appriciated.

    How about you start with the basic stuff, like the 2 days developers guide:
    http://www.oracle.com/pls/db112/to_toc?pathname=appdev.112/e10766/toc.htm
    and make it to the advanced developers guide:
    http://docs.oracle.com/cd/E11882_01/appdev.112/e25518/toc.htm
    and work your way through the concepts manual:
    http://www.oracle.com/pls/db112/to_toc?pathname=server.112/e25789/toc.htm
    and everything else which sounds interesting to you in here:
    http://www.oracle.com/pls/db112/portal.portal_db?selected=5&frame=
    As for your first question this should be covered here:
    http://docs.oracle.com/cd/E11882_01/network.112/e16543/authorization.htm#BABHFJFJ
    i want to control the data access for each user.This is also documented:
    http://docs.oracle.com/cd/E11882_01/network.112/e16543/vpd.htm#CIHBAJGI
    cheers

  • SAP NetWeaver: SAP's Model-Driven Business Process Application?

    Hi All:
    I am a graduate student currently doing a research on 'Model-Driven Business Process Application'. I came across some literature about SAP NetWeaver during my research. SAP NetWeaver has generated a lot of interest in me and I would like to know more detailed information about it:
    How is SAP adopting BPM principles to manage Work-flows? Can we consider any of the current NetWeaver applications as model-driven?
    It would be great to know the answers to some of these questions. I would sincerely appreciate if anyone of you could please help me with this. Also, thank you very much for your time and efforts. I would be happy to assign reward points to any informative responses.
    Regards,
    Alok

    Refer to this link
    http://help.sap.com/saphelp_nw70/helpdata/EN/6e/fb9442047b0831e10000000a1550b0/frameset.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5045b3cc-acbe-2910-2bab-8d930cb31a33
    Regards, IA

  • Multi-threaded application crashing the VM

    Hi,
    I have a multi-threaded (about 120 threads) application which crashes without after running for a while.
    I get this in the windows event viewer
    Faulting application java.exe, version 0.0.0.0, faulting module kernel32.dll, version 5.2.3790.0, fault address 0x000017b1.
    Anyone knows why this would happen?
    - vineet

    Hi Alexis,
    Thanks for the response to my post!!
    Which version of the JVM?C:\>java -version
    java version "1.4.2_05"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04)
    Java HotSpot(TM) Client VM (build 1.4.2_05-b04, mixed mode)
    Are you using the -server option?I was not using this option earlier but even on using this the jvm crashes after running for sometime.
    I am using these jvm options now -
    java -server -Xss128K -Xms256M -Xmx512M
    - vineet

  • Clarification of the handle/body idiom in multi threaded applications

    Hello
    As some DBXML classes use the handle-body idiom (handle/body idiom in some docs), could someone please clarify the consequences of that in a multi threaded application like a web container?
    For 100% Java people, like me, this is known in the Java world as 'programming towards interfaces', or as the Bridge pattern; which is seen as good practice.
    Let's take an example. The class XmlQueryContext is not thread safe, but it has a copy constructor. Imagine that your web application has one XmlQueryContext, that we never use in a query, but that we prepare only to be copied in new threads. Is it thus safe to instantiate various new XmlQueryContexts using that copy constructor in various new threads and use them simultaneously?
    Thank you
    Koen
    PS What I am really asking here is if somebody could please translate the following to Java parlé:
    A copy constructor is provided for this class. The class is implemented using a handle-body idiom. When a handle is copied both handles maintain a reference to the same body.

    As a Java user you do not have to worry about how the C++ copy constructors behave. In the Java API if a copy constructor exists for the object, then the copy constructor will copy all of the original object's data into a new object (XmlContainer is the one exception to this rule, generally one should not use that copy constructor at all). So in short, what you plan to do will work.
    Lauren Foutz

  • SQL pricing for Migrating an existing multi-tenant application

    We have a client with an ~10 year old multi-tenant application running on a traditional dedicated hosting environment.  The client is interested in migrating to Azure but only if they can benefit from PAAS features (managed backups, snapshots, scaling,
    etc).
    Their application automatically creates a new SQL database with each new customer signup.  As such, there are 886 databases which would need to be moved.  The total size on disk of all DBs together is only 3.82 GB.  Only 3 DBs are more than
    100 MB.  862 of the DBs are less than 10MB each (794 of those are less than 5MB).
    The way I read Azure pricing, each of these 883 DBs less than 100 GB would cost $5/month.  The only other alternative is to get a VM with SQL server on it -- but I can't see the advantage of that vs. the dedicated host they are already using.
    Is there any other alternative to consider when contemplating an application made up of many small databases?
    Thanks in advance for any advice,
    Jason

    Hi,
    If you have existing applications or workloads you simply want to grab and move to the cloud, SQL Server in a Virtual Machine is the easiest path to realize the benefits of the cloud. If you are looking to innovate and build new relational applications running
    in the cloud or extend parts of on-premises applications into the cloud, SQL Database is the best long-term solution.
    In your scenario, if use azure SQL, you must pay for each database per month, refer to
    http://azure.microsoft.com/en-us/pricing/details/sql-database/for more information about SQL Azure, cost too much.
    About use SQL VM, I suggest you read the following article.
     #http://blogs.msdn.com/b/windowsazure/archive/2013/06/04/the-top-10-things-to-know-when-running-sql-server-workloads-on-windows-azure-virtual-machines.aspx?Redirected=true
    Best Regards
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • Camera uses too much power error.

    I have the iPad connection kit but get error camera uses too much power. How do I resolve this?

  • WebDynpro java and Oracle Connection

    Hi, I'm trying to make a simple connection to an Oracle database within a custom webdynpro component. Using NWDS 7.0.08 and EP 7.0 SP 10. Here is a sample of the java code I use : Connection conn = null; Class.forName("oracle.jdbc.driver.OracleDriver

  • Smarter "REPLACE"

    I need help on "Replace" function to make it work smarter. I need to clean all tags from the database records because the page should not be formatted. Using a series of "Replace" function as shown below is not comprehensive and not pretty. Is there

  • Can`t publish my website

    Why can't publish my website made on Muse an hosted on BC, ocurrs an Unknown Authentication ID error. Help me please.

  • Rent Amount

    Hi Gurus,   am updating the infotype 0581 through T-code pa30. When am updating the Rent amount it is showing the warning messages "No Automatic Updation for IT0008. Caluclation method not found" and "Eligibility amount for HRA/CLA/COA is zero  for e