You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hivemind.apache.org by "David J. M. Karlsen" <da...@davidkarlsen.com> on 2005/05/11 13:56:55 UTC
toString() method disappearing
Hi!
I have some services that I get from HM. They all extend a common class
which implements the toString() method (using ToStringBuilder inside).
If I don't use HiveMind the toString() from the extended class will be
called, if I obtain the ifaces through HM services, toString() does
nearly nothing (i certainly does not call the parent-class' toString()
method). I guess this is a bug!? How can I work around it?
David
--
David J. M. Karlsen - +47 90 68 22 43
http://www.davidkarlsen.com
http://mp3.davidkarlsen.com
---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org
Fwd: toString() method disappearing
Posted by Howard Lewis Ship <hl...@gmail.com>.
As James said, its the Proxy that gets the toString() implementation,
not the core service implementation.
The other methods you mentioned are not implemented by the Proxy or
passed on to the core service implementation.
The idea is to be able to get (in the debugger) a good idea of what
the mysterious $FooProxy_18433128aqb4587a class is.
http://howardlewisship.com/blog/2003/08/importance-of-tostring.html
What I don't support and will not allow is forcing the creation of the
CSI just to get its toString(). If that's important, toString() must
be part of the service interface.
On 5/11/05, James Carman <ja...@carmanconsulting.com> wrote:
> But, what you're dealing with is a proxy. It's not subclassing the impl
> class, unless you're using bean services.
>
> -----Original Message-----
> From: David J. M. Karlsen [mailto:david@davidkarlsen.com]
> Sent: Wednesday, May 11, 2005 8:53 AM
> To: hivemind-dev@jakarta.apache.org
> Subject: Re: toString() method disappearing
>
> Knut Wannheden wrote:
> > David,
> >
> > I remember something like this being discussed a few months back... Is
> > this what you mean?
> > http://thread.gmane.org/gmane.comp.jakarta.hivemind.devel/991
>
> Yeah, same problem, I get the <PooledInterceptor.....> stuff (and not
> much more than that). But I do not agree that this is a good/preferable
> solution. It clutters up the normal java-semantics (what happens to
> clone() finalize() and other Object methods?), and if HM absolutely
> *has* to ovverride the method, it should do it's own toString() first -
> and then call the parents toString().
>
> --
> David J. M. Karlsen - +47 90 68 22 43 http://www.davidkarlsen.com
> http://mp3.davidkarlsen.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org
>
>
--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
Professional Tapestry training, mentoring, support
and project work. http://howardlewisship.com
---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org
RE: toString() method disappearing
Posted by James Carman <ja...@carmanconsulting.com>.
But, what you're dealing with is a proxy. It's not subclassing the impl
class, unless you're using bean services.
-----Original Message-----
From: David J. M. Karlsen [mailto:david@davidkarlsen.com]
Sent: Wednesday, May 11, 2005 8:53 AM
To: hivemind-dev@jakarta.apache.org
Subject: Re: toString() method disappearing
Knut Wannheden wrote:
> David,
>
> I remember something like this being discussed a few months back... Is
> this what you mean?
> http://thread.gmane.org/gmane.comp.jakarta.hivemind.devel/991
Yeah, same problem, I get the <PooledInterceptor.....> stuff (and not
much more than that). But I do not agree that this is a good/preferable
solution. It clutters up the normal java-semantics (what happens to
clone() finalize() and other Object methods?), and if HM absolutely
*has* to ovverride the method, it should do it's own toString() first -
and then call the parents toString().
--
David J. M. Karlsen - +47 90 68 22 43 http://www.davidkarlsen.com
http://mp3.davidkarlsen.com
---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org
Re: toString() method disappearing
Posted by "David J. M. Karlsen" <da...@davidkarlsen.com>.
Knut Wannheden wrote:
> David,
>
> I remember something like this being discussed a few months back... Is
> this what you mean?
> http://thread.gmane.org/gmane.comp.jakarta.hivemind.devel/991
Yeah, same problem, I get the <PooledInterceptor.....> stuff (and not
much more than that). But I do not agree that this is a good/preferable
solution. It clutters up the normal java-semantics (what happens to
clone() finalize() and other Object methods?), and if HM absolutely
*has* to ovverride the method, it should do it's own toString() first -
and then call the parents toString().
--
David J. M. Karlsen - +47 90 68 22 43
http://www.davidkarlsen.com
http://mp3.davidkarlsen.com
---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org
Re: toString() method disappearing
Posted by Knut Wannheden <kn...@gmail.com>.
David,
I remember something like this being discussed a few months back... Is
this what you mean?
http://thread.gmane.org/gmane.comp.jakarta.hivemind.devel/991
--knut
On 5/11/05, David J. M. Karlsen <da...@davidkarlsen.com> wrote:
> David J. M. Karlsen wrote:
> > Hi!
> >
> > I have some services that I get from HM. They all extend a common class
> > which implements the toString() method (using ToStringBuilder inside).
> >
> > If I don't use HiveMind the toString() from the extended class will be
> > called, if I obtain the ifaces through HM services, toString() does
> > nearly nothing (i certainly does not call the parent-class' toString()
> > method). I guess this is a bug!? How can I work around it?
>
> OK - the workaround is to define the toString() method in the interfaces
> (it's a common interface that the parent class implements).
>
> But still, I don't think HM should override the toString() method with
> an "empty" one - especially when the toString() is overridden (not
> implemented by the java.lang.Object class, but by a subclass).
>
> --
> David J. M. Karlsen - +47 90 68 22 43
> http://www.davidkarlsen.com
> http://mp3.davidkarlsen.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org
Re: toString() method disappearing
Posted by "David J. M. Karlsen" <da...@davidkarlsen.com>.
David J. M. Karlsen wrote:
> Hi!
>
> I have some services that I get from HM. They all extend a common class
> which implements the toString() method (using ToStringBuilder inside).
>
> If I don't use HiveMind the toString() from the extended class will be
> called, if I obtain the ifaces through HM services, toString() does
> nearly nothing (i certainly does not call the parent-class' toString()
> method). I guess this is a bug!? How can I work around it?
OK - the workaround is to define the toString() method in the interfaces
(it's a common interface that the parent class implements).
But still, I don't think HM should override the toString() method with
an "empty" one - especially when the toString() is overridden (not
implemented by the java.lang.Object class, but by a subclass).
--
David J. M. Karlsen - +47 90 68 22 43
http://www.davidkarlsen.com
http://mp3.davidkarlsen.com
---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-dev-help@jakarta.apache.org