{
m_orb = (XMultiServiceFactory)param.getMSF();
XNameAccess databaseContext = (XNameAccess)UnoRuntime.queryInterface( XNameAccess.class,
m_orb.createInstance( "com.sun.star.sdb.DatabaseContext" ) );
XNamingService namingService = (XNamingService)UnoRuntime.queryInterface( XNamingService.class,
databaseContext );
// revoke the data source, if it previously existed
if ( databaseContext.hasByName( m_dataSourceName ) )
namingService.revokeObject( m_dataSourceName );
// // create a new ODB file, and register it with its URL
m_databaseDocument = new HsqlDatabase( m_orb );
String documentURL = m_databaseDocument.getDocumentURL();
namingService.registerObject( m_dataSourceName, databaseContext.getByName( documentURL ) );
m_dataSource = (XDataSource)UnoRuntime.queryInterface( XDataSource.class,
databaseContext.getByName( m_dataSourceName ) );
m_dataSourceProps = dbfTools.queryPropertySet( m_dataSource );
return m_dataSource != null;