I deprecated the WSO2Constants class to discourage people from using it. At
present, we have CarbonConstants, WSO2Constants, ServerConstants ,
MultitenantConstants and so many more. We will have to sit down & review
these constants & properly cleanup the code.

Azeez

On Tue, Jun 1, 2010 at 12:57 PM, Anjana Fernando <[email protected]> wrote:

> Hi,
>
> Thanks Nuwan. Yeah, actually my need was to use it inside an admin
> service, "getConfigSystemRegistry" will do fine. As for the
> "WSO2Constants.CONFIG_SYSTEM_REGISTRY_INSTANCE", that was my initial
> problem, that is where to find an non-deprecated version of that
> constant. Because I see that it is still used in some places.
>
> Cheers,
> Anjana.
>
> On Tue, Jun 1, 2010 at 12:43 PM, Nuwan Bandara <[email protected]> wrote:
> > Hi Anjana,
> >
> > There are several ways to get the registry, in Dashboard we use two
> methods
> > in different contexts,
> >
> > [1] Via a declarative service we can obtain the registry service (If you
> > need the registry at bundle startup)
> >
> >  * @scr.reference name="registry.service"
> >  * interface="org.wso2.carbon.registry.core.service.RegistryService"
> >  * cardinality="1..1"
> >  * policy="dynamic"
> >  * bind="setRegistryService"
> >  * unbind="unsetRegistryService"
> >
> > [2] If its an admin service you can extend that from AbstractAdmin, and
> > there is a method to obtain the config registry
> (getConfigSystemRegistry()).
> >
> > However if both of that doesn't work for you and if you need to get it
> via
> > Axis config, I think you can do it the way you have mentioned. even in
> > AbstractAdmin, its taken as
> >
> > AbstratcAdmin.java:119 - (Registry)
> >
> getAxisConfig().getParameterValue(WSO2Constants.CONFIG_SYSTEM_REGISTRY_INSTANCE);
> >
> > The constant is deprecated IMO, Azeez, suggested to move all the
> constants
> > to one Appropriate place, hence there were duplicates found in
> > RegistryConstants, CarbonConstants and MultitenantConstants.
> >
> > Regards
> > /Nuwan
> >
> > On Tue, Jun 1, 2010 at 10:57 AM, Anjana Fernando <[email protected]>
> wrote:
> >>
> >> Hi,
> >>
> >> It seems that the class "WSO2Constants" has been deprecated. But I
> >> cannot find the new place where the variable
> >> "CONFIG_SYSTEM_REGISTRY_INSTANCE" is defined.
> >> I'm currently getting the specific registry instance using the
> following,
> >>
> >>
> "axisConfiguration().getParameterValue(WSO2Constants.CONFIG_SYSTEM_REGISTRY_INSTANCE)".
> >> Is there an alternate way to do this? ..
> >>
> >> Cheers,
> >> Anjana.
> >>
> >> --
> >> Anjana Fernando
> >> Software Engineer
> >> WSO2, Inc.; http://wso2.com
> >> lean.enterprise.middleware
> >>
> >> _______________________________________________
> >> Carbon-dev mailing list
> >> [email protected]
> >> https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
> >
> >
> >
> > --
> > Nuwan Bandara
> > Software Engineer
> > WSO2 Inc. | http://wso2.com
> > lean . enterprise . middleware
> >
> > http://www.nuwanbando.com
> >
> > _______________________________________________
> > Carbon-dev mailing list
> > [email protected]
> > https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
> >
> >
>
>
>
> --
> Anjana Fernando
> Software Engineer
> WSO2, Inc.; http://wso2.com
> lean.enterprise.middleware
>
> _______________________________________________
> Carbon-dev mailing list
> [email protected]
> https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>



-- 
Afkham Azeez
Senior Software Architect & Product Manager, WSO2 WSAS; WSO2, Inc.;
http://wso2.com, Lean . Enterprise . Middleware
Member; Apache Software Foundation; http://www.apache.org/
email: [email protected] cell: +94 77 3320919
blog: http://blog.afkham.org
twitter: http://twitter.com/afkham_azeez
linked-in: http://lk.linkedin.com/in/afkhamazeez
_______________________________________________
Carbon-dev mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev

Reply via email to