Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: [Mondrian] Olap4jXmlaServlet changes

  1. #1
    Michele Rossi Guest

    Default [Mondrian] Olap4jXmlaServlet changes

    Hi Luc,

    I've noticed that you removed the custom eviction task from
    Olap4jXmlaServlet.java (see code snippet at the end of the email).

    Without the custom eviction task every connection pool instantiates its own
    evictor which uses a Timer - and a Thread.

    A new connection pool is created for each user and thus having a shared
    eviction timer would have been more efficient.

    May I ask why the shared eviction timer was removed?


    Julian: I am currently working on the xmla servlet again as the version
    currently in Perforce no longer works.
    I should have a patch ready soon.

    thanks,
    Michele



    // Create an eviction task that runs for all our BasicDataSource
    // instances; this saves threads compared to having an evictor
    // thread per pool.
    Timer connectionEvictionsTimer = new Timer();
    TimerTask evictionTask = new TimerTask() {
    public void run() {
    synchronized (datasourcesPool) {
    for (BasicDataSource bds : datasourcesPool.values())
    {
    try {
    bds.getConnectionPool().evict();
    } catch (Exception e) {
    LOGGER.error(
    "Exception [" + e
    + "] while running evict on [" + bds
    + "]");
    }
    }
    }
    }
    };
    // Run the eviction task every minute.
    //
    // REVIEW: Is the timer task ever shut down? It should be shut
    down
    // on Servlet.destroy()?
    connectionEvictionsTimer.schedule(evictionTask, 60000, 60 *
    1000);

    _______________________________________________
    Mondrian mailing list
    Mondrian (AT) pentaho (DOT) org
    http://lists.pentaho.org/mailman/listinfo/mondrian

  2. #2
    Luc Boudreau Guest

    Default Re: [Mondrian] Olap4jXmlaServlet changes

    Michele,

    You were using a deprecated API from Commons DBCP which is now removed. We
    upgraded Commons DBCP recently and I had to remove your custom eviction
    code.

    Luc

    On Mon, Aug 22, 2011 at 6:07 AM, Michele Rossi <michele.rossi (AT) gmail (DOT) com>wrote:

    > Hi Luc,
    >
    > I've noticed that you removed the custom eviction task from
    > Olap4jXmlaServlet.java (see code snippet at the end of the email).
    >
    > Without the custom eviction task every connection pool instantiates its own
    > evictor which uses a Timer - and a Thread.
    >
    > A new connection pool is created for each user and thus having a shared
    > eviction timer would have been more efficient.
    >
    > May I ask why the shared eviction timer was removed?
    >
    >
    > Julian: I am currently working on the xmla servlet again as the version
    > currently in Perforce no longer works.
    > I should have a patch ready soon.
    >
    > thanks,
    > Michele
    >
    >
    >
    > // Create an eviction task that runs for all our BasicDataSource
    > // instances; this saves threads compared to having an evictor
    > // thread per pool.
    > Timer connectionEvictionsTimer = new Timer();
    > TimerTask evictionTask = new TimerTask() {
    > public void run() {
    > synchronized (datasourcesPool) {
    > for (BasicDataSource bds :
    > datasourcesPool.values()) {
    > try {
    > bds.getConnectionPool().evict();
    > } catch (Exception e) {
    > LOGGER.error(
    > "Exception [" + e
    > + "] while running evict on [" + bds
    > + "]");
    > }
    > }
    > }
    > }
    > };
    > // Run the eviction task every minute.
    > //
    > // REVIEW: Is the timer task ever shut down? It should be shut
    > down
    > // on Servlet.destroy()?
    > connectionEvictionsTimer.schedule(evictionTask, 60000, 60 *
    > 1000);
    >
    > _______________________________________________
    > Mondrian mailing list
    > Mondrian (AT) pentaho (DOT) org
    > http://lists.pentaho.org/mailman/listinfo/mondrian
    >
    >


    _______________________________________________
    Mondrian mailing list
    Mondrian (AT) pentaho (DOT) org
    http://lists.pentaho.org/mailman/listinfo/mondrian

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.