Bug 314645 XML Datasource is not Thread-Safe when passing data as InputStream
Build Identifier: Eclipse Build id: 20090920-1017 / BIRT Runtime 2.5.1 + 2.5.2 When passing XML-data to the IRunTask in a multi-threaded application, some of the resulting .rptdocument files will be corrupted. The error only occures when passing an InputStream using the setAppContext method: ctxMap.put("org.eclipse.birt.report.data.oda.xml.inputStream", new FileInputStream("data.xml")); ctxMap.put("org.eclipse.birt.report.data.oda.xml.closeInputStream", new Boolean(true)); task.setAppContext(ctxMap); This warning will be written to the log: "WARNUNG: Exceptions occur during xml parsing" (see attachments for stackstrace) Reproducible: Sometimes Steps to Reproduce: 1. Run the sample application in the attachments (use the -Xmx1024m VM-Argument to avoid our of memory errors 2. Wait till the log shows the this warning: WARNUNG: Exceptions occur during xml parsing 3. Kill the sample application process 4. Analyze the generated rptdocument files (sort by ascending file size to find corrupted files)
data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/odaconsumer/DriverManager.java
/*
 *****************************************************************************
 * Copyright (c) 2004, 2007 Actuate Corporation.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *  Actuate Corporation - initial API and implementation
 *
 ******************************************************************************
 */  
package org.eclipse.birt.data.engine.odaconsumer;
import java.util.Hashtable;
import org.eclipse.birt.data.engine.core.DataException;
import org.eclipse.birt.data.engine.core.security.PropertySecurity;
import org.eclipse.datatools.connectivity.oda.IDriver;
import org.eclipse.datatools.connectivity.oda.util.manifest.ExtensionManifest;
/**
 * Package internal class.
 * <code>DriverManager</code> manages a set of data source drivers.  Calling 
 * <code>getInstance</code> will return the singleton instance of <code>DriverManager</code>.
 * 
 * When the method <code>getDriverHelper</code> is initiated by the 
 * <code>ConnectionManager</code>, the <code>DriverManager</code> will 
 * attempt to load the specified driver and return a <code>IDriver</code> 
 * instance of that driver.
 */
public class DriverManager