Hi Daan,
I solved the problem! Here is how I did it:
>> ==================
[...]
>> } else if (implName.equals(SpringLoaderImpl.class.getName())) {
>> xSingleServiceFactory = Factory.createComponentFactory(
>> SpringLoaderImpl.class,
>> new String[] {SpringLoaderImpl.__singeltonName}
>> );
>> }
[...]
>> ========================
Here the failure resides in. I had to pass not only the singleton name
to the Factory.createComponentFactory method, but also the service name.
I had to change my __writeRegistryServiceInfo like this:
-----%<-----
public static boolean __writeRegistryServiceInfo(XRegistryKey regKey) {
try {
XRegistryKey newKey = regKey.createKey(
SpringLoaderImpl.class.getName() +
"/UNO/SINGLETONS/" +
theSpringLoader.class.getName());
newKey.setStringValue(SpringLoaderImpl.__singeltonName);
} catch (InvalidRegistryException e) {
return false;
}
// NOTE: use the service Names!!!
boolean regSpring = FactoryHelper.writeRegistryServiceInfo(
SpringLoaderImpl.class.getName(),
SpringLoaderImpl.__serviceNames, regKey);
boolean regJudas = FactoryHelper.writeRegistryServiceInfo(
JudasProtocolHandler.class.getName(),
JudasProtocolHandler.SERVICENAME, regKey);
return regJudas && regSpring;
}
-----%<-----
And my __getComponentFactory like this:
-----%<-----
public static XSingleComponentFactory __getComponentFactory (String
implName) {
XSingleComponentFactory xSingleComponentFactory = null;
if (implName.equals(JudasProtocolHandler.class.getName())) {
xSingleComponentFactory =
Factory.createComponentFactory(
JudasProtocolHandler.class,
new String[]
{JudasProtocolHandler.SERVICENAME}
);
}
else if (implName.equals(SpringLoaderImpl.class.getName())) {
xSingleComponentFactory =
Factory.createComponentFactory(
SpringLoaderImpl.class,
SpringLoaderImpl.__serviceNames
);
}
return xSingleComponentFactory;
}
-----%<-----
While __serviceNames is defined as:
-----%<-----
public static final String[] __serviceNames = {
"de.twc.oocom.comp.SpringLoaderImpl",
"de.twc.oocom.comp.theSpringLoader"};
-----%<-----
Daan, your mails and answers were very helpful! Thanks a lot!
Greetings, Tobias
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]