So I'm trying to lauch/stop vm but also modify the vm definition.<div><br></div><div>My question was</div><div><span style>Is it possible that IMachine.getSessionState() and ISession.getState() are not</span><br style>
<span style>always in sync?</span></div><div><span style>Is there a way to ensure that the ISession ::state is </span><span style>effectively Unlocked before another methods tries to use it? </span><span style>Can I loop on the ISession::state until the ISession is Unlocked for</span><br style>
<span style>all, and how?</span></div><div><font color="#222222" face="arial, sans-serif"><br></font></div><div><font color="#222222" face="arial, sans-serif">Thanks,</font></div><div><font color="#222222" face="arial, sans-serif">Andrea<br>
</font><br><div class="gmail_quote">On Tue, Mar 27, 2012 at 3:23 PM, Klaus Espenlaub <span dir="ltr"><<a href="mailto:klaus.espenlaub@oracle.com">klaus.espenlaub@oracle.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On 25.03.2012 18:42, Andrea Turli wrote:<br>
> Hi,<br>
><br>
> I'm trying to implement a java client able to interact with Vbox API.<br>
><br>
> Reading the documentation I've found this document<br>
> <a href="https://www.virtualbox.org/sdkref/interface_i_machine.html#5f6e112de89f7e1d300738c9a055d5c9" target="_blank">https://www.virtualbox.org/sdkref/interface_i_machine.html#5f6e112de89f7e1d300738c9a055d5c9</a><br>

> where it is said explicity:<br>
> "The caller must eventually release the session's shared lock by<br>
> calling ISession::unlockMachine on the local session object once this<br>
> call has returned. However, the session's state (see ISession::state)<br>
> will not return to "Unlocked" until the remote session has also<br>
> unlocked the machine (i.e. the machine has stopped running)."<br>
><br>
> In fact IMachine.getSessionState() and ISession.getState() are not<br>
> always in sync. Is there a way to ensure that the ISession ::state is<br>
> effectively Unlocked before another methods tries to use it?<br>
> Can I loop on the ISession::state until the ISession is Unlocked for<br>
> all, and how?<br>
<br>
</div></div>What's the problem you're trying to solve? It's a bit difficult to<br>
answer a question you didn't ask.<br>
<br>
Are you launching a VM, or are you trying to make changes to the<br>
settings of a running VM? Quite different cases when it comes to sessions.<br>
<br>
Klaus<br>
<br>
><br>
> Thank you,<br>
> Andrea<br>
><br>
><br>
>   --<br>
>   Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP autenticato? GRATIS solo con Email.it <a href="http://www.email.it/f" target="_blank">http://www.email.it/f</a><br>
><br>
>   Sponsor:<br>
>   Prenota prima e cogli le offerte Costahotels Riccione per le vacanze in famiglia con bambini e risparmia senza rinunciare all'ottimo servizio di strutture selezionate<br>
>   Clicca qui: <a href="http://adv.email.it/cgi-bin/foclick.cgi?mid=12229&d=25-3" target="_blank">http://adv.email.it/cgi-bin/foclick.cgi?mid=12229&d=25-3</a><br>
><br>
> _______________________________________________<br>
> vbox-dev mailing list<br>
> <a href="mailto:vbox-dev@virtualbox.org">vbox-dev@virtualbox.org</a><br>
> <a href="https://www.virtualbox.org/mailman/listinfo/vbox-dev" target="_blank">https://www.virtualbox.org/mailman/listinfo/vbox-dev</a><br>
<br>
<br>
--<br>
Oracle <<a href="http://www.oracle.com" target="_blank">http://www.oracle.com</a>><br>
Dr. Klaus Espenlaub | Snr. Manager Software Development Desktop<br>
Virtualization<br>
Phone: <a href="tel:%2B49%207151%2060405%20205" value="+49715160405205">+49 7151 60405 205</a> <tel:<a href="tel:%2B49715160405205" value="+49715160405205">+49715160405205</a>><br>
Oracle VM VirtualBox<br>
<br>
ORACLE Deutschland B.V. & Co. KG | Werkstr. 24 | 71384 Weinstadt<br>
<br>
ORACLE Deutschland B.V. & Co. KG<br>
Hauptverwaltung: Riesstr. 25, D-80992 München<br>
Registergericht: Amtsgericht München, HRA 95603<br>
Geschäftsführer: Jürgen Kunz<br>
<br>
Komplementärin: ORACLE Deutschland Verwaltung B.V.<br>
Hertogswetering 163/167, 3543 AS Utrecht, Niederlande<br>
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697<br>
Geschäftsführer: Alexander van der Ven, Astrid Kepper, Val Maher<br>
<br>
Green Oracle <<a href="http://www.oracle.com/commitment" target="_blank">http://www.oracle.com/commitment</a>>         Oracle is committed to<br>
developing practices and products that help protect the environment<br>
<br>
<br>
_______________________________________________<br>
vbox-dev mailing list<br>
<a href="mailto:vbox-dev@virtualbox.org">vbox-dev@virtualbox.org</a><br>
<a href="https://www.virtualbox.org/mailman/listinfo/vbox-dev" target="_blank">https://www.virtualbox.org/mailman/listinfo/vbox-dev</a><br>
</blockquote></div><br></div>