On Mon, Jan 25, 2010 at 4:29 PM, Ughetti Marco < [email protected]> wrote:
> Thanks alot for your reply. > > I’ve read the first article that is very clear about Carbon Architecture. > Unfortunately it is still related to an old Carbon version and it speaks > about an extender bundle that it is not used anymore because you have > replaced it with the usage of declarative services. It would be very useful > to have some understanding about how declarative services are used inside > Carbon in order to manage the bundle start order and maybe other stuff. I > know what declarative services are (even if I’ve used more often spring-dm > in order to do similar things) but I need some hint about their usage inside > Carbon. > Bundle starting order was a major issue at the initial stages of Carbon development (in Carbon 1.x family). Because, if bundles are not started in a certain order, server initialization fails. Inside Carbon, we are using many third party libraries which are not developed to cope with the dynamism factor discussed in OSGi. Therefore, these libraries require certain resouces before initialization. Starting order of bundles is important in these situations. Earlier we were using a management agent to assign start levels for all the bundles running inside Carbon and all these bundles should carry a manifest header which contains the start level as its value. Later, we realized that this mechanism was not a scalable solution. Simply because, it is impractical to expect this manifest header inside the bundles developed outside of WSO2. In Carbon 2.x family, we decided to use Declarative Services as a means of solving this starting order issue. DS is a way of manipulating OSGi services without directly coupling to OSGi specific APIs. Using DS, bundle activation can be delayed till certain OSGi services are available. This way you can control the starting order of bundles. > An other thing that I would like to understand better is about axis2 > service/module deployment. If I have understood well thare are two different > ways to deploy axis2 web services. The fist it is used by Carbon > administrative services and it is performed deeploynig a bundle with a > services.xml or module.xml config file. The other one is the one used by a > carbon user when uploads a service.aar file in the repository direcxtory. In > this case you don’t need to package it as a bundle and the deployment it is > managed by AXIS2 in the classical way. > > Is it correct? > Yes. Web Services can also be deployed as Bundles in Carbon. > All web service that shall be used to communicate with the Carbon UI have > to be deployed in the first way? > This is the recommended way of deploying Administrative Service. Carbon provides several adminstrative features as OSGi services. For example, Registry/repository is available as an OSGi Service. If your adminstarve service needs to leverage these existing features, you need to develop services as bundles. > Are there any differences in how carbon/axis2 manages these two different > types of deployment? > In Axis2, each Web service gets its own classloader. If your service resides inside a bundle, the service classloader will be the bundle classloader. If your service resides inside an aar file(default way deployed services in Axis2), then the service classloader will be a child classloader of the DeploymentClassloader(Axis2). > It would be very kind of you if you to provide any reference about how > declarative services shall be used inside Carbon . > The best source to get enough information of DS usage in Carbon is to have a look at the code. Examine the Carbon core bundle( https://wso2.org/repos/wso2/branches/carbon/2.0.3/core/org.wso2.carbon.core). Thanks Sameera > > > > > Best > > > > Marco > > > > ------------------------------------------------------------------ > *Telecom Italia** > **Marco Ughetti* > *TI Lab*** > > Vertical Platform & VAS > *Vertical Platforms Innovation* > > *Via G. Reiss Romoli, 274 - 10148 Torino* > *+ 39 011 2285654* > > *+ 39 331 6001596* > ------------------------------ > > *From:* [email protected] [mailto: > [email protected]] *On Behalf Of *Sameera Jayasoma > *Sent:* venerdì 22 gennaio 2010 12.23 > *To:* [email protected] > *Subject:* Re: [wsas-java-user] Adding a new feature to wsas > > > > Hi Marco, > > It is nice to hear that you are interested WSO2 Carbon and WSO2 WSAS. > Please see my comments below > > On Fri, Jan 22, 2010 at 3:56 PM, Ughetti Marco < > [email protected]> wrote: > > Hi all, > > I’m currently working in the Innovation department of Telecom Italia and > I’m evaluating the WSO2 Suite (particularly esb and wsas) to be used as a > service oriented platform aimed to host and mediate services that are to be > used by our vertical platforms > > I like very much the idea to build the wso2 products on top of a common > osgi based layer in order to be able to extends the products itself and this > was the main reason I chose wso2 suite > > Currently We are using the wso2 products as-is but I’d like to understand > how to extend them installing new (and custom) features. > > As a first example I’d like to add a service-mgt feature to wsas for a new > kind of service (for example services exposed through rmi or hessian) > > I know about osgi and bundle development but I need some infos on > wso2-carbon internals and how to make things in the correct way,it would be > fine to have some guide line or best practice in order to develop bundle for > wso2-carbon > > Article[1] gives you a basic understanding of the WSO2 Carbon architecture. > [2] will guide you to develop a simple bundle and how you can deploy it in > Carbon. > > [1] http://wso2.org/library/articles/stuff-works-wso2-carbon > [2] > http://tech.jayasoma.org/2010/01/developing-osgi-bundles-for-wso2-carbon.html > > For example, speaking on the service-mgt and related features, looking to > the source code I’ve notice that the ui bundle (the one that add gui > functionalities) communicates with the bundle that adds server capability > trhough web service apis instead of osgi service registry. In my scenario > I’d like to add a new feature that does not need to be exposed through web > service so it should be good to work at osgi level, is ti correct? > > > Yes. It is correct. UI layer communicates with the server through Web > services. This is to support the scenario of running UI and server in > different boxes. In your case, it is possible to use OSGi services, but you > won't be able to seperate UI from the server. > > > > Can you suggest what wso2-carbon component can I go through in order to > understand how to develop a new feature like that? > > > > You can try the logging component available in the carbon-components > project. > > > At the end of the day in my custom wsas I’ d like to be able to: > > > > 1) add a new item in the add menu of the gui in orde rto upload > hessian services > > 2) when I click on the list link I should be able to list even the new > kind of services with their custom icon > > 3) On the server side Ihave to be able to expose a POJO uploaded by > gui through the Hessian protocol > > > > Obviously, if you are interested, we are available to distribute our work > to the wso2 community > > > > Great! > > Thanks > Sameera > > > > Looking forwards to hearing from you > > Thanks a lot in advance > > > > Marco > > > > > > ------------------------------------------------------------------ > *Telecom Italia > *Marco Ughetti > TI Lab > > Vertical Platform & VAS > Vertical Platforms Innovation > > Via G. Reiss Romoli, 274 - 10148 Torino > + 39 011 2285654 > > + 39 331 6001596 > > Questo messaggio e i suoi allegati sono indirizzati esclusivamente alle > persone indicate. La diffusione, copia o qualsiasi altra azione derivante > dalla conoscenza di queste informazioni sono rigorosamente vietate. Qualora > abbiate ricevuto questo documento per errore siete cortesemente pregati di > darne immediata comunicazione al mittente e di provvedere alla sua > distruzione, Grazie. > > *This e-mail and any attachments is confidential and may contain > privileged information intended for the addressee(s) only. Dissemination, > copying, printing or use by anybody else is unauthorised. If you are not the > intended recipient, please delete this message and any attachments and > advise the sender by return e-mail, Thanks.* > > *[image: rispetta l'ambiente]Rispetta l'ambiente. Non stampare questa mail > se non è necessario.* > > > _______________________________________________ > Wsas-java-user mailing list > [email protected] > https://wso2.org/cgi-bin/mailman/listinfo/wsas-java-user > > > Questo messaggio e i suoi allegati sono indirizzati esclusivamente alle > persone indicate. La diffusione, copia o qualsiasi altra azione derivante > dalla conoscenza di queste informazioni sono rigorosamente vietate. Qualora > abbiate ricevuto questo documento per errore siete cortesemente pregati di > darne immediata comunicazione al mittente e di provvedere alla sua > distruzione, Grazie. > > *This e-mail and any attachments** is **confidential and may contain > privileged information intended for the addressee(s) only. Dissemination, > copying, printing or use by anybody else is unauthorised. If you are not the > intended recipient, please delete this message and any attachments and > advise the sender by return e-mail, Thanks.* > *[image: rispetta l'ambiente]Rispetta l'ambiente. Non stampare questa mail > se non è necessario.* > > > _______________________________________________ > Wsas-java-user mailing list > [email protected] > https://wso2.org/cgi-bin/mailman/listinfo/wsas-java-user > >
_______________________________________________ Wsas-java-user mailing list [email protected] https://wso2.org/cgi-bin/mailman/listinfo/wsas-java-user
