Let's say I've got this service (X) and an implemention of that service (Y) contained in a composite block (Z). As such, service (X) is exported out of block (Y).
Let's say I've got another composite block (A) that contains a component (B) that depends on service (X).
Now, the implementation of X, that is, component Y has a toString() method, which of course is not part of the interface described by service X.
During the execution of component B, it obtains via ServiceManager lookup, a reference to service X (which, in fact, is an instance of component Y). Subsequently, B executes the following code:
getLogger().info(X.toString())
which compiles and executes fine, but the log does not show what I expected (that is the implementation of Y's toString()), but instead the logs what I presume to be the interface X's toString() implementation (or maybe this component's proxy's implementation):
block:/my-container/Z
where "my-container" is the name of my composite container descriptor, and Z is the name of the composite block of my provider service.
Why is the toString of the implementation of my service not invoked? Does something like toString, which I thought was part of every Object and thus subject to be overridden by any object instance, have to be part of the service interface in order to be properly invoked by some consumer component?
Timothy
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
