final List<File> files = new ArrayList<File>();
final List<String> titles = new ArrayList<String>();
synchronized (_session)
{
final ISQLConnection conn = _session.getSQLConnection();
final SQLDatabaseMetaData md = conn.getSQLMetaData();
// Dump session properties.
try
{
files.add(createJavaBeanDumpFile(_session.getProperties()));
titles.add("Session Properties");
}
catch (Throwable th)
{
final String msg = "Error dumping driver info";
showErrorMessage(msg);
showErrorMessage(th);
s_log.error(msg, th);
}
// Dump driver information.
try
{
files.add(createJavaBeanDumpFile(_session.getDriver()));
titles.add("Driver");
}
catch (Throwable th)
{
final String msg = "Error dumping driver info";
showErrorMessage(msg);
showErrorMessage(th);
s_log.error(msg, th);
}
// Dump alias information.
try
{
files.add(createJavaBeanDumpFile(_session.getAlias()));
titles.add("Alias");
}
catch (Throwable th)
{
final String msg = "Error dumping alias info";
showErrorMessage(msg);
showErrorMessage(th);
s_log.error(msg, th);
}
// Dump general connection info.
try
{
files.add(createGeneralConnectionDumpFile(conn));
titles.add("Connection - General");
}
catch (Throwable th)
{
final String msg = "Error dumping general connection info";
showErrorMessage(msg);
showErrorMessage(th);
s_log.error(msg, th);
}
// Dump meta data.
try
{
File tempFile = File.createTempFile(PREFIX, SUFFIX);
IDataSetViewer dest = new DataSetViewerTextFileDestination(tempFile);
dest.show(conn.getSQLMetaData().getMetaDataSet());
files.add(tempFile);
titles.add("Metadata");
}
catch (Throwable th)
{
final String msg = "Error dumping metadata";
showErrorMessage(msg);
showErrorMessage(th);
s_log.error(msg, th);
}
// Dump catalogs.
try
{
File tempFile = File.createTempFile(PREFIX, SUFFIX);
IDataSetViewer dest = new DataSetViewerTextFileDestination(tempFile);
dest.show(new ObjectArrayDataSet(md.getCatalogs()));
files.add(tempFile);
titles.add("Catalogs");
}
catch (Throwable th)
{
final String msg = "Error dumping catalogs";
showErrorMessage(msg);
showErrorMessage(th);
s_log.error(msg, th);
}
// Dump schemas.
try
{
File tempFile = File.createTempFile(PREFIX, SUFFIX);
IDataSetViewer dest = new DataSetViewerTextFileDestination(tempFile);
dest.show(new ObjectArrayDataSet(_session.getSchemaInfo().getSchemas()));
files.add(tempFile);
titles.add("Schemas");
}
catch (Throwable th)
{
final String msg = "Error dumping schemas";
showErrorMessage(msg);
showErrorMessage(th);
s_log.error(msg, th);
}
// Dump data types.
try
{
File tempFile = File.createTempFile(PREFIX, SUFFIX);
IDataSetViewer dest = new DataSetViewerTextFileDestination(tempFile);
dest.show(conn.getSQLMetaData().getTypesDataSet());
files.add(tempFile);
titles.add("Data Types");
}
catch (Throwable th)
{
final String msg = "Error dumping data types";
showErrorMessage(msg);
showErrorMessage(th);
s_log.error(msg, th);
}
// Dump table types.
try
{
File tempFile = File.createTempFile(PREFIX, SUFFIX);
IDataSetViewer dest = new DataSetViewerTextFileDestination(tempFile);
dest.show(new ObjectArrayDataSet(md.getTableTypes()));
files.add(tempFile);
titles.add("Table Types");
}
catch (Throwable th)
{