It's something we probably will try to get rid of for Wicket 2.0; instead of the pessimistic, register first approach we have now, we can choose an optimistic approach which will allow disallow in a similar fashion as file filters work.
Eelco On 5/10/06, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
imagine this situation w/out the use of initializer you have a cluster where you do not use sticky sessions user comes to node A and requests a page. this page binds a bunch of resources that image components on this page need. browser starts to render one of these image components and makes a resource to the resource url it needs. this request now comes to node B of the cluster. on node B no one has ever accessed this page before so none of its resources have been bound yet, so now one of the images will get a 404. the initializer makes sure that all resources are bound on all nodes at startup time not at first-access time so the situation above does not occur. hope this is clear enough -Igor On 5/10/06, smallufo <[EMAIL PROTECTED]> wrote: > > Hi > > Can somebody explain the purpose of PackageResource.bind() in IInitializer ? > > I tried to remove PackageResource.bind(application , Foo.class , "bar.gif") in IInitializer > and ... keeps the following code intact in Page/Panel > add(new Image("myImage" , new PackageResourceReference(Foo.class, "bar.gif"))); > > and the whole application works fine , images correctly shown. (I am sure the IInitializer.init() is executed) > > I just get confused. What is the purpose of PackageResource.bind in IInitializer ? > In the JavaDoc , it says for some reason about sticky session or cluster ... But I am still not clear... > > If it is for the purpose of sticky session or cluster ... why do we need to duplicate some very similar code ? > > I think > PackageResource.bind(application , Foo.class , "bar.gif") > and > ...new PackageResourceReference(Foo.class, "bar.gif"))); > seems violate the DRY rule... > > >
------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642 _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user