Yes and no,

the PID is the part before the "-" since it is the actual PID as can also
be read in the OSGi spec.
the Factory PID is the part after the "-" but in our case will be replaced
by the "random" Identifier.

So yes, this is confusing since we are talking actually of a PID for the
Factory, but the PID does describe the service PID which is right for the
service as this PID is bound to the Factory creating the service, where the
actual Factory PID is a random ID.

regards, Achim


2014-07-03 12:30 GMT+02:00 Benjamin Debeerst <[email protected]
>:

> Sorry to pull this up again, but what you write seems weird to me: The
> factory PID should be what is before the '-', not what is after the '-'.
> Consider the configurations I attached earlier: For TestConfig-Instance1,
> 'TestConfig' is the Factory PID, while 'Instance1' is just some random
> identifier.
>
> Regards,
> Benjamin
>
> -----Original Message-----
> From: Jean-Baptiste Onofré [mailto:[email protected]]
> Sent: Mittwoch, 2. Juli 2014 17:35
> To: [email protected]
> Subject: Re: Problems With Factory Configurations In Karaf 3.0.1
>
> It is:
>
> pid.indexOf returns the index of the '-'.
>
> If it's found (>0), the factoryPid is the string after the -.
> The Pid is the string before the -.
>
> So it looks good to me.
>
> Regards
> JB
>
> On 07/02/2014 05:27 PM, Gareth wrote:
> > Hello Benjamin,
> >
> > I think theproblem is that the names of the variables are
> > incorrect/confusing. Look at the parsePid method in the same file
> >
> >      private String[] parsePid(String pid) {
> >          int n = pid.indexOf('-');
> >          if (n > 0) {
> >              String factoryPid = pid.substring(n + 1);
> >              pid = pid.substring(0, n);
> >              return new String[]{pid, factoryPid};
> >          } else {
> >              return new String[]{pid, null};
> >          }
> >      }
> >
> > The factory pid is definitely not the string after the "-" as
> > suggested here.
> >
> > Gareth
> >
> > Gareth
> >
> >
> >
> > --
> > View this message in context:
> > http://karaf.922171.n3.nabble.com/Problems-With-Factory-Configurations
> > -In-Karaf-3-0-1-tp4033921p4033954.html
> > Sent from the Karaf - User mailing list archive at Nabble.com.
> >
>
> --
> Jean-Baptiste Onofré
> [email protected]
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>

Software Architect / Project Manager / Scrum Master

Reply via email to