[Mondrian] Olap4jXmlaServlet changes
Luc Boudreau
lucboudreau at gmail.com
Mon Aug 22 10:30:30 EDT 2011
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.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.org
> http://lists.pentaho.org/mailman/listinfo/mondrian
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20110822/08f9a886/attachment-0001.html
More information about the Mondrian
mailing list