How does Kodo manage DB connection pools?

Hi,
As per the documentation, JDO options MinPool and MaxPool are no longer
part of the specification. I expect this means the JDO implementation is
supposed to manage database connection pools appropriately. Now, I would
like to understand Kodo's approach to this, and whether I have any control
on pool configuration at all via the deprecated MinPool and MaxPool
properties -or are these properties simply ignored.
On a related topic, I am confused about the effects of closing
PersistenceMangers after every use, from a performance point of view (if
the connection pool is not managed by Kodo, am I incurring additional
overhead by not re-using a PersistenceManager?). I have read in different
places in the documentation that it is good to re-use PersistenceManagers
as well as the fact that although PersistenceManagers are
garbage-collected and connection resources freed as a result, it is
recommended to call close() on them anyway. Bottom line, are there any
side-effects to religiously asking the PersistenceManagerFactory (I have
several, one each for the different data sources I use) for a new
PersistenceManager at the beginning of each method and calling close() in
a finally{} clause?
I'm sorry if this has been answered elsewhere - I'd appreciate it if you'd
just point me to the discussion if so.
Thanks.
-Krishna Choppella
Digital Harbor, Inc.

would like to understand Kodo's approach to this, and whether I have any
control on pool configuration at all via the deprecated MinPool and
MaxPool properties -or are these properties simply ignored.Currently, Kodo uses the MinPool and MaxPool properties to configure the
JDBC connection pool. Starting with version 3.0, Kodo will use separate
pooling properties.
Bottom
line, are there any side-effects to religiously asking the
PersistenceManagerFactory (I have several, one each for the different
data sources I use) for a new PersistenceManager at the beginning of
each method and calling close() in a finally{} clause?Well, you miss out on the simple object caching employed by PMs. Each PM
keeps a cache of the objects it manages. Reusing a PM allows it to build
up a bigger cache, and makes calls to getObjectById and 1-1 relation
traversals faster.
Additionally, each cached object maintains state in its persistent fields
(subject to the RetainValues setting and other settings), so retrieving
object state can be faster when the object is already cached and has
already been read.
However, if you employ Kodo's L2 caching plugin (Performance Pack), then
you get all these benefits regardless of whether or not you re-use
individual PMs.

Similar Messages

  • How Transaction Manager work with Resource Manager, like Connection pool?

    hi,
    I'm using BEA Webloigc8.1 Stateless Session Bean/DAO/Oracle stored proc.
    but I'm not quite clear how Transaction Manager work with Resource Manager, like Connection pool.
    my understanding is that, in a weblogic transaction, a stateless session bean interact with several DAOs, and for each method of DAO a connection is acquired from connection pool. I've heard that the connection will not return to pool until the transaction commits.
    My question is that, does it mean that for a weblogic transaction, multiple connections might be allocated to it? and if multiple connections are allocated, then how many oracle transactions would be started? or multiple connections share the same oracle transaction?
    I didn't feel it make sense to start multiple oracle transactions, cause deadlock might be incurred in a single weblogic transaction.
    any help appreciated!

    Xin Zhuang wrote:
    hi,
    I'm using BEA Webloigc8.1 Stateless Session Bean/DAO/Oracle stored proc.
    but I'm not quite clear how Transaction Manager work with Resource Manager, like Connection pool.
    my understanding is that, in a weblogic transaction, a stateless session bean interact with several DAOs, and for each method of DAO a connection is acquired from connection pool. I've heard that the connection will not return to pool until the transaction commits.
    My question is that, does it mean that for a weblogic transaction, multiple connections might be allocated to it? and if multiple connections are allocated, then how many oracle transactions would be started? or multiple connections share the same oracle transaction?
    I didn't feel it make sense to start multiple oracle transactions, cause deadlock might be incurred in a single weblogic transaction.
    any help appreciated!Hi. If you configure your WLS DataSource to use keep a connection for
    the duration of a tx, it will do that, and in any case there can be
    no deadlock however many connections operate for a given XA transaction.
    Here is the best coding form for DAOs or any other user-written code
    for using WebLogic DataSources. This is important for two reasons:
    1 - Thread-safety is maintained as long as the connection is a
    method-level object.
    2 - It is crucial to notify WebLogic that you are done with a connection
    ASAP, by your calling close() on it. We will then put it back in the
    pool, or keep it under the covers for your next request if it's in a
    transaction etc. The pool is optimized for quick get-use-close scenarios.
    public void one_of_my_main_JDBC_Methods()
    Connection con=null; // Must be a method level object for thread-safety
    // It will be closed by the end of the method.
    try {
    con = myDataSource.getConnection(); // Get the connection in the try
    // block, directly from the WebLogic
    // datasource
    // do all the JDBC within this try block. You can pass the
    // connection to subordinate methods, but not to anywhere
    // that thinks it can use the connection later.
    rs.close(); // close any result set asap
    stmt.close(); // then close any statement asap
    // When you're done with JDBC
    con.close(); // close the connection asap
    con = null; // nullify it so the finally knows it's done
    catch (Exception e) {
    // do whatever catch stuff you want. You don't
    // need a catch block if you don't want one...
    finally {
    // It is important to close a JDBC connection ASAP when it's not needed.
    // without fail, and regardless of exit path. Do everything in your
    // finally block in it's own try-catch-ignore so everything is done.
    try { if (con != null) con.close();} catch (Exception ignore){}
    return ret;
    }

  • How does iCloud manage app data like whatsapp ? Does it overwrite the data everytime I backup to I cloud with the data on the phone or it merges the data from previous backups with the new data?

    How does iCloud manage app data( like whatsapp) ? Does it overwrite the data everytime I backup to I cloud with the data on the phone when i backup or it merges the data from previous backups with the new data?

    You need to subscribe to iTunes Match to store your music on iCloud:
    http://www.apple.com/itunes/itunes-match/
    To transfer iTunes Store purchases made on your phone to your computer, connect your phone then choose "Transfer purchases..." from the File menu in iTunes.
    Photostream transfers photos taken on your iOS devices to other devices and your computer. For troubleshooting Photostream see: http://support.apple.com/kb/TS3989

  • How does one manage these new render setting for previews?

    I placed 4 HD clips from a nested into a sequence 5800 x 768 to mimic 4 side by side monitors for a multi channel video.  Each clip cut from the sequence are at 1280x720 all sitting side by side. However when I rendered the previews, they came look all squished. However when I exported the frame it looks fine in Photoshop. (I changed the uploaded image to what it looks like in Premiere in Photoshop to demonstrate the appearance in Premiere.)
    I imagine that the distortion has to do with the sequence render setting which for some reason comes out to 1918 x 253...or the pixel aspect ratio? How does one manage these new render setting for previews so it looks normal in the monitor? 
      

    Either way, I thought that this format would be a great way to view on the monitor 4 channels at the same time. I may need to place them on a “normal” 1440 x 1080 sequence in a line, bringing them down to 25% scale to make it work in the end. I did just try that. I think it will work...but when I imported and nested the old file, the scratch disks changed from the original set up on a D drive back to the main hard drive so I had to change it agin. Otherwise it works fine...so I’ll go with this for now
    These are the instructions I was given.I attched a screen save of the AE file they asked me to use (They must be on vacation, because I have not been able to get hold of them). I don't know After Effects very well:
    “As you begin creating or adapting work for e4c, you may find an After Effects template developed for this system to be helpful. Attached you'll see a zipped file with two AE templates. There is some detailed information (below) from the artist that developed these for us. In addition, a few bits of information that might help you along are:
    ·        The "Watchout"  playback system can support WMV or a QuickTime files . We like .mov files with H.264 codec best!
    ·        The end resolution of the four screens is 5120 x 720 pixels (1280x720 each).
    ·        If works are four-channel, please provide a separate audio (aiff) file so it doesn't slow any one video down.”
    Thanks for your help!

  • How does a BlackBerry handheld connect to BES for the first time?

    How does a Blackberry device connect to BlackBerry Enterprise Server (BES) for the first time? Is there a risk that a rogue BlackBerry handheld connects to BES?
    Thank you in advance!

    Hi and Welcome to the Forums!
    When a BES admin sets up a BB on BES, they configure the unique BB PIN into their BES and also create credentials that are required to actually complete the registration process on the BB. So, while there is no perfect security anywhere, I don't think the risk you are concerned about is high enough to warrant any attention.
    Good luck!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • How does Media Manager handle Motion Projects within the Sequence being cop

    How does Media Manager handle Motion Projects within the Sequence being copied?
    I've highlighted my sequence, opened Media Manager, and copied it to another drive. When I open up the sequence in it's new project, the rendered Motion Project plays within my sequence but it won't let me go back into this Motion Project to make changes. I tried starting over. This time I highlighted the actual motion sequence and clip that is created within FCP after sending something to Motion and copied those to the new drive. When I went into the newly created 'media' folder and double clicked on the motion project it launched. It looked liked it was going to play but while my crops moves and borders were there, the filmed material is shown as a freeze frame for the duration of the motion project.
    I did this with and without 'including master clips within selection'. Any advice would be appreciated. Thanks.

    Is there anyone who knows the answer to this? Thanks.

  • How does PeopleSoft ( web application)  connect to DB ?

    Hi,
    How does PeopleSoft ( web application) connect to its Oracle database, does it use JDBC or OCI or else ?
    Thank you.

    The webserver is connecting to the application server through the Jolt port, and the application server is connecting to the database within a database client installation (runtime).
    Nicolas.

  • When setting up sync how does sync manage information from two computers? Does it merge the information?

    When setting up sync how does sync manage information from two computers? Does it merge the information?

    Hi!
    Yes, the way Sync works is that it puts all the Bookmarks together and pushes them to all your devices. Same with History.
    You will not loose any information in any of your computers.

  • How does the remote object connect to the correct host

    i have had a small doubt on how the remote reference manages to find the correct host to call the subsequent methods after a sucessful lookup.
    given a rebind or bind to the registry, the registry only stores the alias and the remote reference, now imagine a client calling a lookup on the registry would only get the remote reference, and not in which machine the remote object is found.
    what i wanted to know is how does the client or atleast the remote reference returned by the registry correctly connects to the machine where the remote object is located. i dont think its stored in the stub bcos the stub is a complie time stuff.
    i would be pleased to have a comprehensive answer for this.

    The membership in the group communication framework is always accurate and upto date.Up to date to the moment when you check. Not up to date to the moment when you make the RMI call.
    i could basically chk if this ip is available in the membership list.Complete waste of time. It doesn't matter what you check ahead of time, you are still trying to predict the future.
    And you still have to deal with ConnectException etc from the actual remote method call. And the way you will deal with that in your situation is exactly the same as what you were going to do if your ahead-of-time check failed.
    So just catch the exception(s) and deal with the problem there.

  • How to use a JCO connection pool in an EJB?

    Hi *,
    I want to build a WebService using SAP Web AS (J2EE Engine) that connects to a R/3 ERP (release 4.7).
    I thought of building a stateless session bean that will be deployed as webservice. The session bean shall connect to the R/3 in order to call some BAPIs. I'd like to use a JCO connection pool. But I'm not sure, where I should create and destroy the connection pool. Are the EJB methods ejbCreate() and ejbRemove() the right ones? If so, my businness methods would just have to get a connection from the pool and call the BAPIs, right? If not, what do you suggest?
    Another question: I already deployed a bean as webservice. Since not really knowing how to use the connection pool, I created a bean with one business method that creates a connection pool whenever it gets called. But if I have to change something in the bean so that I have to redeploy the bean I can't call my business method anymore, because JCO cannot load a native library once again, as it is already loaded, This leads to an exception. So I have to restart the complete engine everytime I redeploy my bean. Are there any workarounds for this problem? I'm not sure whether this is connected to the wrong use of the JCO connection pool.
    Kind regards,
    Lars

    Hi *,
    I want to build a WebService using SAP Web AS (J2EE Engine) that connects to a R/3 ERP (release 4.7).
    I thought of building a stateless session bean that will be deployed as webservice. The session bean shall connect to the R/3 in order to call some BAPIs. I'd like to use a JCO connection pool. But I'm not sure, where I should create and destroy the connection pool. Are the EJB methods ejbCreate() and ejbRemove() the right ones? If so, my businness methods would just have to get a connection from the pool and call the BAPIs, right? If not, what do you suggest?
    Another question: I already deployed a bean as webservice. Since not really knowing how to use the connection pool, I created a bean with one business method that creates a connection pool whenever it gets called. But if I have to change something in the bean so that I have to redeploy the bean I can't call my business method anymore, because JCO cannot load a native library once again, as it is already loaded, This leads to an exception. So I have to restart the complete engine everytime I redeploy my bean. Are there any workarounds for this problem? I'm not sure whether this is connected to the wrong use of the JCO connection pool.
    Kind regards,
    Lars

  • How to setup and use connection pool in Web AS 7.0?

    Hello SDN!
    I'm developing a Web Dynpro Java application on SAP Web AS 7.0 My app using a couple of DAO classes as model instead of EJBs. These classes perform direct requests to database using JDBC drivers.
    I've read that many of web-servers use their own connection pools. So I want to know:
    1) how I can setup connection pool in SAP Web AS ?
    2) how I can call this pool in my application?
    Could you please give me some examples?
    Regards, Lev.

    hi lev,
    check this document for jco pools
    http://www.winfobase.de/lehre/lv_materialien.nsf/intern01/FB09D79A41930E34C125709F0046180C/$FILE/Tips&Tricks_JCo_Programming.pdf
    ravindra

  • How does the ipod touch connect to the internet?

    I am looking at buying my kids the ipod touch 4th genreation but how does it connect to the internet or is it just itunes?

    Wirelessly - WiFi. iTunes provides the means to sync directly with the computer and to make backups that are stored on the computer along with the library of music, movies, apps, etc. With iOS 5 or 6 installed it can sync wirelessly as well.

  • How can I switch the connection pool dynamically during on load happens

    HI,
    I have two data bases which holds same data. i.e Prod_db, Prod_db1,
    I want to switch the connection pool dynamically during load happens
    Ex: During load happens i want to hit prod_db1, after load completes i want to hit prod_db. How to achieve this.

    create dynamic repository variable for DSN using init block so that value is changes based on your timings and use this in connection pool.
    If you use same user and passwords for both the databases that would be easy or else need to follow the same for uid and pwd.
    That should work, if not update.
    If helps pls mark correct/helpful

  • How can I implement the connection pool in my java stored procedure

    my java stored procedures (in database 'B') have to connect to another oracle database ,let's say 'A'. And how can I implement the behavior like the so-called connection pool in my java stored procedure in 'B', as below.
    1. database B, has 2 java stored procedures sp1 and sp2
    2. both sp1 and sp2 connects to databse 'A'
    whatever I call the sp1 and sp2 and the database 'A' always only one connected session from sp1 and sp2 in database 'B'.
    THANKS A LOTS...

    my problem is I have a lots of java stored procedures need to cnnect to the remote oracle db, and I hope the remote db can only have a connected session from my java stored procedures in my local db. I try as below
    class sp{
    static Connection conn=null; //the remote db connection,
    public static void sp1(){...}//procedure 1, using conn
    public static void sp2(){...}//procedure 2, using conn,too
    I can 'see' the 'conn' variable if I invoke the sp1() and sp2() from the same client application(maybe sqlplus). But if I invoke the sp1() from client 'A' and invoke sp2() from client 'B' then the sp1() and sp2() can not see the 'conn' variable for each other. I think it's because the two clients cause oracle to create two instances of the class 'sp' and the sp1() and sp2() located in different instance seperately. Thus the sp1() and sp2() can not see 'conn' for each other. They can only see its own 'conn'.
    To connect to the remote db from the java stored procedure is easy but is it possible to connect to the remote db via database link from the java stored procedure at my local db ? If so, then I also archive my goal .
    BTW , thanks a lots...
    andrew :-)

  • How to make an RPC connection pool?

    I have an RPC server that the application needs to make calls to. However,
    I'm thinking it would be better to have some type of connection pool to this
    RPC server since we have multiple clients making calls to it.
    Is this a good assumption? If not what is the best way so that the
    transactions to the RPC server are quick?
    How do I implement this? Is it a startup class? Are there any examples out
    there?
    Thanks,
    Gary

    I have an RPC server that the application needs to make calls to. However,
    I'm thinking it would be better to have some type of connection pool to this
    RPC server since we have multiple clients making calls to it.
    Is this a good assumption? If not what is the best way so that the
    transactions to the RPC server are quick?
    How do I implement this? Is it a startup class? Are there any examples out
    there?
    Thanks,
    Gary

Maybe you are looking for

  • Weird text in forwarding message

    Information added that is non relevent to the reciver of a forwarded message. For example. X-Account-Key: account1 X-UIDL: 41CAAF885C432D7C65DF69F3D9AE258A X-Mozilla-Status: 0001 X-Mozilla-Status2: 00000000 X-Mozilla-Keys: And alot more see image on

  • How to see rest of output of TOP command

    launch Terminal run the top command how to view the rest of its output ? yeah resizing the window helps. But it still wont show all. Best to you !

  • OSX 10.4.6 install problem on eMac

    Hi - I have just got a old eMac for my daughter from my work - It is a 1Ghz, 640Mb, 40Gb HD model.... It is currently running 10.4.7 - but I thought I would grab a 10.4.6 disc from work and do a fresh install - erasing the old stuff and starting the

  • Accessing Global Container

    Dear Experts, I have an RFC  to FILE Scenario and used BPM to meet the requirements. There are 2 graphical mappings - mapping1 before the BPM and mapping2 (transformation) within the BPM. I have saved a parameter in the global container in mapping1 b

  • Malicious user (troll) is sending out my Skype name on Omegle - Help needed

    Hello, people!  I am loving Skype, but I have an issue. Recently, a user with malicious intent entered one of the group conversations I'm in on Skype. This user then proceeded to copy all the usernames of this group's members.  This user has programm