fixed the serialization problem. it was just too tired last night to see it.

-Igor


On 11/12/05, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
ok, lots more refactoring in.

lazy init proxies now intercept hashcode,equals,tostring,finalize.

i tried implementing writereplace and readresolve but it doesnt seem to be working, getting another weird class cast exception. writereplace works fine, and the object it generates deserializes into a proxy, so something weird is happening somewhere. maybe you can take a look, it has a failing unit test.

i created a IFieldValueFactory and generalized the injector away from proxies. I renamed the IObjectLocator to IProxyTargetLocator. Instead of IObjectLocatorFactory there is now ProxyFieldValueFactory which acts as an adapter between the IProxyTargetLocator and IFieldValueFactory. So now you can inject arbitrary values using the injector, not just proxies.

created CompoundFieldValueFactory to allow injection from multiple IFieldValueFactories.

-Igor



On 11/11/05, Christian Essl < [EMAIL PROTECTED]> wrote:
On Fri, 11 Nov 2005 14:51:16 -0800, Igor Vaynberg
<[EMAIL PROTECTED]> wrote:

> i was actually thinking of creating a CompoundObjectLocatorFactory which
> would try its children until one returns a non-null.
>
> will try to get to that tonight as well :)
>


That's better than my suggestion - Thank you.

While I suggested to use an IObjectLocatorFactory I now think it would be
better if the ProxyInjector would take something like:

interface IFieldInstanceCreator{
    Object createFieldInstance(Object fieldOwner, Field field);
}

The IInstanceCreator creates the Proxy or what ever it things fits right.
(For convinience you could have a ObjectLocatorFactory which implements
IInstanceCreator).

The reason for this is that I'd like to have an annotation
(SessionProperty) which injects my ShoppingCard from the my WebSession. I
think it could be useful in other arears as well where there is not the
same serialization problem as with spring beans or a better way than to
use an object locator - just less coupling.

Christian





___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user


Reply via email to