Hi Sameera, On Wed, Jan 19, 2011 at 10:17 PM, Shammi Jayasinghe <[email protected]> wrote:
> > > On Wed, Jan 19, 2011 at 7:44 PM, Sameera Jayasoma <[email protected]>wrote: > >> On Tuesday, January 18, 2011, Shammi Jayasinghe <[email protected]> wrote: >> > Hi , >> > >> > In the process of providing multi tenant support for CEP , there are two >> components (broker-manager and cep) that are needed to implement the >> interface Axis2ConfigurationContextObserver. >> > In that case, i need to control the order of invoking of these >> implementations since CEP is depend on broker-manager and , broker manager >> has to load some resources from registry which are needed for CEP. >> > >> > >> > What is the possible way to do this ? >> >> Yea this is possible, this pattern is a common one in the carbon platform. >> >> You can implement this interface(Axis2ConfigurationContextObserver) in >> the broker manager component and register it as an OSGi service. When >> a new tenant is created, this service will be notified. This is the >> white-board pattern that we have followed. Then you do all the work in >> the broker manager component. Now you need to register another OSGi >> service(say X) from the broker manager component. CEP component should >> be listening to X services. When an X service is available, CEP >> component will be triggered. This way you can order the initialization >> of components. >> > Yes, you are indeed correct. But, IMHO, that's a workaround. You are using the flexibility of OSGi services to implement an ordering which should have been managed at some other level. And, here's a problem: If you were ever going to add something in between X and CEP, you need to change the whole algorithm, isn't it? In UM, IIRC, we do nearly the same thing but we allow users to define a sequence number, so that they can enforce an ordering. Sequence numbers need not be consecutive. So, if you ever wanted to introduce something in between, you can add a number in-between. WDYT about this approach? Thanks, Senaka. > > Hi Sameera, > > Actually CEP is depend on Broker-Manager and already Broker Manager > publishes an OSGI Service and > CEP triggered after that. This thing happen when the server is getting > started, but what i want is some thing like bellow; > > -> Server is up and running > -> Tenant A logs in to the system > -> Broker manager loads broker configuration details specific to tenant A > from Tenant A's registry > -> CEP creates buckets for Tenant A ,using Tenant A's configuration details > loaded by broker - manager component > > In the above case invoking for the implementation of > Axis2ConfigurationContextObserver of broker-manager should happen > before the implementation of CEP. > > Thanks > > >> Thanks, >> Sameera. >> > >> > Thanks >> > -- >> > Best Regards, >> > >> > Shammi Jayasinghe >> > Senior Software Engineer; WSO2, Inc.; http://wso2.com, >> > mobile: +94 71 4493085 >> > >> > >> > >> >> -- >> Sameera Jayasoma >> Technical Lead and Product Manager, WSO2 Carbon >> >> WSO2, Inc. (http://wso2.com) >> email: [email protected] >> blog: http://tech.jayasoma.org >> >> Lean . Enterprise . Middleware >> _______________________________________________ >> Carbon-dev mailing list >> [email protected] >> https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev >> > > > > -- > Best Regards,* > > Shammi Jayasinghe* > Senior Software Engineer; WSO2, Inc.; http://wso2.com, > mobile: +94 71 4493085 > > > > _______________________________________________ > Carbon-dev mailing list > [email protected] > https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev > > -- *Senaka Fernando* Product Manager - WSO2 Governance Registry; Associate Technical Lead; WSO2, Inc.; http://wso2.com* Member; Apache Software Foundation; http://apache.org E-mail: senaka AT wso2.com **P: +1 408 754 7388; ext: 51736*; *M: +94 77 322 1818 Linked-In: http://www.linkedin.com/in/senakafernando *Lean . Enterprise . Middleware
_______________________________________________ Carbon-dev mailing list [email protected] https://wso2.org/cgi-bin/mailman/listinfo/carbon-dev
