David, thank you for participating in discussion. The specs implementation for CDI is weld which is used also by glassfish. In order to make CDI to work with OSGI special libs were developed - pax, fighterfish and others. So it is one of their main purposes to support injecting OSGI services. Why I use CDI and OSGI, because all the business logic I put in osgi service and in clients (web, or javafx) I use CDI.
>Четверг, 16 июля 2015, 12:02 -04:00 от David Jencks <[email protected]>: > >I looked at the stack overflow thread. I don’t understand what you are trying >to do. > >CDI by itself (e.g. weld or openwebbeans) doesn’t have anything at all to do >with OSGI and there’s no way to use them together as is. > >I don’t know much about pax-cdi but it may provide some integration. I don’t >know if there are any other attempts to integrate. If you want to use such a >solution you should ask it’s developers about it, not here where no one knows >about them. > >The basic requirement you appear to have of “separate instance for each using >instance” should be satisfied by R6 prototype scope. The DS 1.3 RI, felix DS, >should support this OK but it’s not released, the CT is not done, and this >feature is pretty much untested. I don’t have any idea how this capability >might be accessed from a CDI bean, I’d imagine this would have to do with a >hypothetical CDI-OSGI-R6 integration. > >DS component factories as specced are almost useless IMO and are certainly not >the solution you want to try here. > >Why do you need to use CDI? If you are writing an OSGI based application I >would look into simply using DS for all components. > >thanks >david jencks > >>On Jul 16, 2015, at 11:41 AM, Alex Sviridov < [email protected] > wrote: >>Neil, thank you for your answer. I asked a question about using getting new >>instance of DS for every consumer call to work with CDI at this >>mailing list and at stackoverflow >>http://stackoverflow.com/questions/31354996/osgi-ds-and-component-factories-issues >> >>You, Neil, helped me as you could, but you don't like CDI (as I understood). >>Is here anyone else besides you, who could help, as the question is very >>important for >>me and I can't continue work without getting certain answer. >> >> >>>Четверг, 16 июля 2015, 16:35 +01:00 от Neil Bartlett < [email protected] >>>>: >>> >>>No. >>> >>>>On 16 Jul 2015, at 16:34, Alex Sviridov < [email protected] > wrote: >>>> >>>>I haven't got any messages from this mailing list. Is it dead? >>>> >>>> >>>>-- >>>>Alex Sviridov >>> >> >> >>-- >>Alex Sviridov -- Alex Sviridov

