[vbox-dev] ISession lock/unlock problems

Andrea Turli andrea.turli at email.it
Tue Mar 27 18:54:22 GMT 2012


So I'm trying to lauch/stop vm but also modify the vm definition.

My question was
Is it possible that IMachine.getSessionState() and ISession.getState() are
not
always in sync?
Is there a way to ensure that the ISession ::state is effectively Unlocked
before another methods tries to use it? Can I loop on the ISession::state
until the ISession is Unlocked for
all, and how?

Thanks,
Andrea

On Tue, Mar 27, 2012 at 3:23 PM, Klaus Espenlaub <klaus.espenlaub at oracle.com
> wrote:

> On 25.03.2012 18:42, Andrea Turli wrote:
> > Hi,
> >
> > I'm trying to implement a java client able to interact with Vbox API.
> >
> > Reading the documentation I've found this document
> >
> https://www.virtualbox.org/sdkref/interface_i_machine.html#5f6e112de89f7e1d300738c9a055d5c9
> > where it is said explicity:
> > "The caller must eventually release the session's shared lock by
> > calling ISession::unlockMachine on the local session object once this
> > call has returned. However, the session's state (see ISession::state)
> > will not return to "Unlocked" until the remote session has also
> > unlocked the machine (i.e. the machine has stopped running)."
> >
> > In fact IMachine.getSessionState() and ISession.getState() are not
> > always in sync. Is there a way to ensure that the ISession ::state is
> > effectively Unlocked before another methods tries to use it?
> > Can I loop on the ISession::state until the ISession is Unlocked for
> > all, and how?
>
> What's the problem you're trying to solve? It's a bit difficult to
> answer a question you didn't ask.
>
> Are you launching a VM, or are you trying to make changes to the
> settings of a running VM? Quite different cases when it comes to sessions.
>
> Klaus
>
> >
> > Thank you,
> > Andrea
> >
> >
> >   --
> >   Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e
> SMTP autenticato? GRATIS solo con Email.it http://www.email.it/f
> >
> >   Sponsor:
> >   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
> >   Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=12229&d=25-3
> >
> > _______________________________________________
> > vbox-dev mailing list
> > vbox-dev at virtualbox.org
> > https://www.virtualbox.org/mailman/listinfo/vbox-dev
>
>
> --
> Oracle <http://www.oracle.com>
> Dr. Klaus Espenlaub | Snr. Manager Software Development Desktop
> Virtualization
> Phone: +49 7151 60405 205 <tel:+49715160405205>
> Oracle VM VirtualBox
>
> ORACLE Deutschland B.V. & Co. KG | Werkstr. 24 | 71384 Weinstadt
>
> ORACLE Deutschland B.V. & Co. KG
> Hauptverwaltung: Riesstr. 25, D-80992 München
> Registergericht: Amtsgericht München, HRA 95603
> Geschäftsführer: Jürgen Kunz
>
> Komplementärin: ORACLE Deutschland Verwaltung B.V.
> Hertogswetering 163/167, 3543 AS Utrecht, Niederlande
> Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
> Geschäftsführer: Alexander van der Ven, Astrid Kepper, Val Maher
>
> Green Oracle <http://www.oracle.com/commitment>         Oracle is
> committed to
> developing practices and products that help protect the environment
>
>
> _______________________________________________
> vbox-dev mailing list
> vbox-dev at virtualbox.org
> https://www.virtualbox.org/mailman/listinfo/vbox-dev
>

 

 

 --

 Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP autenticato? GRATIS solo con Email.it http://www.email.it/f

 

 Sponsor:

 Weekend di benessere con i pacchetti terme proposti da Costahotels per giorni di relax alle terme di Riccione o al centro Talassoterapico di Rimini

 Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=12230&d=27-3

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.virtualbox.org/pipermail/vbox-dev/attachments/20120327/26656c8c/attachment.html>


More information about the vbox-dev mailing list