Changeset 31008 in vbox for trunk/src/VBox/Main/glue
- Timestamp:
- Jul 22, 2010 3:24:27 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 63924
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/glue/glue-java.xsl
r30987 r31008 2494 2494 } 2495 2495 2496 public ISession openMachineSession( String mid) throws Exception2496 public ISession openMachineSession(IMachine m) throws Exception 2497 2497 { 2498 2498 ISession s = getSessionObject(); 2499 try { 2500 this.vbox.openExistingSession(s, mid); 2501 return s; 2502 } catch (Exception e) { 2503 try { 2504 this.vbox.openSession(s, mid); 2505 return s; 2506 } catch (Exception e1) { 2507 closeMachineSession(s); 2508 throw e1; 2509 } 2510 } 2511 } 2512 2513 public ISession openMachineSession(IMachine m) throws Exception 2514 { 2515 return openMachineSession(m.getId()); 2499 m.lockForSession(s, true /* fPermitShared */); 2500 return s; 2516 2501 } 2517 2502 … … 2580 2565 ISession session = getSessionObject(); 2581 2566 2582 String mid = m.getId();2583 2567 if (type == null) 2584 2568 type = "gui"; 2585 IProgress p = vbox.openRemoteSession(session, mid, type, "");2569 IProgress p = m.launchVMProcess(session, type, ""); 2586 2570 progressBar(p, timeout); 2587 2571 session.close(); … … 3472 3456 } 3473 3457 3474 public ISession openMachineSession( String mid) throws Exception3458 public ISession openMachineSession(IMachine m) throws Exception 3475 3459 { 3476 3460 ISession s = getSessionObject(); 3477 try { 3478 this.vbox.openExistingSession(s, mid); 3479 return s; 3480 } catch (Exception e) { 3481 try { 3482 this.vbox.openSession(s, mid); 3483 return s; 3484 } catch (Exception e1) { 3485 closeMachineSession(s); 3486 throw e1; 3487 } 3488 } 3489 } 3490 3491 public ISession openMachineSession(IMachine m) throws Exception 3492 { 3493 return openMachineSession(m.getId()); 3461 m.lockForSession(s, true /* fPermitShared */ ); 3462 return s; 3494 3463 } 3495 3464 … … 3540 3509 ISession session = getSessionObject(); 3541 3510 3542 String mid = m.getId();3543 3511 if (type == null) 3544 3512 type = "gui"; 3545 IProgress p = vbox.openRemoteSession(session, mid, type, "");3513 IProgress p = m.launchVMProcess(session, type, ""); 3546 3514 progressBar(p, timeout); 3547 3515 session.close();
Note:
See TracChangeset
for help on using the changeset viewer.