// around the database document, the data source, the connection, etc. As long as those objects are
// not cleaned up, the "database model impl" - the structure holding all document data - will
// stay alive, and subsequent requests to load the doc will just reuse it, without really loading it.
docURL = copyToTempFile( docURL );
doc = (XModel)UnoRuntime.queryInterface( XModel.class,
loader.loadComponentFromURL( docURL, "_blank", 0, new PropertyValue[] {} ) );
docUI = (XDatabaseDocumentUI)UnoRuntime.queryInterface( XDatabaseDocumentUI.class,
doc.getCurrentController() );
docUI.connect();