John,
TC does not marshal objects in any way under user's control. It hooks
into memory, watches for changes, and pushes what your business logic
changes, on change. There is no way to invoke a marshaling task or
fire an event that would force us to marshal the objects you want.
(Well, there is but it is in the ManagerUtil classes and shouldn't be
used directly).
Also, TC honors object identity cluster-wide so it does in fact know
which widgets are associated with what pages, etc. It handles
singletons properly, again because it is not marshaling or otherwise
walking graphs.
I wish I understood the code in Wicket we are all talking about
better. I want to help more than just interjecting what TC can and
cannot do.
I think you guys are all close tho. How can I help further, everyone?
Cheers,
--Ari
On Jul 4, 2008, at 8:17 AM, John Patterson wrote:
richardwilko wrote:
Afaik you can't configure terracotta to serialise objects (its kind
of the
opposite of what it tries to achieve),
not strictly java.io.Serializing but at some level TC must convert
Objects
to bits to send them over the wire and persist them. Also manage
them for
garbage collection.
richardwilko wrote:
however simply serialising the webpages doesnt work in all cases
anyway
(thats what my original solution did), for example when you have a
reference to one page inside another you can end up with the wrong
version
of that referenced page.
btw, even simple java.io.Serializing the pages can be made to object
replace
references with placeholders e.g. in readReplace()... but I guess you
already do something similar.
richardwilko wrote:
The TerracottaPageStore I am working on will take care of this, and
when
it is ready the only change you will need to make is adding
something like
this in your application class:
public ISessionStore newSessionStore() {
return new SecondLevelCacheSessionStore(this, new
TerracottaPageStore(5,
5));
}
it is also posible that this could be added automatically with byte-
code
manipulation.
Brilliant, can't wait to use it myself
John Patterson wrote:
Would be great if TC could be configured to serialise WebPage's and
their
Components as single entities.
Perhaps I should have said _manage_ WebPages and their Components as
single
entities. Am I right that this is the key issue requiring your
workaround?
TC does not know that wicket components are only referenced in a
single page
and so share the same lifecycle - a fact which could be used to
increase its
efficiency.
--
View this message in context:
http://www.nabble.com/Terracotta-integration-tp18168616p18281339.html
Sent from the Wicket - Dev mailing list archive at Nabble.com.