| 566 | } |
| 567 | |
| 568 | public boolean commitStorage( XStorage xStorage ) |
| 569 | { |
| 570 | // XTransactedObject must be supported by storages |
| 571 | XTransactedObject xTransact = UnoRuntime.queryInterface( XTransactedObject.class, xStorage ); |
| 572 | if ( xTransact == null ) |
| 573 | { |
| 574 | Error( "Storage doesn't implement transacted access!" ); |
| 575 | return false; |
| 576 | } |
| 577 | |
| 578 | try |
| 579 | { |
| 580 | xTransact.commit(); |
| 581 | } |
| 582 | catch( Exception e ) |
| 583 | { |
| 584 | Error( "Storage commit failed, exception:" + e ); |
| 585 | return false; |
| 586 | } |
| 587 | |
| 588 | return true; |
| 589 | } |
| 590 | |
| 591 | public boolean disposeStorage( XStorage xStorage ) |
| 592 | { |