jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Padraic I. Hannon" <...@wasabicowboy.com>
Subject Re: [OCM] DynaBean support
Date Tue, 23 Oct 2007 12:40:38 GMT
I placed the code in jira: 
https://issues.apache.org/jira/browse/JCR-1100. I think there is a lot 
of room to make this better. Here is an example test case I wrote with 
our data:

        JcrRepository repo = getRepository();
        Feature feature = new FeatureImpl("test feature mixin");
        feature = (Feature)repo.add(feature);

        feature = (Feature)feature.addMixin(new EngineImpl());
        Engine engine = (Engine)feature;

        Object obj = repo.forPath(feature.getPath());
        assert obj instanceof Engine;

Note in this example there are four java files: Feature (interface), 
FeatureImpl (class), Engine (interface), Engine (class)...


Christophe Lombart wrote:
> Hi Paddy,
> It should be nice if you can donnate the code
> Christophe
> On 10/23/07, Padraic I. Hannon <pih@wasabicowboy.com> wrote:
>> I think this would be a great idea, I implemented something similar for
>> OCM using cglib mixin proxies to provide mixin support at run time.
>> -paddy

View raw message