Nipun, May be you need to try it in a clustered environment or at least clustering enabled. I assume you tried this with a single server.
On Wed, Jan 20, 2016 at 9:42 AM, Nipuna Prashan <[email protected]> wrote: > Hi Krishanthan, > > Cloud team has developed three osgi components to delete tenants, but > tenant deletion has to be done manually by adding components to > dropping folder when we want to start tenant deletion. Now, my project > is to automate this process by making one osgi component for every > server and the component will be in the server every time. > > AxisConfiguration serverAxisConfig = > > ServiceHolder.getConfigurationContextService().getServerConfigContext().getAxisConfiguration(); > ClusteringAgent agent = serverAxisConfig.getClusteringAgent(); > boolean isCoordinator = agent.isCoordinator(); > > I tried this, but this always returns false. > > On Tue, Jan 19, 2016 at 9:08 PM, Kishanthan Thangarajah > <[email protected]> wrote: > > IIRC, we already have a way (tool) to delete tenants in a cluster which > is > > used by cloud team. So what's the requirement for this component here? > > > > With hazelcast based clustering, we assume that the first (oldest) > member as > > the coordinator for the cluster. We set this member as the coordinator > and > > you can check whether the current node is the coordinator using > > ClusteringAgent#isCoordinator method. > > > > On Mon, Jan 18, 2016 at 6:24 PM, Nipuna Prashan <[email protected]> > wrote: > >> > >> Hi all, > >> > >> I am building an osgi component for tenant deletion task. This will be > >> deployed in every server (APIM, AS, AF, BAM, IS..). I have a > requirement to > >> do this task in one node in the cluster while there is no single point > of > >> failure. Only one node should start deletion while other nodes waiting > on > >> the same server. > >> Is there a way to find the leader node/ contributor in a cluster? Any > help > >> would be appreciated. > >> > >> > >> > >> -- > >> Nipuna Prashan > >> Software Engineering Intern > >> +94711852792 > > > > > > > > > > -- > > Kishanthan Thangarajah > > Associate Technical Lead, > > Platform Technologies Team, > > WSO2, Inc. > > lean.enterprise.middleware > > > > Mobile - +94773426635 > > Blog - http://kishanthan.wordpress.com > > Twitter - http://twitter.com/kishanthan > > > > -- > Nipuna Prashan > Software Engineering Intern > +94711852792 > -- *Amila Maharachchi* Senior Technical Lead WSO2, Inc.; http://wso2.com Blog: http://maharachchi.blogspot.com Mobile: +94719371446
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
