Hi,
thanks a lot Catalin for bringing up this topic! I was wondering about this also, and as the errata correction is not yet online I would like use this occasion to ask something (I'm afraid it's rather stupid to ask a question like that, but as it's troubling me I just try...):
I was wondering if the DvdFileAccess (or rather my equivalent class) should be static or not, and what would be the consequences.
- If it's static, it's in fact a singleton even though I don't use this
pattern, right?
- If it's static, I have to synchronize between seek's and read's, but if it's not and every DvdDatabase gets its own (and every
thread uses its own DvdDatabase like in the RMI solution), I don't need to synchronize, do I?
- Last not least, do you consider a non-static DvdFileAccess a sensible option too - what would you prefer?
Sorry if these questions sound too stupid for this forum (in fact with this assignment I notice there are big differences between having the theoretical knowledge of
SCJP and making design decisions...)
Ciao
Sigrid