You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Ted Steen <te...@gmail.com> on 2007/02/21 23:05:59 UTC

T5-ioc: Decorator targeting specific interface

Hi,

I was wondering why it is not possible to decorate services with a
specific interface like this;

public static <T extends DAO> T decorateDAOService(Class<T>
serviceInterface, T delegate, Session session)

if I do that tapestry warns me and says;
"Decorator methods must a parameter for the service delegate (i.e.,
the object the created interceptor will delegate to). Method
net.keso.ted.peng5.services.Peng5Module.decorateDAOService(Class, DAO,
Session) does not include such a parameter, and has been ignored.null"

also, "null"? If I remember correctly all warning messages I get ends
with "null" :)

-- 
/ted

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: T5-ioc: Decorator targeting specific interface

Posted by Jesse Kuhnert <jk...@gmail.com>.
I think this may have to do with what I just (unhappily) discovered
yesterday.. Javassist doesn't appear to really support generics yet.
:(

I'm thinking of moving to asm / cglib for T4. It shouldn't be too hard
as that area was nicely abstracted away into easy to manage areas, but
I'm sure it'll be painful somehow anyways..

On 2/21/07, Ted Steen <te...@gmail.com> wrote:
> Java build 1.6.0-b105 on Windows XP.
> Eclipse 3.2.1 internal compiler compiles it all I guess.
>
> 2007/2/22, Howard Lewis Ship <hl...@gmail.com>:
> > It's wierd, because Tapestry IoC is not that picky: it wants to see a
> > parameter who type matches the service interface type, DAO.
> >
> > What's your environment?  JDK, O/S, etc.?
> >
> > On 2/21/07, Ted Steen <te...@gmail.com> wrote:
> > > DAO is an interface
> > >
> > > as in the example i posted earlier,
> > >
> > > public static DAO decorateDAOService(Class<DAO> serviceInterface, DAO
> > > delegate, Session session);
> > >
> > > but, as I said, when the warning comes it says
> > > "Decorator methods must a parameter for the service delegate (i.e.,
> > > the object the created interceptor will delegate to). Method
> > > net.keso.ted.peng5.services.Peng5Module.decorateDAOService(Class, DAO,
> > > Session) does not include such a parameter, and has been ignored.null"
> > >
> > > it says Class not Class<DAO> so the serviceInterface doesnt "match"
> > > the delegate.
> > >
> > >
> > > 2007/2/22, Howard Lewis Ship <hl...@gmail.com>:
> > > > I think that Tapestry IoC is trying to insist that the parameter be an
> > > > interface.  Do you have a DAO base class, or a DAO interface?
> > > >
> > > > On 2/21/07, Ted Steen <te...@gmail.com> wrote:
> > > > > I guess there maybe could be a problem with the ordering of
> > > > > decoration, but it is nice to not having to rely on name-magic with
> > > > > @Match
> > > > >
> > > > > 2007/2/21, Ted Steen <te...@gmail.com>:
> > > > > > I tried this (where GenericDAO is an interface),
> > > > > >
> > > > > > public static DAO decorateDAOService(Class<DAO> serviceInterface, DAO
> > > > > > delegate, Session session);
> > > > > >
> > > > > > I think it complains because according to the warning message the
> > > > > > serviceInterface is just a Class, not a Class<DAO> and the delegate is
> > > > > > a DAO. so they dont match.
> > > > > >
> > > > > > it would be neat to be able to target a specific interface... :>
> > > > > >
> > > > > >
> > > > > > 2007/2/21, Howard Lewis Ship <hl...@gmail.com>:
> > > > > > > I think it's complaining because the T ends up being java.lang.Object,
> > > > > > > which isn't an interface.
> > > > > > >
> > > > > > > Don't know about the null, though.null
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ;-)
> > > > > > >
> > > > > > > On 2/21/07, Ted Steen <te...@gmail.com> wrote:
> > > > > > > > Hi,
> > > > > > > >
> > > > > > > > I was wondering why it is not possible to decorate services with a
> > > > > > > > specific interface like this;
> > > > > > > >
> > > > > > > > public static <T extends DAO> T decorateDAOService(Class<T>
> > > > > > > > serviceInterface, T delegate, Session session)
> > > > > > > >
> > > > > > > > if I do that tapestry warns me and says;
> > > > > > > > "Decorator methods must a parameter for the service delegate (i.e.,
> > > > > > > > the object the created interceptor will delegate to). Method
> > > > > > > > net.keso.ted.peng5.services.Peng5Module.decorateDAOService(Class, DAO,
> > > > > > > > Session) does not include such a parameter, and has been ignored.null"
> > > > > > > >
> > > > > > > > also, "null"? If I remember correctly all warning messages I get ends
> > > > > > > > with "null" :)
> > > > > > > >
> > > > > > > > --
> > > > > > > > /ted
> > > > > > > >
> > > > > > > > ---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> > > > > > > > For additional commands, e-mail: dev-help@tapestry.apache.org
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > Howard M. Lewis Ship
> > > > > > > TWD Consulting, Inc.
> > > > > > > Independent J2EE / Open-Source Java Consultant
> > > > > > > Creator and PMC Chair, Apache Tapestry
> > > > > > > Creator, Apache HiveMind
> > > > > > >
> > > > > > > Professional Tapestry training, mentoring, support
> > > > > > > and project work.  http://howardlewisship.com
> > > > > > >
> > > > > > > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> > > > > > > For additional commands, e-mail: dev-help@tapestry.apache.org
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > /ted
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > /ted
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> > > > > For additional commands, e-mail: dev-help@tapestry.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Howard M. Lewis Ship
> > > > TWD Consulting, Inc.
> > > > Independent J2EE / Open-Source Java Consultant
> > > > Creator and PMC Chair, Apache Tapestry
> > > > Creator, Apache HiveMind
> > > >
> > > > Professional Tapestry training, mentoring, support
> > > > and project work.  http://howardlewisship.com
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> > > > For additional commands, e-mail: dev-help@tapestry.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > > /ted
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: dev-help@tapestry.apache.org
> > >
> > >
> >
> >
> > --
> > Howard M. Lewis Ship
> > TWD Consulting, Inc.
> > Independent J2EE / Open-Source Java Consultant
> > Creator and PMC Chair, Apache Tapestry
> > Creator, Apache HiveMind
> >
> > Professional Tapestry training, mentoring, support
> > and project work.  http://howardlewisship.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: dev-help@tapestry.apache.org
> >
> >
>
>
> --
> /ted
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: T5-ioc: Decorator targeting specific interface

Posted by Ted Steen <te...@gmail.com>.
Java build 1.6.0-b105 on Windows XP.
Eclipse 3.2.1 internal compiler compiles it all I guess.

2007/2/22, Howard Lewis Ship <hl...@gmail.com>:
> It's wierd, because Tapestry IoC is not that picky: it wants to see a
> parameter who type matches the service interface type, DAO.
>
> What's your environment?  JDK, O/S, etc.?
>
> On 2/21/07, Ted Steen <te...@gmail.com> wrote:
> > DAO is an interface
> >
> > as in the example i posted earlier,
> >
> > public static DAO decorateDAOService(Class<DAO> serviceInterface, DAO
> > delegate, Session session);
> >
> > but, as I said, when the warning comes it says
> > "Decorator methods must a parameter for the service delegate (i.e.,
> > the object the created interceptor will delegate to). Method
> > net.keso.ted.peng5.services.Peng5Module.decorateDAOService(Class, DAO,
> > Session) does not include such a parameter, and has been ignored.null"
> >
> > it says Class not Class<DAO> so the serviceInterface doesnt "match"
> > the delegate.
> >
> >
> > 2007/2/22, Howard Lewis Ship <hl...@gmail.com>:
> > > I think that Tapestry IoC is trying to insist that the parameter be an
> > > interface.  Do you have a DAO base class, or a DAO interface?
> > >
> > > On 2/21/07, Ted Steen <te...@gmail.com> wrote:
> > > > I guess there maybe could be a problem with the ordering of
> > > > decoration, but it is nice to not having to rely on name-magic with
> > > > @Match
> > > >
> > > > 2007/2/21, Ted Steen <te...@gmail.com>:
> > > > > I tried this (where GenericDAO is an interface),
> > > > >
> > > > > public static DAO decorateDAOService(Class<DAO> serviceInterface, DAO
> > > > > delegate, Session session);
> > > > >
> > > > > I think it complains because according to the warning message the
> > > > > serviceInterface is just a Class, not a Class<DAO> and the delegate is
> > > > > a DAO. so they dont match.
> > > > >
> > > > > it would be neat to be able to target a specific interface... :>
> > > > >
> > > > >
> > > > > 2007/2/21, Howard Lewis Ship <hl...@gmail.com>:
> > > > > > I think it's complaining because the T ends up being java.lang.Object,
> > > > > > which isn't an interface.
> > > > > >
> > > > > > Don't know about the null, though.null
> > > > > >
> > > > > >
> > > > > >
> > > > > > ;-)
> > > > > >
> > > > > > On 2/21/07, Ted Steen <te...@gmail.com> wrote:
> > > > > > > Hi,
> > > > > > >
> > > > > > > I was wondering why it is not possible to decorate services with a
> > > > > > > specific interface like this;
> > > > > > >
> > > > > > > public static <T extends DAO> T decorateDAOService(Class<T>
> > > > > > > serviceInterface, T delegate, Session session)
> > > > > > >
> > > > > > > if I do that tapestry warns me and says;
> > > > > > > "Decorator methods must a parameter for the service delegate (i.e.,
> > > > > > > the object the created interceptor will delegate to). Method
> > > > > > > net.keso.ted.peng5.services.Peng5Module.decorateDAOService(Class, DAO,
> > > > > > > Session) does not include such a parameter, and has been ignored.null"
> > > > > > >
> > > > > > > also, "null"? If I remember correctly all warning messages I get ends
> > > > > > > with "null" :)
> > > > > > >
> > > > > > > --
> > > > > > > /ted
> > > > > > >
> > > > > > > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> > > > > > > For additional commands, e-mail: dev-help@tapestry.apache.org
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Howard M. Lewis Ship
> > > > > > TWD Consulting, Inc.
> > > > > > Independent J2EE / Open-Source Java Consultant
> > > > > > Creator and PMC Chair, Apache Tapestry
> > > > > > Creator, Apache HiveMind
> > > > > >
> > > > > > Professional Tapestry training, mentoring, support
> > > > > > and project work.  http://howardlewisship.com
> > > > > >
> > > > > > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> > > > > > For additional commands, e-mail: dev-help@tapestry.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > /ted
> > > > >
> > > >
> > > >
> > > > --
> > > > /ted
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> > > > For additional commands, e-mail: dev-help@tapestry.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > > Howard M. Lewis Ship
> > > TWD Consulting, Inc.
> > > Independent J2EE / Open-Source Java Consultant
> > > Creator and PMC Chair, Apache Tapestry
> > > Creator, Apache HiveMind
> > >
> > > Professional Tapestry training, mentoring, support
> > > and project work.  http://howardlewisship.com
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: dev-help@tapestry.apache.org
> > >
> > >
> >
> >
> > --
> > /ted
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: dev-help@tapestry.apache.org
> >
> >
>
>
> --
> Howard M. Lewis Ship
> TWD Consulting, Inc.
> Independent J2EE / Open-Source Java Consultant
> Creator and PMC Chair, Apache Tapestry
> Creator, Apache HiveMind
>
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>


-- 
/ted

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: T5-ioc: Decorator targeting specific interface

Posted by Howard Lewis Ship <hl...@gmail.com>.
It's wierd, because Tapestry IoC is not that picky: it wants to see a
parameter who type matches the service interface type, DAO.

What's your environment?  JDK, O/S, etc.?

On 2/21/07, Ted Steen <te...@gmail.com> wrote:
> DAO is an interface
>
> as in the example i posted earlier,
>
> public static DAO decorateDAOService(Class<DAO> serviceInterface, DAO
> delegate, Session session);
>
> but, as I said, when the warning comes it says
> "Decorator methods must a parameter for the service delegate (i.e.,
> the object the created interceptor will delegate to). Method
> net.keso.ted.peng5.services.Peng5Module.decorateDAOService(Class, DAO,
> Session) does not include such a parameter, and has been ignored.null"
>
> it says Class not Class<DAO> so the serviceInterface doesnt "match"
> the delegate.
>
>
> 2007/2/22, Howard Lewis Ship <hl...@gmail.com>:
> > I think that Tapestry IoC is trying to insist that the parameter be an
> > interface.  Do you have a DAO base class, or a DAO interface?
> >
> > On 2/21/07, Ted Steen <te...@gmail.com> wrote:
> > > I guess there maybe could be a problem with the ordering of
> > > decoration, but it is nice to not having to rely on name-magic with
> > > @Match
> > >
> > > 2007/2/21, Ted Steen <te...@gmail.com>:
> > > > I tried this (where GenericDAO is an interface),
> > > >
> > > > public static DAO decorateDAOService(Class<DAO> serviceInterface, DAO
> > > > delegate, Session session);
> > > >
> > > > I think it complains because according to the warning message the
> > > > serviceInterface is just a Class, not a Class<DAO> and the delegate is
> > > > a DAO. so they dont match.
> > > >
> > > > it would be neat to be able to target a specific interface... :>
> > > >
> > > >
> > > > 2007/2/21, Howard Lewis Ship <hl...@gmail.com>:
> > > > > I think it's complaining because the T ends up being java.lang.Object,
> > > > > which isn't an interface.
> > > > >
> > > > > Don't know about the null, though.null
> > > > >
> > > > >
> > > > >
> > > > > ;-)
> > > > >
> > > > > On 2/21/07, Ted Steen <te...@gmail.com> wrote:
> > > > > > Hi,
> > > > > >
> > > > > > I was wondering why it is not possible to decorate services with a
> > > > > > specific interface like this;
> > > > > >
> > > > > > public static <T extends DAO> T decorateDAOService(Class<T>
> > > > > > serviceInterface, T delegate, Session session)
> > > > > >
> > > > > > if I do that tapestry warns me and says;
> > > > > > "Decorator methods must a parameter for the service delegate (i.e.,
> > > > > > the object the created interceptor will delegate to). Method
> > > > > > net.keso.ted.peng5.services.Peng5Module.decorateDAOService(Class, DAO,
> > > > > > Session) does not include such a parameter, and has been ignored.null"
> > > > > >
> > > > > > also, "null"? If I remember correctly all warning messages I get ends
> > > > > > with "null" :)
> > > > > >
> > > > > > --
> > > > > > /ted
> > > > > >
> > > > > > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> > > > > > For additional commands, e-mail: dev-help@tapestry.apache.org
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Howard M. Lewis Ship
> > > > > TWD Consulting, Inc.
> > > > > Independent J2EE / Open-Source Java Consultant
> > > > > Creator and PMC Chair, Apache Tapestry
> > > > > Creator, Apache HiveMind
> > > > >
> > > > > Professional Tapestry training, mentoring, support
> > > > > and project work.  http://howardlewisship.com
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> > > > > For additional commands, e-mail: dev-help@tapestry.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > /ted
> > > >
> > >
> > >
> > > --
> > > /ted
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: dev-help@tapestry.apache.org
> > >
> > >
> >
> >
> > --
> > Howard M. Lewis Ship
> > TWD Consulting, Inc.
> > Independent J2EE / Open-Source Java Consultant
> > Creator and PMC Chair, Apache Tapestry
> > Creator, Apache HiveMind
> >
> > Professional Tapestry training, mentoring, support
> > and project work.  http://howardlewisship.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: dev-help@tapestry.apache.org
> >
> >
>
>
> --
> /ted
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>


-- 
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: T5-ioc: Decorator targeting specific interface

Posted by Ted Steen <te...@gmail.com>.
DAO is an interface

as in the example i posted earlier,

public static DAO decorateDAOService(Class<DAO> serviceInterface, DAO
delegate, Session session);

but, as I said, when the warning comes it says
"Decorator methods must a parameter for the service delegate (i.e.,
the object the created interceptor will delegate to). Method
net.keso.ted.peng5.services.Peng5Module.decorateDAOService(Class, DAO,
Session) does not include such a parameter, and has been ignored.null"

it says Class not Class<DAO> so the serviceInterface doesnt "match"
the delegate.


2007/2/22, Howard Lewis Ship <hl...@gmail.com>:
> I think that Tapestry IoC is trying to insist that the parameter be an
> interface.  Do you have a DAO base class, or a DAO interface?
>
> On 2/21/07, Ted Steen <te...@gmail.com> wrote:
> > I guess there maybe could be a problem with the ordering of
> > decoration, but it is nice to not having to rely on name-magic with
> > @Match
> >
> > 2007/2/21, Ted Steen <te...@gmail.com>:
> > > I tried this (where GenericDAO is an interface),
> > >
> > > public static DAO decorateDAOService(Class<DAO> serviceInterface, DAO
> > > delegate, Session session);
> > >
> > > I think it complains because according to the warning message the
> > > serviceInterface is just a Class, not a Class<DAO> and the delegate is
> > > a DAO. so they dont match.
> > >
> > > it would be neat to be able to target a specific interface... :>
> > >
> > >
> > > 2007/2/21, Howard Lewis Ship <hl...@gmail.com>:
> > > > I think it's complaining because the T ends up being java.lang.Object,
> > > > which isn't an interface.
> > > >
> > > > Don't know about the null, though.null
> > > >
> > > >
> > > >
> > > > ;-)
> > > >
> > > > On 2/21/07, Ted Steen <te...@gmail.com> wrote:
> > > > > Hi,
> > > > >
> > > > > I was wondering why it is not possible to decorate services with a
> > > > > specific interface like this;
> > > > >
> > > > > public static <T extends DAO> T decorateDAOService(Class<T>
> > > > > serviceInterface, T delegate, Session session)
> > > > >
> > > > > if I do that tapestry warns me and says;
> > > > > "Decorator methods must a parameter for the service delegate (i.e.,
> > > > > the object the created interceptor will delegate to). Method
> > > > > net.keso.ted.peng5.services.Peng5Module.decorateDAOService(Class, DAO,
> > > > > Session) does not include such a parameter, and has been ignored.null"
> > > > >
> > > > > also, "null"? If I remember correctly all warning messages I get ends
> > > > > with "null" :)
> > > > >
> > > > > --
> > > > > /ted
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> > > > > For additional commands, e-mail: dev-help@tapestry.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Howard M. Lewis Ship
> > > > TWD Consulting, Inc.
> > > > Independent J2EE / Open-Source Java Consultant
> > > > Creator and PMC Chair, Apache Tapestry
> > > > Creator, Apache HiveMind
> > > >
> > > > Professional Tapestry training, mentoring, support
> > > > and project work.  http://howardlewisship.com
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> > > > For additional commands, e-mail: dev-help@tapestry.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > > /ted
> > >
> >
> >
> > --
> > /ted
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: dev-help@tapestry.apache.org
> >
> >
>
>
> --
> Howard M. Lewis Ship
> TWD Consulting, Inc.
> Independent J2EE / Open-Source Java Consultant
> Creator and PMC Chair, Apache Tapestry
> Creator, Apache HiveMind
>
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>


-- 
/ted

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: T5-ioc: Decorator targeting specific interface

Posted by Howard Lewis Ship <hl...@gmail.com>.
I think that Tapestry IoC is trying to insist that the parameter be an
interface.  Do you have a DAO base class, or a DAO interface?

On 2/21/07, Ted Steen <te...@gmail.com> wrote:
> I guess there maybe could be a problem with the ordering of
> decoration, but it is nice to not having to rely on name-magic with
> @Match
>
> 2007/2/21, Ted Steen <te...@gmail.com>:
> > I tried this (where GenericDAO is an interface),
> >
> > public static DAO decorateDAOService(Class<DAO> serviceInterface, DAO
> > delegate, Session session);
> >
> > I think it complains because according to the warning message the
> > serviceInterface is just a Class, not a Class<DAO> and the delegate is
> > a DAO. so they dont match.
> >
> > it would be neat to be able to target a specific interface... :>
> >
> >
> > 2007/2/21, Howard Lewis Ship <hl...@gmail.com>:
> > > I think it's complaining because the T ends up being java.lang.Object,
> > > which isn't an interface.
> > >
> > > Don't know about the null, though.null
> > >
> > >
> > >
> > > ;-)
> > >
> > > On 2/21/07, Ted Steen <te...@gmail.com> wrote:
> > > > Hi,
> > > >
> > > > I was wondering why it is not possible to decorate services with a
> > > > specific interface like this;
> > > >
> > > > public static <T extends DAO> T decorateDAOService(Class<T>
> > > > serviceInterface, T delegate, Session session)
> > > >
> > > > if I do that tapestry warns me and says;
> > > > "Decorator methods must a parameter for the service delegate (i.e.,
> > > > the object the created interceptor will delegate to). Method
> > > > net.keso.ted.peng5.services.Peng5Module.decorateDAOService(Class, DAO,
> > > > Session) does not include such a parameter, and has been ignored.null"
> > > >
> > > > also, "null"? If I remember correctly all warning messages I get ends
> > > > with "null" :)
> > > >
> > > > --
> > > > /ted
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> > > > For additional commands, e-mail: dev-help@tapestry.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > > Howard M. Lewis Ship
> > > TWD Consulting, Inc.
> > > Independent J2EE / Open-Source Java Consultant
> > > Creator and PMC Chair, Apache Tapestry
> > > Creator, Apache HiveMind
> > >
> > > Professional Tapestry training, mentoring, support
> > > and project work.  http://howardlewisship.com
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: dev-help@tapestry.apache.org
> > >
> > >
> >
> >
> > --
> > /ted
> >
>
>
> --
> /ted
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>


-- 
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: T5-ioc: Decorator targeting specific interface

Posted by Ted Steen <te...@gmail.com>.
I guess there maybe could be a problem with the ordering of
decoration, but it is nice to not having to rely on name-magic with
@Match

2007/2/21, Ted Steen <te...@gmail.com>:
> I tried this (where GenericDAO is an interface),
>
> public static DAO decorateDAOService(Class<DAO> serviceInterface, DAO
> delegate, Session session);
>
> I think it complains because according to the warning message the
> serviceInterface is just a Class, not a Class<DAO> and the delegate is
> a DAO. so they dont match.
>
> it would be neat to be able to target a specific interface... :>
>
>
> 2007/2/21, Howard Lewis Ship <hl...@gmail.com>:
> > I think it's complaining because the T ends up being java.lang.Object,
> > which isn't an interface.
> >
> > Don't know about the null, though.null
> >
> >
> >
> > ;-)
> >
> > On 2/21/07, Ted Steen <te...@gmail.com> wrote:
> > > Hi,
> > >
> > > I was wondering why it is not possible to decorate services with a
> > > specific interface like this;
> > >
> > > public static <T extends DAO> T decorateDAOService(Class<T>
> > > serviceInterface, T delegate, Session session)
> > >
> > > if I do that tapestry warns me and says;
> > > "Decorator methods must a parameter for the service delegate (i.e.,
> > > the object the created interceptor will delegate to). Method
> > > net.keso.ted.peng5.services.Peng5Module.decorateDAOService(Class, DAO,
> > > Session) does not include such a parameter, and has been ignored.null"
> > >
> > > also, "null"? If I remember correctly all warning messages I get ends
> > > with "null" :)
> > >
> > > --
> > > /ted
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> > > For additional commands, e-mail: dev-help@tapestry.apache.org
> > >
> > >
> >
> >
> > --
> > Howard M. Lewis Ship
> > TWD Consulting, Inc.
> > Independent J2EE / Open-Source Java Consultant
> > Creator and PMC Chair, Apache Tapestry
> > Creator, Apache HiveMind
> >
> > Professional Tapestry training, mentoring, support
> > and project work.  http://howardlewisship.com
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: dev-help@tapestry.apache.org
> >
> >
>
>
> --
> /ted
>


-- 
/ted

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: T5-ioc: Decorator targeting specific interface

Posted by Ted Steen <te...@gmail.com>.
I tried this (where GenericDAO is an interface),

public static DAO decorateDAOService(Class<DAO> serviceInterface, DAO
delegate, Session session);

I think it complains because according to the warning message the
serviceInterface is just a Class, not a Class<DAO> and the delegate is
a DAO. so they dont match.

it would be neat to be able to target a specific interface... :>


2007/2/21, Howard Lewis Ship <hl...@gmail.com>:
> I think it's complaining because the T ends up being java.lang.Object,
> which isn't an interface.
>
> Don't know about the null, though.null
>
>
>
> ;-)
>
> On 2/21/07, Ted Steen <te...@gmail.com> wrote:
> > Hi,
> >
> > I was wondering why it is not possible to decorate services with a
> > specific interface like this;
> >
> > public static <T extends DAO> T decorateDAOService(Class<T>
> > serviceInterface, T delegate, Session session)
> >
> > if I do that tapestry warns me and says;
> > "Decorator methods must a parameter for the service delegate (i.e.,
> > the object the created interceptor will delegate to). Method
> > net.keso.ted.peng5.services.Peng5Module.decorateDAOService(Class, DAO,
> > Session) does not include such a parameter, and has been ignored.null"
> >
> > also, "null"? If I remember correctly all warning messages I get ends
> > with "null" :)
> >
> > --
> > /ted
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: dev-help@tapestry.apache.org
> >
> >
>
>
> --
> Howard M. Lewis Ship
> TWD Consulting, Inc.
> Independent J2EE / Open-Source Java Consultant
> Creator and PMC Chair, Apache Tapestry
> Creator, Apache HiveMind
>
> Professional Tapestry training, mentoring, support
> and project work.  http://howardlewisship.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>


-- 
/ted

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: T5-ioc: Decorator targeting specific interface

Posted by Howard Lewis Ship <hl...@gmail.com>.
I think it's complaining because the T ends up being java.lang.Object,
which isn't an interface.

Don't know about the null, though.null



;-)

On 2/21/07, Ted Steen <te...@gmail.com> wrote:
> Hi,
>
> I was wondering why it is not possible to decorate services with a
> specific interface like this;
>
> public static <T extends DAO> T decorateDAOService(Class<T>
> serviceInterface, T delegate, Session session)
>
> if I do that tapestry warns me and says;
> "Decorator methods must a parameter for the service delegate (i.e.,
> the object the created interceptor will delegate to). Method
> net.keso.ted.peng5.services.Peng5Module.decorateDAOService(Class, DAO,
> Session) does not include such a parameter, and has been ignored.null"
>
> also, "null"? If I remember correctly all warning messages I get ends
> with "null" :)
>
> --
> /ted
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>


-- 
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org