Patches item #1448202, was opened at 2006-03-12 08:47
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=684977&aid=1448202&group_id=119783

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Gili Tzabari (cowwoc)
Assigned to: Nobody/Anonymous (nobody)
Summary: Yet another Resource cleanup

Initial Comment:
This patch includes:

- Removed Resource idleTimeout, cacheTimeout
- Added SharedResource.addBookmarkable(),
PackageResource.bindBookmarkable()

So the new behavior goes something like this:

- Resources that are exclusively referenced by
non-bookmarkable Pages are said to be non-bookmarkable
resources. Such resources are automatically
garbage-collected once their parent page expires and is
garbage-collected itself. (this replaces the
idleTimeout behavior)

- SharedResources now defines two types of resources:
bookmarkable and non-bookmarkable.

- SharedResources.add() adds a non-bookmarkable resource
- SharedResources.addBookmarkable() adds a bookmarkable
resource

- PackageResource.bind() binds a non-bookmarkable resource
- PackageResource.bindBookmarkable() binds a
bookmarkable resource

Migration instructions:

- PackageResource.bind() now returns a reference to the
resource that is bound. It is up to the developer to
maintain a strong reference between the parent Page and
any resources it references.

- Most wicket components that make use of resources,
such as class Image will automatically keep strong
references around so that if your Page add()s an Image
as a child component, it will automatically keep its
resources alive. The only code that has to be modified
is if PackageResource.bind() was invoked standalone.

- IInitializer code should now invoke
SharedResources.addBookmarkable() and
PackageResource.bindBookmarkable() instead of the
non-bookmarkable equivilents.

- cacheTimeout has been removed altogether because for
performance and design reasons it makes more sense to
define it in the scope of the Resource object itself. I
can provide sample code in Wiki as to how this can be
done or we can add some sample code to wicket-examples
that shows how caching resources are meant to work.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=684977&aid=1448202&group_id=119783


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to