Hi Asanka,
I what is in my mind is ex: the Spring Bean that we populate as a mediator
from the Spring config  has a feild of a Interface Type and at the Run time
users change the implementation object type using a Admin Console.And when
we shutdown the Synapse we need to  Serialise that.So what i did was wrote a
algorithem to traverse through Spring Beans Object Structure and make a
Spring XML for that and put it in the work/temp directory so users can
change there Spring xml in Registry/File by looking at it if it is need.

But Yes I have a doubt that is it a requrement of Synapse.Thats why i didnt
created  a jira.
I'll attach a sample class to relflect my idea clearly.

Btw Thank you for the reply and shairing your ideas.I m bit new to synapse
so  i m not sure this senario is a problem synapse(a use case).

Thank you,
Charith

On Mon, Feb 16, 2009 at 6:37 PM, Asankha C. Perera <[email protected]>wrote:

> Hi Charith
>
>> I have notices that Synapse Spring Mediator does not have a serializer for
>> the Spring Bean that is exposed as a Mediator (Spring Bean --> Spring XML
>> configuration file).
>> I have written a Spring Serializer that  will serilaze the Spring Bean
>> Mediator to Spring xml.
>>
>> If this is a useful scenario to Synapse i can make a jira and put it as a
>> patch.
>> Please send your ideas regarding this i have attach a patch for that .
>>
> I haven't looked at this in detail yet.. but a Synapse configuration using
> the Spring mediator loads the spring config from some file/Registry resource
> etc.. but never modifies it AFAIK. So would there be a requirement to
> serialize this back again?
>



>
> cheers
> asankha
>
> --
> Asankha C. Perera
> http://adroitlogic.org
>
> http://esbmagic.blogspot.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


-- 
Charith Dhanushka Wickramarachchi
http://charithwiki.blogspot.com/
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.synapse.MessageContext;
import org.apache.synapse.mediators.AbstractMediator;
import java.util.List;
public interface Custom{
 public abstract void doSomething();
}

class Sample extends AbstractMediator {
    List<Custom> list;
    

    public List<Custom> getList(){
	return list;
    }

    public void setList(List<Custom> list) {
        this.list=list;
    }

    /*This will log the username email that is initialised from Spring xml*/
    public boolean mediate(MessageContext synCtx) {
	for(Custom c:list){
		c.doSomething(synCtx);
	}
        return true;
    }
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to