dataSourceName = "someDataSource";
final XNamingService dataSourceRegistrations = UnoRuntime.queryInterface(
XNamingService.class, getMSF().createInstance( "com.sun.star.sdb.DatabaseContext" ) );
final XNameAccess existenceCheck = UnoRuntime.queryInterface( XNameAccess.class, dataSourceRegistrations );
if ( existenceCheck.hasByName( "someDataSource" ) )
dataSourceRegistrations.revokeObject( "someDataSource" );
dataSourceRegistrations.registerObject("someDataSource", m_dataSource.getXDataSource());
assertEquals("registration name of a newly registered data source is wrong", dataSourceName, m_dataSource.getName());
}
catch (Exception ex)
{