Em Fri, 11 Dec 2009 10:23:11 -0200, Jim O'Callaghan
<jc1000...@yahoo.co.uk> escreveu:
Hi,
Hi!
I have a service bound to an interface in the ioc registry. The
interface extends another interface and duplicates a method name and
parameter list
however the return type in the overridden method is a concrete class
rather than an implementing interface, as specified in the super
interface ex.:
Tapestry-IoC create proxies around your service implementations, so, when
you @Inject UserEntityManager, the object your receive is proxy that
implements UserEntityManager, not BaseEntityManager. This means that the
proxy will invoke a method that returns IPersistentObject, not User.
This is to reduce the need for explicit casting around the application.
This doesn't seem right to me. You shouldn't rely on an specific
implementation of a given interface. If you need, why return an interface
in first place?
--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,
and instructor
Owner, software architect and developer, Ars Machina Tecnologia da
Informação Ltda.
http://www.arsmachina.com.br
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org