XSingleServiceFactory jobsFac = (XSingleServiceFactory)
UnoRuntime.queryInterface(XSingleServiceFactory.class, jobs);
Object oNewJob = jobsFac.createInstance();
XNameReplace xNewJobNR = (XNameReplace)
UnoRuntime.queryInterface(XNameReplace.class, oNewJob);
xNewJobNR.replaceByName("Service", "test.Job");
XNameContainer xJobsNC = (XNameContainer)
UnoRuntime.queryInterface(XNameContainer.class, jobs);
xJobsNC.insertByName("TestJob", oNewJob);
log.println("Adding configuration to Events ...");