~ubuntu-branches/ubuntu/precise/virtualbox/precise-updates

« back to all changes in this revision

Viewing changes to src/VBox/Main/glue/glue-java.xsl

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2011-07-04 13:02:31 UTC
  • mfrom: (3.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20110704130231-l843es6wqhx614n7
Tags: 4.0.10-dfsg-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Add Apport hook.
    - debian/virtualbox-ose.files/source_virtualbox-ose.py
    - debian/virtualbox-ose.install
  - Drop *-source packages.
* Add the Modaliases control field manually for maximum backportability.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2451
2451
        this.vbox = new IVirtualBox((org.mozilla.interfaces.IVirtualBox) this.componentManager
2452
2452
                    .createInstanceByContractID("@virtualbox.org/VirtualBox;1",
2453
2453
                                                null,
2454
 
                                                org.mozilla.interfaces.IVirtualBox.IVIRTUALBOX_IID));
 
2454
                                                org.mozilla.interfaces.IVirtualBox.IVIRTUALBOX_IID));
2455
2455
    }
2456
2456
 
2457
2457
    public void connect(String url, String username, String passwd)
3216
3216
            throw new AssertionError(e);
3217
3217
        }
3218
3218
    }
3219
 
    // temporary methods, will bo away soon
 
3219
    // temporary methods, will go away soon
3220
3220
    public static byte[] wrapBytes(List<Short> arr)
3221
3221
    {
3222
3222
       if (arr == null)
3394
3394
        this.port = pool.getPort();
3395
3395
        try {
3396
3396
            ((BindingProvider)port).getRequestContext().
3397
 
                 put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, url);
3398
 
             String handle = port.iWebsessionManagerLogon(username, passwd);
3399
 
             this.vbox = new IVirtualBox(handle, port);
3400
 
         }  catch (Throwable t) {
3401
 
             if (this.port != null)
 
3397
                put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, url);
 
3398
            String handle = port.iWebsessionManagerLogon(username, passwd);
 
3399
            this.vbox = new IVirtualBox(handle, port);
 
3400
        } catch (Throwable t) {
 
3401
            if (this.port != null && pool != null) {
3402
3402
                pool.releasePort(this.port);
3403
 
             // we have to throw smth derived from RuntimeException
3404
 
             throw new VBoxException(t, t.getMessage());
3405
 
          }
 
3403
                this.port = null;
 
3404
            }
 
3405
            // we have to throw smth derived from RuntimeException
 
3406
            throw new VBoxException(t, t.getMessage());
 
3407
        }
3406
3408
    }
3407
3409
 
3408
3410
    public void connect(String url, String username, String passwd,
3409
3411
                        Map<String, Object> requestContext, Map<String, Object> responseContext)
3410
3412
    {
3411
 
         this.port = pool.getPort();
3412
 
 
3413
 
         try {
3414
 
           ((BindingProvider)port).getRequestContext();
3415
 
           if (requestContext != null)
3416
 
               ((BindingProvider)port).getRequestContext().putAll(requestContext);
3417
 
 
3418
 
           if (responseContext != null)
3419
 
               ((BindingProvider)port).getResponseContext().putAll(responseContext);
3420
 
 
3421
 
           ((BindingProvider)port).getRequestContext().
 
3413
        this.port = pool.getPort();
 
3414
 
 
3415
        try {
 
3416
            ((BindingProvider)port).getRequestContext();
 
3417
            if (requestContext != null)
 
3418
                ((BindingProvider)port).getRequestContext().putAll(requestContext);
 
3419
 
 
3420
            if (responseContext != null)
 
3421
                ((BindingProvider)port).getResponseContext().putAll(responseContext);
 
3422
 
 
3423
            ((BindingProvider)port).getRequestContext().
3422
3424
                put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, url);
3423
3425
            String handle = port.iWebsessionManagerLogon(username, passwd);
3424
3426
            this.vbox = new IVirtualBox(handle, port);
3425
 
          } catch (Throwable t) {
3426
 
             if (this.port != null)
3427
 
                pool.releasePort(port);
3428
 
             // we have to throw smth derived from RuntimeException
3429
 
             throw new VBoxException(t, t.getMessage());
3430
 
          }
 
3427
        } catch (Throwable t) {
 
3428
            if (this.port != null && pool != null) {
 
3429
                pool.releasePort(this.port);
 
3430
                this.port = null;
 
3431
            }
 
3432
            // we have to throw smth derived from RuntimeException
 
3433
            throw new VBoxException(t, t.getMessage());
 
3434
        }
3431
3435
    }
3432
3436
 
3433
3437
    public void disconnect()
3440
3444
        } catch (RuntimeFaultMsg e) {
3441
3445
            throw new VBoxException(e, e.getMessage());
3442
3446
        } finally {
3443
 
           if (this.port != null) {
3444
 
             pool.releasePort(this.port);
3445
 
             this.port = null;
3446
 
           }
 
3447
            if (this.port != null) {
 
3448
                pool.releasePort(this.port);
 
3449
                this.port = null;
 
3450
            }
3447
3451
        }
3448
3452
    }
3449
3453