[Glass] Gem go down when ex retry is manage for aBlock on: do:
Dale Henrichs
dale.henrichs at gemtalksystems.com
Thu Jan 23 07:06:47 PST 2014
On Thu, Jan 23, 2014 at 4:02 AM, Dario Trussardi <dario.trussardi at tiscali.it
> wrote:
> Ciao,
>
>
> > Ciao,
> >
> >>
> >> Ciao,
> >>
> >>> Dario,
> >>>
> >>> Yes, trying to do a seaside callback inside the exception is a use
> case that has not been tested in GemStone, so I am not surpirsed that it
> causes a nasty problem...
> >>>
> >>> Off the top of my head, I can think of a couple of different
> approaches:
> >>>
> >>> - given that it may take time for the print connection to succeed,
> I'd replace the
> >>> Delay loop with a call to a sevice vm that way the seaside gem is
> not blocked
> >>> while waiting for the print job to be handled
> >>
> >> what service ?
>
> Any indication about it, for not block the gem ?
>
The service vm is described here[1]
[1] https://code.google.com/p/glassdb/wiki/ServiceVMExample
>
> >>
> >>> - you might be able to successfully trigger a dialog to pop up if
> you can
> >>> avoid making the jquery call inside the exception block ...
> something where you
> >>> set a flag inside the exception block and pop up the dialog for
> retry in the
> >>> code following the exception might work as well ...
> >>
> >> How i can open a pop up when exception occured ?
> >>
> >> Anyone has an example about it ?
> >>
> >>
> >>>
> >>> There might be other approaches as well...
> >>>
>
> I complete extrapolate the iqDialog from on: do: exception :
>
> stampaok:= false.
> erroreTcpIP := false.
>
> [ stampaok] whileFalse:[
> stampaok := true.
> erroreTcpIP ifTrue:[ self jqDialog: (
> DTRCassaDialogConferma openOnException: exRef
>
> onModel: dcmModel)
>
> title: 'ERRORE STAMPA'. ].
>
> [TicketBaseTipoCentriCarico newOn: dcmModel
> dettagli: tfDettagli onPrinter: rfrMaster aPrinterTicket ]
> on: PrinterError do: [:ex | exRef :=
> ex .
>
> erroreTcpIP := true.
>
> stampaok := false.
> ex
> return: false. ].
> ].
>
> Now the while loop work fine.
>
I would think that this while loop would be touchy to use in a multi-vm
GemStone scenario since http requests would be delivered to a different vm,
unless you are using session affinity or a single gem ...
Dale
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20140123/897c9d60/attachment.html>
More information about the Glass
mailing list