synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From indika kumara <indika.k...@gmail.com>
Subject Re: svn commit: r753144 - in /synapse/trunk/java/modules: core/src/main/java/org/apache/synapse/mediators/builtin/ core/src/main/java/org/apache/synapse/mediators/db/ core/src/main/java/org/apache/synapse/mediators/eip/aggregator/ core/src/main/java/
Date Mon, 16 Mar 2009 16:53:46 GMT
Hi All

Just now had a time to look at this.

Actually what I did from commit say by my commit log ‘remove
ManagedLifecycle from mediators that extends AbstractMediator as
AbstractMediator already implements ManagedLifecycle’. Actually, I
just replied to the thread as I have to replay as this related with
me. I just want to get rid if this thread as I had many works to do
and I really don’t care other things, when I have important things to
do.

I am trying to take design decision on this and I expect to get answer
for these.

1)	Is ‘ManagedLifecycle’ is a trick to allow mediators and others to
do require work related with initialization and destroy. Currently, I
can see only this as a trick.  Trick is still worked.
2)	Otherwise…. Synapse initiators came up with great set of
abstractions such as mediators, endpoints, tasks, registry, etc to
build an ESB using these abstractions. Then, they have thought that
these abstractions should be properly managed. Therefore, came up with
a new abstraction “Lifecycle Management” to enforce that.  If it is
the case, ‘implementers’ of this abstraction really misused concept of
design.
One:
There is no semantic validation. The “Lifecycle Management”
abstraction has great semantic and just naming ‘init’, ‘destroy’
cannot get this as it is just syntax. Abstractions are the ever greats
things that builds the any system. Currently, there is no
differentiating on calling a method based on ‘init’ or ‘destroy’ has
been already called or not on that. Definitely, it can get exceptions
like ‘NPE’ if ‘init’ had not been called. This is not semantic
validation but failure due to avoiding it. I can remind some
situations … As I remind some user has reported errors that have been
happened due to fact Mediators inside switch case, has not been
initiated. Another situation was occurred when using an indirect
endpoint (only for indirect endpoint) within in send mediator. Send
mediator’s init method did not get called and as a reason indirect
endpoint has been not initialized. Still, this kind of things possible
as any user can create custom mediators and there is no semantic
validation on “Lifecycle Management”. Actually, these are transient
failures - until get executed a particular code fragment failures are
hidden. There are the ever bad failures. All these are happened due to
fact there is no semantic validation on. There cannot be an
abstraction without semantic. Without semantic validation, it is just
a class for use to implements some trick.

Two:
There are no semantic enforcements. All initialized and not
initialized objects can be used together.

For the case two, I can only do refractor.

I just want to say the way I think about these and never want to prove
concerns of others are bad or good.

I may have said one to one. If it was happened it is completely due I
wanted get grid of this thread as I had many works to do.

Thanks
Indika

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


Mime
View raw message