It seems that we're working on similar stuff, having the same problems.
I'm currently trying to register a factory as well and this fails, too.
Haven't looked yet, if my factory is listed twice, but I have the
feeling that at least my problem is somehow related to FELIX-550.
The problem is that as soon as you start the debugger, you have a
different timing, and my code works perfectly. Did you try that? :)
(It's a nice workaround...)
Are you using SCR for your factory? If so, how does your config look like?
Carsten
Bertrand Delacretaz wrote:
Hi,
I asume that's an issue for the Felix project now that the console
moved there, but as my example uses Sling, here it is...
I've been having trouble creating a factory component, I was getting
confused while testing, and I think I found why. My example uses the
RequestDataLogger service, which is a factory with no initial
instance, similar to the component that I was creating in my project.
When starting the Sling launchpad webapp after doing "mvn clean", the
dropdown on the http://localhost:8888/system/console/configMgr page
contains two instances of the "Customizable Request Data Logger"
service.
$ curl -s http://localhost:8888/system/console/configMgr | grep
RequestLoggerService
<option
value='factoryPid=org.apache.sling.engine.impl.log.RequestLoggerService'>...
<option value='pid=org.apache.sling.engine.impl.log.RequestLoggerService'>...
The first one is correct (IIUC), with a factoryPid that makes the
"create config" button appear when selecting this option.
The second one looks to me like a useless empty config - after
creating an actual instance of this component with the "create config"
button, I get:
<option
value='factoryPid=org.apache.sling.engine.impl.log.RequestLoggerService'>...
<option value='pid=org.apache.sling.engine.impl.log.RequestLoggerService'>...
<option
value='pid=org.apache.sling.engine.impl.log.RequestLoggerService.85d3d22e-8992-4a56-be96-63efd501a468'>...
Again, the second option seems superfluous - and in firefox, one
cannot then select the first option anymore to create new configs,
unless the page is reloaded first.
Am I doing something wrong?
-Bertrand
--
Carsten Ziegeler
[EMAIL PROTECTED]