Hi Hugh, You are completely right, it's managed by the generated classes:
https://lsc-project.org/svn/lsc-samples/lsc-embeddable-sample/trunk/src/main/java/com/foo/bar/generated/FooBarServiceSettings.java Regards, -- Sebastien BAHLOUL IAM / Security specialist Ldap Synchronization Connector : http://lsc-project.org Blog : http://sbahloul.wordpress.com/ 2012/5/7 Hugh Kelley <[email protected]> > One more conceptual question (again, revealing my unfamiliarity with JAXB): > > In lsc.xml you are using the foobar XML namespace for your plugin-specific > elements ( > https://lsc-project.org/svn/lsc-samples/lsc-embeddable-sample/trunk/src/main/resources/etc/lsc.xml > ). > > <foobar:fooBarServiceSettings> > > Where are you telling the parser to use that namespace when it validates > the configuration? I don't see any namespace specification happening here > ( > https://lsc-project.org/svn/lsc-samples/lsc-embeddable-sample/trunk/src/main/java/com/foo/bar/FooBarLscService.java > ): > > serviceSettings = (FooBarServiceSettings) > task.getPluginDestinationService().getAny().get(0); > > > Hugh > > > On Thu, May 3, 2012 at 8:33 AM, Sébastien Bahloul < > [email protected]> wrote: > >> I've just added it to the following page : >> http://lsc-project.org/wiki/documentation/2.0/development/addingplugin >> >> >> - Copy the XSD to your etc subdirectory (required to check the XML >> structure) >> - Run it with flag -DLSC.PLUGINS.PACKAGEPATH=com.foo.bar.generated >> (so that JAXB parser could find the extended classes) >> >> -- >> Sebastien BAHLOUL >> IAM / Security specialist >> Ldap Synchronization Connector : http://lsc-project.org >> Blog : http://sbahloul.wordpress.com/ >> >> >> >> 2012/5/3 Sébastien Bahloul <[email protected]> >> >>> Hi Hugh, >>> >>> I need to add: >>> >>> Use -DLSC.PLUGINS.PACKAGEPATH=com.montpeliertr.lscplugins.generated >>> >>> where com.montpelietr.lscplugins.generated should contain the xjc >>> generated classes and especially the ObjectFactory class. >>> >>> Regards, >>> >>> -- >>> Sebastien BAHLOUL >>> IAM / Security specialist >>> Ldap Synchronization Connector : http://lsc-project.org >>> Blog : http://sbahloul.wordpress.com/ >>> >>> >>> >>> 2012/5/3 Sébastien Bahloul <[email protected]> >>> >>>> Hi Hugh, >>>> >>>> This is a runtime setting : you need to define it when you launch your >>>> JRE java command line or instead the VM Arguments zone inside the Arguments >>>> tab of your Debug configuration. This is quite complex but strictly >>>> required by the XML parser to support on-the-fly extension. >>>> >>>> Regards, >>>> -- >>>> Sebastien BAHLOUL >>>> IAM / Security specialist >>>> Ldap Synchronization Connector : http://lsc-project.org >>>> Blog : http://sbahloul.wordpress.com/ >>>> >>>> >>>> >>>> 2012/5/3 Hugh Kelley <[email protected]> >>>> >>>>> I've stepped through the code a bit and I'm making some progress. >>>>> This particular block of code is being skipped. >>>>> >>>>> if(System.getProperty("LSC.PLUGINS.PACKAGEPATH") != >>>>> null) { >>>>> String[] pathElements = >>>>> System.getProperty("LSC.PLUGINS.PACKAGEPATH").split(System.getProperty("path.separator")); >>>>> for(String pathElement: pathElements) { >>>>> >>>>> urls.addAll(ClasspathHelper.forPackage(pathElement)); >>>>> } >>>>> } >>>>> >>>>> I'm guessing that has something to do with this: >>>>> >>>>> >>>>> org.lsc.exception.LscConfigurationException: >>>>> java.lang.UnsupportedOperationException: Unknown plugin implementation: >>>>> com.montpeliertr.lscplugins.SortedLdapSourceService >>>>> >>>>> How do I set LSC.PLUGINS.PACKAGEPATH ? I didn't see a reference to >>>>> it in the >>>>> https://lsc-project.org/svn/lsc-samples/lsc-embeddable-sample/trunk/src/main/resources/etc/lsc.xmlexample. >>>>> >>>>> Hugh >>>>> >>>>> >>>>> >>>>> On Tue, May 1, 2012 at 7:18 AM, Hugh Kelley <[email protected]>wrote: >>>>> >>>>>> Many thanks for your continued help with this. >>>>>> >>>>>> I am trying to implement the steps you gave me but am clearly going >>>>>> astray somewhere. I have the following three files (attached). The >>>>>> plugin >>>>>> class is by no means final, but I wanted to make sure I had the >>>>>> configuration "wiring" correct, then finish the logic. >>>>>> >>>>>> I have put my plugin code in a jar and it appears to be added to the >>>>>> classpath. >>>>>> >>>>>> Adding C:\_Active\LSC\lsc-2.0rc2\bin\..\lib\mina-core-2.0.0-RC1.jar >>>>>> to classpath >>>>>> *Adding >>>>>> C:\_Active\LSC\lsc-2.0rc2\bin\..\lib\montpeliertr-sortedldap.jar to >>>>>> classpath* >>>>>> Adding C:\_Active\LSC\lsc-2.0rc2\bin\..\lib\ocutil-2.5.2.jar to >>>>>> classpath >>>>>> >>>>>> but when the configuration engine goes to load the plugin, it can >>>>>> not/will not: >>>>>> >>>>>> [Loaded javax.naming.directory.Attribute from >>>>>> C:\_SDKs\Java\jdk1.6.0_30\jre\lib\rt.jar] >>>>>> May 01 07:13:27 - ERROR - >>>>>> org.lsc.exception.LscConfigurationException: >>>>>> java.lang.UnsupportedOperationException: Unknown plugin implementation: >>>>>> com.montpeliertr.lscplugins.SortedLdapSourceService >>>>>> [Loaded ch.qos.logback.classic.spi.ThrowableProxy from >>>>>> file:/C:/_Active/LSC/lsc-2.0rc2/lib/logback-classic-0.9.21.jar] >>>>>> >>>>>> I would just step through the execution myself, but I still can't get >>>>>> past the slf4j-api runtime issue I mentioned on the other thread. >>>>>> >>>>>> Any suggestions are appreciated, >>>>>> >>>>>> Hugh >>>>>> >>>>>> >>>>>> >>>>>> On Fri, Apr 27, 2012 at 11:28 AM, Sébastien Bahloul < >>>>>> [email protected]> wrote: >>>>>> >>>>>>> Hi Hugh, >>>>>>> >>>>>>> To configure and use a new service, please consider the >>>>>>> FooBarLscService sample as decribed below. This fake service has been >>>>>>> designed as an extension of a SimpleJdbcDestinationService to describe >>>>>>> an >>>>>>> embeddable LSC : >>>>>>> >>>>>>> 1. First define the configuration extension format: >>>>>>> >>>>>>> https://lsc-project.org/svn/lsc-samples/lsc-embeddable-sample/trunk/src/main/resources/etc/foobar-lsc-1.0.xsd >>>>>>> >>>>>>> 2. Generate the corresponding source : >>>>>>> >>>>>>> $JAVA_HOME/bin/xjc -p com.foo.bar.generated >>>>>>> src/main/resources/etc/foobar-lsc-1.0.xsd >>>>>>> >>>>>>> 3. Use it inside the service itself: >>>>>>> https://lsc-project.org/svn/lsc-samples/lsc-embeddable-sample/trunk/src/main/java/com/foo/bar/FooBarLscService.java >>>>>>> (see >>>>>>> the constructor) >>>>>>> >>>>>>> 4. Configure it : >>>>>>> https://lsc-project.org/svn/lsc-samples/lsc-embeddable-sample/trunk/src/main/resources/etc/lsc.xml >>>>>>> (look >>>>>>> at the pluginDestinationService node) >>>>>>> >>>>>>> Regards, >>>>>>> -- >>>>>>> Sebastien BAHLOUL >>>>>>> IAM / Security specialist >>>>>>> Ldap Synchronization Connector : http://lsc-project.org >>>>>>> Blog : http://sbahloul.wordpress.com/ >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>> >>>>> _______________________________________________________________ >>>>> Ldap Synchronization Connector (LSC) - http://lsc-project.org >>>>> >>>>> lsc-users mailing list >>>>> [email protected] >>>>> http://lists.lsc-project.org/listinfo/lsc-users >>>>> >>>>> >>>> >>> >> >
_______________________________________________________________ Ldap Synchronization Connector (LSC) - http://lsc-project.org lsc-users mailing list [email protected] http://lists.lsc-project.org/listinfo/lsc-users

