| java.lang.Object org.netbeans.modules.visualweb.insync.live.LiveUnitWrapper
LiveUnitWrapper | public class LiveUnitWrapper implements Unit(Code) | | This is a class that wrapps a LiveUnit. This wrapper is to allow FacesModel to delay
the resurrect operation on a LiveUnit. Since it would be very onerous to change
every method in LiveUnit to ensure a resurrect had occured prior to computing there
result, I create a wrapper class which holds the actual LiveUnit, and attempts to
delay the requirement of the resurect for as long as possible.
We lazy initialize liveUnit due to issue with possible circular sync issue
Image that a new ModelSet is instantiated. This model set will have sync all of its
units on creation. The process of syncing used to created the LiveUnit right then
and there. Well, creating a LiveUnit ends up create LiveProperty's that have their
value initialized. At design time, there is a DesignTimeVariableResolver which turns
around and does a sync on the models its will attempt to resolve with.
Danger Will Robinson, by definition one of those models is the one in process of
syncing !!! I have also added a check in Model.sync() to make sure we detect
these circular sync issues in the future.
TODO
More work needs to be done to make this class thread safe, however there are a number
of issues with thread safety ness already within insync, that we can tackle this problem
then in a more general fashion.
author: eric |
file | protected FileObject file(Code) | | |
destroy | public void destroy()(Code) | | |
getState | public State getState()(Code) | | |
isLiveUnitInstantiated | public boolean isLiveUnitInstantiated()(Code) | | |
isWriteLocked | public boolean isWriteLocked()(Code) | | |
readLock | public void readLock()(Code) | | |
readUnlock | public void readUnlock()(Code) | | |
sync | public boolean sync()(Code) | | |
|
|