Database pooling question

Currently at work we have one shared Pool of 100 Connections. If we need to switch schemas we "alter session". Would there be any benefit if each web application had its own Pool vs having a globally shared Pool?

What is you expectation?
You have a server that runs in an applicationserver with a JVM that runs BPEL. Then the BPEL process will retrieve via TopLink your data (I/O & Network), It will be manipulated by BPEL (CPU). Then send back via TopLink your data (I/O & Network).
Yes you have overhead. It all depends on how the servers (app & db) are conencted to each other? Highspeed network ? The same Server? Processing the XML consumes CPU. The more CPU's and clockspeed the more and faster the processes are run.

Similar Messages

  • Monitor database connections in a database pool

    Hi,
    Do you know how I can monitor database connections in a database pool.. ? I am using Jboss container.
    The purpose is to monitor connections that are closed and refresh them.
    Thanks,

    There a firewall.. across which my application makes connections to the database.. the firewall times out due to the inactivity. and my application dies.
    I was thinking may be I could check for the database connections in a pool and then one that is not being used for a long time .. close it and again refresh the connection.
    Please Advise...

  • Pool question

    Hi good afternoon, I'm new using captivate 5 and I have a question of how to use the pool question, I have a question pool already created and used to create a test with ramdom question now my question is, how could I take the questions from this pool, selected them and put them in a new test ? can be this?  I want use a few not all them ......!... Excuse the mess with the word question, but my English is a bit bad I hopeyou understand... gracias!!!

    Just open your current project that contains the question pool and it's questions, then open the new project in another tab in Captivate 5.
    Then you can just copy and paste question slides from one project to the other.

  • Database Pooling

    How can I create a Database Pooling ??
    Thanks,
    Juliano

    I assume, you mean connection pooling.
    one sample could be de.must.dataobj.ConnectionPool among others from http://www.must.de/Jacompe.htm
    Christoph

  • Database Pool Status

    What is being reported in the Performance Monitor when Database Pool Status says:
    Connections in use: 0
    Total Connections: -6
    Avg Connections: -1
    Thanks

    I have the same problem, only difference is I'm using OC4J. The BC4J can't access recompiled PL/SQL program, unless I redeploy.
    Anyone can help?

  • IPlanet6.0 Database pool

    Hi
    Is there any provision for Database pooling in iPlanet6.0?. Now I am creating my own
    classes for pooling. If there is any provision for using its own pool, that will be much helpful. Pls anybody
    give details how to set it.I am using Oracle81.

    I don't really use iPlanet, but I think you can let the container manage the connection pooling by setting up a jndi datasource, just like you can in Tomcat.
    I found this info for iPlanet Application Server 6.5. (maybe it's the same for 6)
    http://docs.sun.com/source/816-5786-10/jpgjdbc.htm#13470

  • Questions about database pooling....

    Hi everyone, I'm not new to java programming but I am looking to polish up my skills. I have read sooo many articles and am still confused so please be patient with me. Java has a way of adding new acronyms everytime I turn around - its very hard to keep up with...
    I am using Netbeans 5 with Tomcat 5.5.9 bundled.
    I am connecting to a postgresql database (version 8.1).
    I would like to implement some type of jdbc connection pooling. Everything I have read, even on the tomcat website is confusing and seems to be a "best effort" type of situation - none gauranteeing correctness or reliability or replicability between what others may experience and what I might.
    I looked into a pure java solution such as DbConnectionBroker but I get confused as to how this "pooling" is effected by servlet lifecycles. I have read and read and still do not understand the necessary concepts.
    If I have a login servlet that makes a single query to the database, how long does that instance of the servlet stay loaded into memory? If it is dropped out of memory right away it seems there is no benefit of using the connectionBroker? (since each time someone visits the login servlet it would have to recreate the login servlet and broker object??)
    Is the broker object kept in memory somewhere with connections open after the servlet stops executing? How can other servlets access that same broker object without creating a new one of their own??
    I guess it comes down to really not understanding the persistence of how things are loaded and kept in memory. If this is a question for the Tomcat people I do apologize :/ It just seems these forums are by far and away the best place for any type of java help :)

    A servlet has nothing to do with it.
    A servlet uses a pooled instance. It is the pooled instance, not the servlet which is cached. At least in terms of discussing db connection pools.
    A cache means that it remains in memory. If the cache isn't kept in memory then keeping a cache is pointless.
    I guess it comes down to really not understanding
    the persistence of how things are loaded and kept in memory.More of a basic java question than anything else.
    The GC will collect reference which are no longer active sometime after they become not active. Thus a local reference can be collected after the method exits. But a static will not be collected until the class is (not instances of the class, but the class itself.) That won't happen until the class loader that loaded the class is collected.

  • Database connection question...

    i am using Java 1.5.0_06 and to connect to MySQL database i use Connector/J and the following code:
    try {
    Class.forName("com.mysql.jdbc.Driver");
    } catch(java.lang.ClassNotFoundException e) {
    System.err.print("Main: ClassNotFoundException: ");
    System.err.println(e.getMessage());
    return;
    try {
    con = DriverManager.getConnection(dburl);
    ps = con.prepareStatement(
    I was told i should be using a DataSource to do connection pooling and i have read over the info and downloaded jdbc2_0-stdext.jar and i am using MySQL and windows XP pro.
    the code looks like this
    Context ctx = new InitialContext();
    DataSource ds = (DataSource)ctx.lookup("jdbc/InventoryDB");
    Connection con = ds.getConnection("myUserName", "myPassword");
    then i just use con as i have already in my code.
    Can someone please point me in the right direction to get this working.
    I read this:
    A systems administrator or someone working in that capacity deploys a DataSource object. Deployment, which involves setting the DataSource object's properties and then registering it with a JNDI naming service, is generally done with a tool. As part of the registration process, the systems administrator will associate the DataSource object with a logical name. This name can be almost anything, usually being a name that describes the data source and that is easy to remember. In the example that follows, the logical name for the data source is InventoryDB . By convention, logical names for DataSource objects are in the subcontext jdbc , so the full logical name in this example is jdbc/InventoryDB .
    i have goggled but can't seem to find out exactly what i need to do next.
    I can't find the "tool" and have to be honest i am lost lol.
    can the The JDBC 2.0 Optional Package work with Java 1.5.0_06?

    i am using Java 1.5.0_06 and to connect to MySQL database i use Connector/J and the following code: i updated it to use manual connection pooling like so:
    final String dburl = "jdbc:mysql://localhost/......";
    Connection con = null;
    try {
    Class.forName("com.mysql.jdbc.Driver");
    } catch(java.lang.ClassNotFoundException e) {
    System.err.print("Main: ClassNotFoundException: ");
    System.err.println(e.getMessage());
    return;
    try {
    DataSource dataSource = setupDataSource(dburl);
    con = dataSource.getConnection();
    con.close();
    public static DataSource setupDataSource(String connectURI) {
    ObjectPool connectionPool = new GenericObjectPool(null);
    ConnectionFactory connectionFactory = new DriverManagerConnectionFactory(connectURI,null);
    PoolableConnectionFactory poolableConnectionFactory = new PoolableConnectionFactory(connectionFactory,connectionPool,null,null,false,true);
    PoolingDataSource dataSource = new PoolingDataSource(connectionPool);
    return dataSource;
    so i compiled and ran it and it worked no problem but my question is that this is a server that does some db work upon starting and then waits for clients like so:
    while (listening)
         new PSMultiServerThread(serverSocket.accept()).start();
    so once i am in PSMultiServerThread what exactly do i need to do?
    i know i don't need to do this again:
    Class.forName("com.mysql.jdbc.Driver");
    but do i need to do this again:
    DataSource dataSource = setupDataSource(dburl);
    i geuss i have to to declare the variable lol.
    and do i include this code in the PSMultiServerThread
    public static DataSource setupDataSource(String connectURI) {
    ObjectPool connectionPool = new GenericObjectPool(null);
    ConnectionFactory connectionFactory = new DriverManagerConnectionFactory(connectURI,null);
    PoolableConnectionFactory poolableConnectionFactory = new PoolableConnectionFactory(connectionFactory,connectionPool,null,null,false,true);
    PoolingDataSource dataSource = new PoolingDataSource(connectionPool);
    return dataSource;
    --------------------------------------------------------------------------------------

  • Front controller/database - architecture question

    Hello! Thanks for checking out my question! I am pretty new to web services/servlets and jdbc.
    I am implementing an application that essentially is an index of reports. I have an index page where a user can click on one of 6 available reports, go to an input page to customize the information being sent into the different queries and then the results of that query will be displayed on the next page. I have two controller servlets.. one for the input pages and another for the output of the queries. I am just curious as to if there should be anything I need to be cautious about when I am coding this. We expect to have no more than 500 users (that is a very high estimate) on the page at a particular time.
    My real question is how do I divide the database calls into the program? Should I have a bean for each jsp result page that handles the queries or should I the queries being handled in the controller request? The result of the query is a cachedResultSet and we already have connection pooling set up so the actual database request will only last a short time. I'm just not sure on the best practice as far as these kinds of things go. Do I need to serialize any requests? Should I consider that when I'm writing the servlets/beans/jsps? Thanks in advance for any kind of answers. Have a great day!

    Hello,
    I worked on something similar to this, here's what I did in a nutshell:
    One controller servlet takes requests which describes a query. It delegates the request a specific request handling servlet/session ejb pair. Every servlet/ejb pair then handles the request and dispatches the appropriate response.
    There was a lot a similar functionality in the way responses were handled by the ejbs and this could all be encapsulated in a base handler ejb that was subclassed.
    This worked well for my problem but I have also used struts to accomplish similar tasks, although I still think struts is a bit too heavy weight for most of my work.
    I think you can use a similar pattern with oridanry beans an JDBC to accomplish your task.
    We expect to have no more than 500 users (that is a very high >estimate) on the page at a particular time.I suspect most platforms will accomadate your users but what platform are you deploying your application on?
    Do I need to serialize any requests?I don't think so, but why do you ask, will your application be distributed over multiple servers?

  • Easy JNDI + Connection Pool Question

    This is an easy question:
    Once I get the object represented by my connection pool from the
    Weblogic JNDI tree, how do I get a connection from the returned object
    of type weblogic.common.internal.ResourceAllocator?
    I keep getting ClassCastExceptions. I have tried
    ConnectionPoolDataSource, Connection, and DataSource.
    String conPool = "weblogic.jdbc.connectionPool.demoPool";
    try {
    Object obj = ctx.lookup(conPool);
    msg(DEBUG,"FROM LOOKUP" + obj.getClass().getName());
    //DataSource ds = (DataSource)ctx.lookup(conPool);
    //con = ds.getConnection();
    } catch (NameNotFoundException e) {
    // binding does not exist
    msg(ERROR,"BINDING DOES NOT EXIST",e);
    } catch (NamingException e) {
    // a failure occurred
    msg(ERROR,"NAMING FAILURE OCCURED",e);
    } catch (Exception e) {
    msg(ERROR,"SOME RANDOM ERROR",e);
    Thanks,
    -Jacob

    "Jacob Meushaw" wrote in message
    Once I get the object represented by my connection pool from the
    Weblogic JNDI tree, how do I get a connection from the returned object
    of type weblogic.common.internal.ResourceAllocator?
    I keep getting ClassCastExceptions.
    DataSource ds = (DataSource)ctx.lookup(conPool);I think, you must use narrow operation:
    Object reference = ctx.lookup(conPool);
    DataSource ds =
    (DataSource) PortableRemoteObject.narrow (ds,DataSource.class);
    I haven't got time to check it, but I hope that works.
    Wojtek

  • ACS 5.3 Database backup questions

                 I do an incermental backup every day at 02:00
    IncrementalBackup-Job
    Mon Sep 17 02:00:00 EST 2012
    Mon Sep 17 02:00:02 EST 2012
    Completed
    But  I get the  
    System Alarm [Database Purging]
    Mon Sep 17 04:00:00
    Incremental Backup not configured
    why?
    see contents of repository below so it is there
    CHIACS71/chacs01# sh repository DataBase
    acsviewdbfull_CHIACS71_20120912_095516.tar.gpg
    acsviewdbfull_CHIACS71_20120913_020000.tar.gpg
    acsviewdbincr_1_CHIACS71_20120914_020000.tar.gpg
    acsviewdbincr_2_CHIACS71_20120915_020000.tar.gpg
    acsviewdbincr_3_CHIACS71_20120916_020000.tar.gpg
    acsviewdbincr_4_CHIACS71_20120917_020000.tar.gpg
    catalog.xml
    repolock.cfg
    CHIACS71/chacs01#
    second question can I use my secondary ACS for the DataBase repository?

    Hi,
    You should use an nfs server, sftp or ftp repository for backups only, something that is dedicated for storage. I would not recommending using anything that is used for production which needs internal storage to take on the task of managing another applications data.
    As far as the the first question, i am not talking about the purging, i am talking about the scheduled application backups:
    http://www.cisco.com/en/US/docs/net_mgmt/cisco_secure_access_control_system/5.3/user/guide/admin_operations.html#wp1076238
    Tarik Admani
    *Please rate helpful posts*

  • Multiple Database Servers Question

    Hi,
    Please forgive this ignorant question, but can someone tell
    me how one would go about using multiple database servers?
    Just as there comes a time where one would need more than
    one web server and would need to use a load balancing
    solution, what happens when one would need more than one
    Database Server?
    How does one go about implementing that solution?
    Is there some way to have two database servers carrying the
    same information with some kind of load balancing solution
    in front of it(?) or does one place some tables on one
    Database
    server, and other tables on the other database server?
    (I have no clue as to how things would work.)
    Thanks in advance,
    Joe

    Microsoft SQL allows for clustering of SQL databases, so for
    instance two servers connected to a fileshare and a virtual address
    shared across the two physical boxes. Database connections are made
    to the virtual addres which will then be handled by the active
    node. Becuase a database is ultimately a file(s) on a disk it can
    only be attached to one node at a time so you end up with an
    active/inactive cluster.

  • Database array questions

    Disclaimer: I am new to DB's.
    I'm looking at creating a MySQL database to hold tests done on DUTs (each with a specific serial). In theory, each DUT undergoes 3 tests. Each test produces a 401x9 2D array of DBLs. I am not concerned with the write speed to the DB, but I do want to optimize the read of the DB (potentially may need to retrieve 1000+ of these 2D arrays as fast as possible). I have the DB Toolkit; using LV 8.5. Questions:
    1. I have seen two different ways to save a 2D array in a DB mentioned: first, writing one row at a time with the DB Insert vi, resulting in a 2D array in a table (which is slow writing) or second, changing the 2D array to a variant and using the DB Insert vi, resulting in a single cell in a table. I know I can use other methods (parameterized vi, sql commands, user defined functions on the DB server, please do comment if you have found drastic performance increase with these methods), but of the two ways of storing a 2D array, can I read a 2D array from a table faster than reading a 2D array from a single cell? Whenever I need this data, I will read it all (i.e. I will never have to search for certain data within these individual 2D arrays)
    2. I may have installed the 8.2.1 DB toolkit, because the Database Variant to Data vi/function does not drop onto the Block Diagram when I drag it from the palette, and the Help has ???. I assume this is because it just points to the normal Variant to Data, which in 8.5 is in a subpalette as compared to 8.2.1. Any quick way to fix this?
    3. Any other general suggestions for a DB newbie? I've been trying to derive best practices from KB aritcles, this forum, and the web, but there is so much information and so many varying opinions I find it hard to narrow down best practices.
    Michael

    Hi Miguel,
    It looks like you are embarking on a very interesting project. Although you probably have seen many of the following documents, I've linked a few to get you started.
    Discussion forum using LabVIEW to read from tables
    Developer Zone article about developing a test system
    Knowledgebase article about imitations of speed with database toolset
    As far as your first question, I would suggest trying out both methods with simple code and testing with a small amount of values to determine  which one will be the fastest.
    Good luck with your project!
    Amanda Howard
    Americas Services and Support Recruiting Manager
    National Instruments

  • Simple java/mysql database application question about triggers

    I am planning a new database application using java and mysql. I may want to use some triggers to automatically update the tables when a change is made. my question is this: If I write the trigger, and I use Java to modify the database, will java automatically pause and let the trigger finish doing its task before it continues? what if it writes more to the table before the trigger is finished modifying the table? how do I get java to pause and let the trigger finish?
    thanks for your response

    lduren wrote:
    I am planning a new database application using java and mysql. I may want to use some triggers to automatically update the tables when a change is made. my question is this: If I write the trigger, and I use Java to modify the database, will java automatically pause and let the trigger finish doing its task before it continues? what if it writes more to the table before the trigger is finished modifying the table? how do I get java to pause and let the trigger finish?
    It doesn't have anything to do with java at that point.
    When you execute, for example, an insert statement, then the database executes that statement. The database (not java, not the driver) decides with that statement is complete. Control returns to java when the database decides that execution is complete.
    And except for tricks that one might do (or attempt to do) via SQL or triggers then when the statement execution finishes then everthing has completed running.

  • Connection Pool Questions

    I have a JSP/Servlet application I am developing. I would like to create one OraclePooledConnection for the application. I then have a set of repository classes(CommonRepository, EmployeeRepository, etc) that access the database and create JavaBeans for the JSP's to use. I would like each of these repository classes to access the single OraclePooledConnection.
    Currently I have a DataSourceWrapper class that extends the OraclePooledConnection class. This DataSourceWrapper class is a singleton class, so I am assured of only one class and in the Init() function I call super(url, user, pwd). (Source is below.) It seems to work, but I am not positive in is creating a Connection Pool. How could I test this? If it is not how would I do this?
    TIA,
    Gerald
    public class DataSourceWrapper extends OraclePooledConnection
    * field containing the driver used to connect to the database
    private static String driver = null;
    * field containing the url address of the database
    private static String url = null;
    * field containing the user name used to connect to the database
    private static String user = null;
    * field containing the password used to connect to the database
    private static String pw = null;
    * handle to the current Repository instance
    private static DataSourceWrapper instance;
    * handle used to get a database connection
    private PooledConnection ds = null;
    * Private Class Constructor.
    * <P>
    * Only one instance of this class is ever wanted, which means this class is a
    * singleton class. To accomplish this, the Class Constructor scope is private
    * to this class only. A static function <code>getInstance()</code> is used to
    * create the initial instance of this class and passes the handle all other
    * classes that need to access it.
    public DataSourceWrapper() throws SQLException{
    //Initialize the DataSource
    super(url,user,pw);
    * Returns a handle to this singleton Repository object.
    * <P>
    * If first time the method has been called it creates a Repository object by
    * calling the Class Constructor. If this is not the first call to the method
    * it returns the stored reference to this object
    * @return static reference to this singleton Repository
    * @throws RepositoryException thrown if error occurs during initialization
    protected static DataSourceWrapper getInstance() throws SQLException {
    if (instance == null)
    instance = new DataSourceWrapper();
    return instance;
    public void finalize() {
    try {
    ds.close();
    } catch (Exception e) {} //Application is closing who cares
    * Sets the the database connection information
    * @param newDriver driver used to connect to database
    * @param newUrl url address used to connect to database
    * @param newUser user id used to connect to database
    * @param newPassword password used to connect to database
    public static void setConnectInfo(
    String newDriver,
    String newUrl,
    String newUser,
    String newPassword) {
    driver = newDriver;
    url = newUrl;
    user = newUser;
    pw = newPassword;
    }

    I have a JSP/Servlet application I am developing. I would like to create one OraclePooledConnection for the application. I then have a set of repository classes(CommonRepository, EmployeeRepository, etc) that access the database and create JavaBeans for the JSP's to use. I would like each of these repository classes to access the single OraclePooledConnection.
    Currently I have a DataSourceWrapper class that extends the OraclePooledConnection class. This DataSourceWrapper class is a singleton class, so I am assured of only one class and in the Init() function I call super(url, user, pwd). (Source is below.) It seems to work, but I am not positive in is creating a Connection Pool. How could I test this? If it is not how would I do this?
    TIA,
    Gerald
    public class DataSourceWrapper extends OraclePooledConnection
    * field containing the driver used to connect to the database
    private static String driver = null;
    * field containing the url address of the database
    private static String url = null;
    * field containing the user name used to connect to the database
    private static String user = null;
    * field containing the password used to connect to the database
    private static String pw = null;
    * handle to the current Repository instance
    private static DataSourceWrapper instance;
    * handle used to get a database connection
    private PooledConnection ds = null;
    * Private Class Constructor.
    * <P>
    * Only one instance of this class is ever wanted, which means this class is a
    * singleton class. To accomplish this, the Class Constructor scope is private
    * to this class only. A static function <code>getInstance()</code> is used to
    * create the initial instance of this class and passes the handle all other
    * classes that need to access it.
    public DataSourceWrapper() throws SQLException{
    //Initialize the DataSource
    super(url,user,pw);
    * Returns a handle to this singleton Repository object.
    * <P>
    * If first time the method has been called it creates a Repository object by
    * calling the Class Constructor. If this is not the first call to the method
    * it returns the stored reference to this object
    * @return static reference to this singleton Repository
    * @throws RepositoryException thrown if error occurs during initialization
    protected static DataSourceWrapper getInstance() throws SQLException {
    if (instance == null)
    instance = new DataSourceWrapper();
    return instance;
    public void finalize() {
    try {
    ds.close();
    } catch (Exception e) {} //Application is closing who cares
    * Sets the the database connection information
    * @param newDriver driver used to connect to database
    * @param newUrl url address used to connect to database
    * @param newUser user id used to connect to database
    * @param newPassword password used to connect to database
    public static void setConnectInfo(
    String newDriver,
    String newUrl,
    String newUser,
    String newPassword) {
    driver = newDriver;
    url = newUrl;
    user = newUser;
    pw = newPassword;
    }

Maybe you are looking for

  • Users Opening to Their Dektop

    RDS 2012 publishing office to users desktop. Our users are not using thin clients. They have their own desktop PC with their own local profile. What is everyone else doing for when users file->open in an office app and the user is seeing their profil

  • Layer disappears in Safari, off center in Firefox, but perfect in Internet Explorer!

    I have a layer of a quicktime file on top of a jpeg image. In Safari 3.1, there is nothing but the jpeg. In Firefox 2.0.0.14, the quicktime box is off to the left and works, though off-center. In Internet Explorer 5.2 (Mac), the quicktime file works

  • Unable to go ahead with an approved change request.

    Hi experts,             Iam facing an issue in Solman Configuration in Charms Scenario.We have created 2 users: Requester & Change Manager.We are able to successfully create the  change request. It is also successfully approved by the change manager(

  • Type your question

    hey everyone..brand new to verizon and I would like to know how i can view the text messages on all my phones? I could only get into the main phone on my plan

  • Remove Characters from a Date

    What are some ways that I could remove the hyphens, semicolons, periods, and empty strings from a date (in a single expression)? If I have a date (returned from GETDATE()) as follows: 2014-09-15 16:53:09.253 I want to remove the non-numeric character