Thank you very much! I thought my mistake in understanding. I've checked what 
we talked and I will start new thread.


>Пятница, 17 июля 2015, 11:19 +01:00 от Neil Bartlett <njbartl...@gmail.com>:
>
>
>
>
>On Friday, 17 July 2015 at 10:58, Alex Sviridov wrote:
>
>> To tell the truth I am totally confused. I thought that DS work this way: 
>> Aa bundle with ds.xml file  is loaded by osgi framework and ds framework 
>> reads xml files and creates osgi services.
>> 
>> 
>
>
>Yes this is correct. 
>> 
>> So maven plugin is used for generating this ds xml files. Am I wrong?
>
>No, this is also correct! But you are using the wrong plugin: maven-scr-plugin 
>is obsolete, and understands a different set of annotations. 
>
>These days the annotation processing is done directly by bnd, which is part of 
>the maven-bundle-plugin (or bnd-maven-plugin). 
>  
>> 
>> 
>> > Пятница, 17 июля 2015, 10:31 +01:00 от Neil Bartlett < 
>> > njbartl...@gmail.com >:
>> > 
>> > Alex, what is the relevance of the maven-scr-plugin? The annotations are 
>> > processed directly by bnd, but only in the (unreleased) version 3.0. A 
>> > separate Maven plugin is not required.
>> > 
>> > The annotation library, which you will need as a dependency to compile 
>> > your own code, is here:  
>> > https://github.com/bndtools/bnd/tree/master/cnf/repo/org.osgi.service.component.annotations
>> >  <  
>> > https://github.com/bndtools/bnd/tree/master/cnf/repo/org.osgi.service.component.annotations
>> >  >
>> > 
>> > Regards,
>> > Neil
>> > 
>> > > On 17 Jul 2015, at 09:40, Alex Sviridov <  ooo_satu...@mail.ru > wrote:
>> > > 
>> > > I don't understand you. I use 
>> > > <artifactId>org.apache.felix.scr.annotations</artifactId> 
>> > > <version>1.9.12</version> and 
>> > > <artifactId>maven-scr-plugin</artifactId> <version>1.21.0</version>. So 
>> > > annotations are needed only for generating by maven ds.xml files.
>> > > 
>> > > But I don't know - if this maven src plugin supports DS scope. How can I 
>> > > find it out? If it doesn't support, then setting scope in @Component 
>> > > won't help, will it?
>> > > 
>> > > 
>> > > > Пятница, 17 июля 2015, 1:07 -04:00 от Raymond Auge <  
>> > > > raymond.a...@liferay.com >:
>> > > > 
>> > > > Since the annotations are build time only, usually you'll only find 
>> > > > those in tools which support DS 1.3 annotations. The most common case 
>> > > > of this is bnd. So, if you get your hands on bnd 3.0(in development) 
>> > > > it will contain those...
>> > > > 
>> > > > Or you could look here  
>> > > > https://github.com/bndtools/bnd/blob/master/cnf/repo/org.osgi.service.component.annotations/org.osgi.service.component.annotations-1.3.0.jar
>> > > > 
>> > > > On Fri, Jul 17, 2015 at 12:55 AM, Alex Sviridov <  ooo_satu...@mail.ru 
>> > > > > wrote:
>> > > > > Ray, I have to ask you for help again. I tried the code you provided 
>> > > > > using osgi 6.0.0 however there is no scope in 
>> > > > > org.osgi.service.component.annotations.Component.
>> > > > > 
>> > > > > 
>> > > > > > Четверг, 16 июля 2015, 12:19 -05:00 от Raymond Auge <  
>> > > > > > raymond.a...@liferay.com >:
>> > > > > > 
>> > > > > > that's kind of the point... it's not public yet! I think, right 
>> > > > > > now, you'll
>> > > > > > have to check where the scr project is getting it from.
>> > > > > > 
>> > > > > > - Ray
>> > > > > > 
>> > > > > > On Thu, Jul 16, 2015 at 12:14 PM, Alex Sviridov <  
>> > > > > > ooo_satu...@mail.ru > wrote:
>> > > > > > 
>> > > > > > > Could you say, from what maven dependency you get ServiceScope?
>> > > > > > > 
>> > > > > > > 
>> > > > > > > > Четверг, 16 июля 2015, 11:21 -05:00 от Raymond Auge <
>> > > > > > >  raymond.a...@liferay.com >:
>> > > > > > > > 
>> > > > > > > > @org.osgi.service.component.annotations.Component(
>> > > > > > > > immediate = false,
>> > > > > > > > name = "default",
>> > > > > > > > scope = ServiceScope.PROTOTYPE
>> > > > > > > > )
>> > > > > > > > public class MyClass implements MyInterface{}
>> > > > > > > > 
>> > > > > > > > 
>> > > > > > > > On Thu, Jul 16, 2015 at 11:14 AM, Alex Sviridov <  
>> > > > > > > > ooo_satu...@mail.ru >
>> > > > > > > wrote:
>> > > > > > > > 
>> > > > > > > > > Thank you. Could you say at what state this version is - I 
>> > > > > > > > > mean how
>> > > > > > > > > stable it is.
>> > > > > > > > > And the second question how can I make prototype scope in 
>> > > > > > > > > the following
>> > > > > > > > > example:
>> > > > > > > > > 
>> > > > > > > > > @Component (immediate = false)
>> > > > > > > > > @Property (name = "name",value = "default")
>> > > > > > > > > @Service
>> > > > > > > > > public class MyClass implements MyInterface{}
>> > > > > > > > > 
>> > > > > > > > > 
>> > > > > > > > > > Четверг, 16 июля 2015, 11:06 -05:00 от Raymond Auge <
>> > > > > > > > >  raymond.a...@liferay.com >:
>> > > > > > > > > > 
>> > > > > > > > > > Alex, it's because there is no released DS spec which 
>> > > > > > > > > > supports
>> > > > > > > prototype
>> > > > > > > > > > scope. That will only come out in the next couple months.
>> > > > > > > > > > 
>> > > > > > > > > > However, DS in felix trunk has the support for it, so you 
>> > > > > > > > > > could build
>> > > > > > > from
>> > > > > > > > > > source.
>> > > > > > > > > > 
>> > > > > > > > > > - Ray
>> > > > > > > > > > 
>> > > > > > > > > > On Thu, Jul 16, 2015 at 10:58 AM, Alex Sviridov <  
>> > > > > > > > > > ooo_satu...@mail.ru
>> > > > > > > > 
>> > > > > > > > > wrote:
>> > > > > > > > > > 
>> > > > > > > > > > > Neil, thank you. I use apache felix. And I tried to find 
>> > > > > > > > > > > information
>> > > > > > > > > how
>> > > > > > > > > > > to use DS with prototype scope - but I found nothing.
>> > > > > > > > > > > 
>> > > > > > > > > > > 
>> > > > > > > > > > > > Четверг, 16 июля 2015, 16:56 +01:00 от Neil Bartlett <
>> > > > > > > > > > >  njbartl...@gmail.com >:
>> > > > > > > > > > > > 
>> > > > > > > > > > > > Yes and no. Mostly no.
>> > > > > > > > > > > > 
>> > > > > > > > > > > > The OSGi core spec Release 6, which is now around a 
>> > > > > > > > > > > > year old, does
>> > > > > > > > > > > include the ability for service consumers to obtain new 
>> > > > > > > > > > > service
>> > > > > > > > > > > 
>> > > > > > > > > > 
>> > > > > > > > > 
>> > > > > > > > > instances
>> > > > > > > > > > > under their control (the so-called "prototype scope”). 
>> > > > > > > > > > > However the
>> > > > > > > > > > 
>> > > > > > > > > 
>> > > > > > > > > 
>> > > > > > > > 
>> > > > > > > > 
>> > > > > > > 
>> > > > > > > CDI
>> > > > > > > > > > > implementation you are using would also have to have 
>> > > > > > > > > > > support for this
>> > > > > > > > > > > feature. So your question relates to the CDI 
>> > > > > > > > > > > implementation… if it
>> > > > > > > > > > > 
>> > > > > > > > > > 
>> > > > > > > > > 
>> > > > > > > > 
>> > > > > > > 
>> > > > > > > has a
>> > > > > > > > > > > mailing list then you should ask there.
>> > > > > > > > > > > > 
>> > > > > > > > > > > > Regards
>> > > > > > > > > > > > Neil
>> > > > > > > > > > > > 
>> > > > > > > > > > > > 
>> > > > > > > > > > > > > On 16 Jul 2015, at 16:51, Alex Sviridov <  
>> > > > > > > > > > > > > ooo_satu...@mail.ru >
>> > > > > > > > > wrote:
>> > > > > > > > > > > > > 
>> > > > > > > > > > > > > Neil, unfortunately I can't agree with you. As I 
>> > > > > > > > > > > > > understand both
>> > > > > > > pax
>> > > > > > > > > > > (@Inject @OsgiService) and fighterfish (@OSGiService) 
>> > > > > > > > > > > work with osgi
>> > > > > > > > > > > "registry".
>> > > > > > > > > > > > > So it is the question about how to get new service 
>> > > > > > > > > > > > > instance for
>> > > > > > > > > > > > 
>> > > > > > > > > > > 
>> > > > > > > > > > > 
>> > > > > > > > > > 
>> > > > > > > > > 
>> > > > > > > > 
>> > > > > > > 
>> > > > > > > every
>> > > > > > > > > > > consumer from osgi "registry" - I am sorry if the
>> > > > > > > > > > > > > terms I use are wrong. That's why I think this 
>> > > > > > > > > > > > > mailing list is the
>> > > > > > > > > > > > 
>> > > > > > > > > > > 
>> > > > > > > > > > > right place. I think so...
>> > > > > > > > > > > > > 
>> > > > > > > > > > > > > Четверг, 16 июля 2015, 16:46 +01:00 от Neil Bartlett 
>> > > > > > > > > > > > > <
>> > > > > > > > > > >  njbartl...@gmail.com >:
>> > > > > > > > > > > > > 
>> > > > > > > > > > > > > Alex,
>> > > > > > > > > > > > > 
>> > > > > > > > > > > > > This list might not be the best place to ask about 
>> > > > > > > > > > > > > CDI, since it
>> > > > > > > is a
>> > > > > > > > > > > Java enterprise spec that is not much used with OSGi as 
>> > > > > > > > > > > far as I can
>> > > > > > > > > > 
>> > > > > > > > > 
>> > > > > > > > > see.
>> > > > > > > > > > > > > 
>> > > > > > > > > > > > > In fact your choice to use CDI with OSGi puts you 
>> > > > > > > > > > > > > within a very
>> > > > > > > > > narrow
>> > > > > > > > > > > niche. It may be the case that nobody knows the answer 
>> > > > > > > > > > > to your
>> > > > > > > > > > 
>> > > > > > > > > 
>> > > > > > > > > question, or
>> > > > > > > > > > > that what you want to achieve is not possible with the 
>> > > > > > > > > > > current
>> > > > > > > > > > 
>> > > > > > > > > 
>> > > > > > > > > 
>> > > > > > > > 
>> > > > > > > 
>> > > > > > > tools. If
>> > > > > > > > > > > you are willing to invest in improving those tools 
>> > > > > > > > > > > yourself then you
>> > > > > > > > > > 
>> > > > > > > > > 
>> > > > > > > > > might
>> > > > > > > > > > > make progress… otherwise I would strongly recommend 
>> > > > > > > > > > > finding a
>> > > > > > > > > > 
>> > > > > > > > > 
>> > > > > > > > > 
>> > > > > > > > 
>> > > > > > > 
>> > > > > > > different
>> > > > > > > > > > > solution.
>> > > > > > > > > > > > > 
>> > > > > > > > > > > > > Regards,
>> > > > > > > > > > > > > Neil
>> > > > > > > > > > > > > 
>> > > > > > > > > > > > > > On 16 Jul 2015, at 16:41, Alex Sviridov <  
>> > > > > > > > > > > > > > ooo_satu...@mail.ru
>> > > > > > > > > <x-msg:
>> > > > > > > > > > >  
>> > > > > > > > > > > //e.mail.ru/compose/?mailto=mailto%3aooo_satu...@mail.ru 
>> > > > > > > > > > > >> 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
>> > > > > > > > > > > <
>> > > > > > > > > > 
>> > > > > > > > > 
>> > > > > > > > 
>> > > > > > > 
>> > > > > > >  
>> > > > > > > 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 <
>> > > > > > > > > > >  njbartl...@gmail.com <x-msg: //
>> > > > > > > > > > >  e.mail.ru/compose/?mailto=mailto%3anjbartl...@gmail.com 
>> > > > > > > > > > > >>:
>> > > > > > > > > > > > > > 
>> > > > > > > > > > > > > > No.
>> > > > > > > > > > > > > > 
>> > > > > > > > > > > > > > > On 16 Jul 2015, at 16:34, Alex Sviridov <  
>> > > > > > > > > > > > > > > ooo_satu...@mail.ru
>> > > > > > 
>> > > > > > > > > <>>
>> > > > > > > > > > > wrote:
>> > > > > > > > > > > > > > > 
>> > > > > > > > > > > > > > > I haven't got any messages from this mailing 
>> > > > > > > > > > > > > > > list. Is it dead?
>> > > > > > > > > > > > > > > 
>> > > > > > > > > > > > > > > 
>> > > > > > > > > > > > > > > --
>> > > > > > > > > > > > > > > Alex Sviridov
>> > > > > > > > > > > > > > > 
>> > > > > > > > > > > > > > 
>> > > > > > > > > > > > > > 
>> > > > > > > > > > > > > > 
>> > > > > > > > > > > > > > 
>> > > > > > > > > > > > > > --
>> > > > > > > > > > > > > > Alex Sviridov
>> > > > > > > > > > > > > > 
>> > > > > > > > > > > > > 
>> > > > > > > > > > > > > 
>> > > > > > > > > > > > > 
>> > > > > > > > > > > > > 
>> > > > > > > > > > > > > --
>> > > > > > > > > > > > > Alex Sviridov
>> > > > > > > > > > > > > 
>> > > > > > > > > > > > 
>> > > > > > > > > > > 
>> > > > > > > > > > > 
>> > > > > > > > > > > 
>> > > > > > > > > > > --
>> > > > > > > > > > > Alex Sviridov
>> > > > > > > > > > > 
>> > > > > > > > > > 
>> > > > > > > > > > 
>> > > > > > > > > > 
>> > > > > > > > > > 
>> > > > > > > > > > --
>> > > > > > > > > > *Raymond Augé* <  
>> > > > > > > > > > http://www.liferay.com/web/raymond.auge/profile >
>> > > > > > > > > > (@rotty3000)
>> > > > > > > > > > Senior Software Architect *Liferay, Inc.* <  
>> > > > > > > > > > http://www.liferay.com >
>> > > > > > > > > > (@Liferay)
>> > > > > > > > > > Board Member & EEG Co-Chair, OSGi Alliance <  
>> > > > > > > > > > http://osgi.org >
>> > > > > > > > > > 
>> > > > > > > > > 
>> > > > > > > > > (@OSGiAlliance)
>> > > > > > > > > 
>> > > > > > > > > 
>> > > > > > > > > --
>> > > > > > > > > Alex Sviridov
>> > > > > > > > > 
>> > > > > > > > 
>> > > > > > > > 
>> > > > > > > > 
>> > > > > > > > 
>> > > > > > > > --
>> > > > > > > > *Raymond Augé* <  
>> > > > > > > > http://www.liferay.com/web/raymond.auge/profile >
>> > > > > > > > (@rotty3000)
>> > > > > > > > Senior Software Architect *Liferay, Inc.* <  
>> > > > > > > > http://www.liferay.com >
>> > > > > > > > (@Liferay)
>> > > > > > > > Board Member & EEG Co-Chair, OSGi Alliance <  http://osgi.org >
>> > > > > > > > 
>> > > > > > > 
>> > > > > > > (@OSGiAlliance)
>> > > > > > > 
>> > > > > > > 
>> > > > > > > --
>> > > > > > > Alex Sviridov
>> > > > > > > 
>> > > > > > 
>> > > > > > 
>> > > > > > 
>> > > > > > 
>> > > > > > -- 
>> > > > > > *Raymond Augé* <  http://www.liferay.com/web/raymond.auge/profile >
>> > > > > > (@rotty3000)
>> > > > > > Senior Software Architect *Liferay, Inc.* <  
>> > > > > > http://www.liferay.com >
>> > > > > > (@Liferay)
>> > > > > > Board Member & EEG Co-Chair, OSGi Alliance <  http://osgi.org > 
>> > > > > > (@OSGiAlliance)
>> > > > > > 
>> > > > > 
>> > > > > 
>> > > > > 
>> > > > > -- 
>> > > > > Alex Sviridov
>> > > > > 
>> > > > 
>> > > > 
>> > > > 
>> > > > 
>> > > > -- 
>> > > > Raymond Augé (@rotty3000)
>> > > > Senior Software Architect Liferay, Inc. (@Liferay) Board Member & EEG 
>> > > > Co-Chair, OSGi Alliance (@OSGiAlliance)
>> > > > 
>> > > 
>> > > 
>> > > -- 
>> > > Alex Sviridov
>> > > 
>> > 
>> > 
>> 
>> 
>> 
>> -- 
>> Alex Sviridov
>> 
>> 
>
>


-- 
Alex Sviridov

Reply via email to