Yes, that's the way.

I've been evolving my approach to this kind of class transformation;
where I'm heading is to minimize the amount of dynamically generated
code by offloading as much as possible into stateless helper objects
(or services) that can be injected into the component instance.  In
some cases, the component will pass its component resources to the
helper.  In this way, the logic can be more easily tested in a unit
test ... which is valid, as long as there's integration tests to prove
that all the bits actually do work together.

On Jan 15, 2008 10:41 AM, Igor Drobiazko <[EMAIL PROTECTED]> wrote:
> I see. Thanks. Just had a look into the ApplicationStateWorker.
> Your are replacing the read and write methods by a call to the manager.
> This way I can implement my use case.
>
>
> On Jan 15, 2008 7:01 PM, Howard Lewis Ship <[EMAIL PROTECTED]> wrote:
>
> > Component classes are only transformed once.  This has not changed.
> >
> > The contribution method is only called once.  This too has not changed.
> >
> >
> >
> > On Jan 15, 2008 9:07 AM, Igor Drobiazko <[EMAIL PROTECTED]> wrote:
> > > Hello,
> > >
> > > Implementing injection workers I experienced that the worker is invoked
> > only
> > > the first time the page is called.
> > > I think this behavior is new since couple of days. Working with the
> > earlier
> > > 5.0.8 snapshots the worker was invoked every time the page is called.
> > > The contribution of the worker is like this:
> > >     public static void contributeComponentClassTransformWorker(
> > >             OrderedConfiguration<ComponentClassTransformWorker>
> > > configuration,
> > >             ObjectLocator locator,
> > >             InjectionProvider injectionProvider,
> > >             Environment environment,
> > >             ComponentClassResolver resolver,
> > >             RequestPageCache requestPageCache,
> > >             BindingSource bindingsource,
> > >             ApplicationStateManager applicationStateManager)
> > >     {
> > >         configuration.add("In", new InWorker());
> > >         configuration.add("Out", new OutWorker());
> > >     }
> >
> > There's no need to pass in parameters you aren't going to use ... only
> > the method name is utilized by the IoC container.
> >
> > >
> > > Are there some changes I should consider implementing transformation
> > > workers?
> > > --
> > > Best regards,
> > >
> > > Igor Drobiazko
> > >
> >
> >
> >
> > --
> > Howard M. Lewis Ship
> >
> > Creator Apache Tapestry and Apache HiveMind
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> Best regards,
>
> Igor Drobiazko
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to