[Mondrian] Olap4jXmlaServlet changes

Michele Rossi michele.rossi at gmail.com
Mon Aug 22 06:07:31 EDT 2011


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);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20110822/38802fcc/attachment-0001.html 


More information about the Mondrian mailing list