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...


Reply via email to