On Tue, Apr 29, 2014 at 6:08 PM, Sanjeewa Malalgoda <[email protected]>wrote:
> > > > On Tue, Apr 29, 2014 at 6:06 PM, Ajith Vitharana <[email protected]> wrote: > >> Sanjeewa, >> >> >> On Tue, Apr 29, 2014 at 5:54 PM, Sanjeewa Malalgoda >> <[email protected]>wrote: >> >>> >>> >>> >>> On Tue, Apr 29, 2014 at 5:11 PM, Ajith Vitharana <[email protected]>wrote: >>> >>>> Hi All, >>>> >>>> The org.wso2.carbon.apimgt.impl has defined the >>>> org.wso2.carbon.apimgt.impl.internal package as a Private-Package [1] but >>>> there are some usage inside the other bundles. >>>> >>>> org.wso2.carbon.apimgt.hostobjects, >>>> org.wso2.carbon.apimgt.usage, >>>> org.wso2.carbon.apimgt.keymgt ..etc >>>> >>>> <Private-Package> >>>> * org.wso2.carbon.apimgt.impl.internal* >>>> </Private-Package> >>>> <Export-Package> >>>> *!org.wso2.carbon.apimgt.impl.internal.APIManagerComponent,* >>>> org.wso2.carbon.apimgt.impl.*, >>>> </Export-Package> >>>> >>>> We are getting following build failure due to the above wrong usage. >>>> And why do we have export(not -!) *class* instead of package ? >>>> >>> Here we need to expose only ServiceReferenceHolder to other packages to >>> get configs and etc. And we do not need to expose APIManagerComponent to >>> outside. So lets proceed accordingly. Anyway we didn't got any build >>> failures in builder machine. How it effect here? >>> >> >> If you need to expose the ServiceReferenceHolder class to out side, that >> class should NOT be inside the "internal" package, because we don't expose >> internal package to outside. >> AFAIK you can only the export(or not) the packages , NOT classes. >> > Yes that is exactly what i meant. Ideal solution would be taking > ServiceReferenceHolder class to outside from internal package. > This is wrong. First, you can only export packages from OSGi bundles, not classes. Also what is the purpose of exposing ServiceHolder outside of a bundle? ServiceReferenceHolder (which stores OSGi service reference objects) should only be used within the bundle and should not be exposed outside. That is why we, as practice, put them under internal package structure and make them private. If you want to use the service references in another bundle, you have to use the same approach with DS components and service reference holders. > > Thanks, > sanjeewa. > >> >> -Ajith. >> >> >>> Thanks, >>> sanjeewa. >>> >>>> >>>> [1] >>>> https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/components/apimgt/org.wso2.carbon.apimgt.impl/1.2.2/pom.xml >>>> >>>> Installation failed. >>>> Cannot complete the install because one or more required items could >>>> not be found. >>>> Software being installed: WSO2 Carbon - API Store Feature >>>> 4.3.0.SNAPSHOT (org.wso2.carbon.apimgt.store.feature.group 4.3.0.SNAPSHOT) >>>> Missing requirement: org.wso2.carbon.apimgt.hostobjects 4.3.0.SNAPSHOT >>>> (org.wso2.carbon.apimgt.hostobjects 4.3.0.SNAPSHOT) requires 'package >>>> org.wso2.carbon.apimgt.impl.internal 0.0.0' but it could not be found >>>> Cannot satisfy dependency: >>>> From: WSO2 Carbon - API Store Feature 4.3.0.SNAPSHOT >>>> (org.wso2.carbon.apimgt.store.feature.group 4.3.0.SNAPSHOT) >>>> To: org.wso2.carbon.apimgt.hostobjects [4.3.0.SNAPSHOT] >>>> Application failed, log file location: >>>> /home/ajith/.m2/repository/org/eclipse/tycho/tycho-p2-runtime/0.13.0/eclipse/configuration/1398770292994.log >>>> >>>> -- >>>> Ajith Vitharana. >>>> WSO2 Inc. - http://wso2.org >>>> Email : [email protected] >>>> Mobile : +94772217350 >>>> >>>> >>> >>> >>> -- >>> >>> *Sanjeewa Malalgoda* >>> WSO2 Inc. >>> Mobile : +94713068779 >>> >>> <http://sanjeewamalalgoda.blogspot.com/>blog >>> :http://sanjeewamalalgoda.blogspot.com/<http://sanjeewamalalgoda.blogspot.com/> >>> >>> >>> >> >> >> -- >> Ajith Vitharana. >> WSO2 Inc. - http://wso2.org >> Email : [email protected] >> Mobile : +94772217350 >> >> > > > -- > > *Sanjeewa Malalgoda* > WSO2 Inc. > Mobile : +94713068779 > > <http://sanjeewamalalgoda.blogspot.com/>blog > :http://sanjeewamalalgoda.blogspot.com/<http://sanjeewamalalgoda.blogspot.com/> > > > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- *Kishanthan Thangarajah* Senior Software Engineer, Platform Technologies Team, WSO2, Inc. lean.enterprise.middleware Mobile - +94773426635 Blog - *http://kishanthan.wordpress.com <http://kishanthan.wordpress.com>* Twitter - *http://twitter.com/kishanthan <http://twitter.com/kishanthan>*
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
