Instead of that class, for privileged operations, you should use PrivilegedCarbonContext.
On Fri, Mar 7, 2014 at 11:22 AM, Chathura Ekanayake <[email protected]>wrote: > > Hi Subash, > > There seem to be no class named SuperTenantCarbonContext. We can get > CarbonContext using CarbonContext.getCurrentContext(), but getOSGiService(...) > method is not available from this. > > Regards, > Chathura > > > On Fri, Mar 7, 2014 at 10:57 AM, Subash Chaturanga <[email protected]>wrote: > >> Hi Chathura, >> You can access OSGi services from CC. I am not sure if this has changed >> very recently. Unless you can do it as follows. >> >> <your OSGIServiceInterfaceName> service=(<your OSGIServiceInterfaceName>) >> SuperTenantCarbonContext.getCurrentContext().getOSGiService(<your >> OSGIServiceInterfaceName>.class); >> >> >> On Fri, Mar 7, 2014 at 10:36 AM, Chathura Ekanayake <[email protected]>wrote: >> >>> >>> Hi Sagara, >>> >>> If we deploy it as a web application, is there a way to access OSGi >>> services within it? >>> As we don't package it as a bundle, a BundleContext object is not >>> available for the webapp, so it is not possible get references to OSGi >>> services. Is there a way to deploy a webapp as a bundle? >>> >>> Regards, >>> Chathura >>> >>> >>> >>> On Thu, Mar 6, 2014 at 1:49 PM, Sagara Gunathunga <[email protected]>wrote: >>> >>>> >>>> >>>> >>>> On Thu, Mar 6, 2014 at 12:15 PM, Chathura Ekanayake >>>> <[email protected]>wrote: >>>> >>>>> >>>>> Hi All, >>>>> >>>>> Activiti has a Restlet based comprehensive REST API to expose all BPMN >>>>> related functions. As we are planning to have a REST API for BPMN, we can >>>>> integrate this Activiti REST module in Carbon. Could I get feedback on the >>>>> following items regarding this integration: >>>>> >>>>> Restlet vs JAX-RS: >>>>> Should we integrate the Restlet based Activiti API or should we write >>>>> a new JAX-RS based REST module? I think it is better to use the Activiti >>>>> REST module as it allows us to migrate easily with new Activiti versions. >>>>> >>>> >>>> IMHO if Activiti REST module can cater all of our BPMN requirements >>>> then rewriting is not required at least at this point. >>>> >>>> >>>>> >>>>> Integrating the Activiti Restlet based API: >>>>> If we decide to integrate the Activiti REST module, we have to expose >>>>> the Restlet servlet to handle REST requests. One option is to register >>>>> this >>>>> servlet in repository/conf/tomcat/web.xml, which exposes this on the same >>>>> port as admin services. However, we have to keep these servlet >>>>> registration >>>>> entries in the web.xml, even though the BPMN component is not deployed. >>>>> Another option is to start a separate server (if this is possible in >>>>> Carbon) for Activiti REST and register the Restlet servlet in that server. >>>>> >>>> >>>> Can't we just deploy above module as a web application with own context >>>> path as mention in this post[1] ? If you look at OAuth endpoint in IS/APIM >>>> we used this approach additionally some of future AS integration will use >>>> this approach. >>>> >>>> [1] - >>>> http://bpmn20inaction.blogspot.com/2013/02/activiti-in-action-updates-part-1.html >>>> >>>> Thanks ! >>>> >>>>> >>>>> Thoughts... >>>>> >>>>> Regards, >>>>> Chathura >>>>> >>>>> >>>>> >>>> >>>> >>>> -- >>>> Sagara Gunathunga >>>> >>>> Senior Technical Lead; WSO2, Inc.; http://wso2.com >>>> V.P Apache Web Services; http://ws.apache.org/ >>>> Linkedin; http://www.linkedin.com/in/ssagara >>>> Blog ; http://ssagara.blogspot.com >>>> >>>> >>> >>> _______________________________________________ >>> Dev mailing list >>> [email protected] >>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>> >>> >> >> >> -- >> Thanks >> /subash >> >> *Subash Chaturanga* >> Senior Software Engineer :Integration TG; WSO2 Inc. http://wso2.com >> >> email: [email protected] >> blog: http://subashsdm.blogspot.com/ >> twitter: @subash89 >> phone: +9477 2225922 >> Lean . Enterprise . Middleware >> > > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- *Afkham Azeez* Director of Architecture; WSO2, Inc.; http://wso2.com Member; Apache Software Foundation; http://www.apache.org/ * <http://www.apache.org/>* *email: **[email protected]* <[email protected]> * cell: +94 77 3320919 blog: **http://blog.afkham.org*<http://blog.afkham.org> *twitter: **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez> * linked-in: **http://lk.linkedin.com/in/afkhamazeez <http://lk.linkedin.com/in/afkhamazeez>* *Lean . Enterprise . Middleware*
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
