the only reason i don't like it is because of its verbosity otherwise it is a cool format.
Well i pushed a version using the xml file. Here the several parts: * https://svn.apache.org/repos/asf/openejb/trunk/maven-plugins/spi-helper-maven-plugin/ : the maven plugin to scan an app * rest-example pom ( http://svn.apache.org/repos/asf/openejb/trunk/openejb/examples/webapps/rest-example/pom.xml) : one usage of the plugin (even if here it is probably useless) * https://svn.apache.org/repos/asf/openejb/trunk/maven-plugins/xbean-xml/ : the module containing jaxb classes and a helper class to create the annotation finder * openejb-core/.../FinderFactory: updated to try to get the scan.xml file before creating a standard finder Note: the descriptor is in META-INF/org/apache/xbean/scan.xml excepted for webapp where META-INF is replaced by WEB-INF to be consistent with other descriptors. - Romain 2012/2/21 Alan D. Cabrera <l...@toolazydogs.com> > I like XML because we can have enforcement via schema. > > > Regards, > Alan > > > On Feb 21, 2012, at 6:39 AM, Romain Manni-Bucau wrote: > > > I think the same. > > > > I think we don't really have any choice regarding the format since we > don't > > want to bring another lib to do anything more than we need in tomee > > webprofile. > > > > It is either properties, plain txt or xml file. > > > > - Romain > > > > > > 2012/2/21 Alan D. Cabrera <l...@toolazydogs.com> > > > >> I think that it would be nicer to have a simple file that all manner of > >> tooling can read, e.g. python. > >> > >> With that said, the XML file format seems simple enough and I doubt that > >> any large jar would pose a problem memory or CPU wise. JMHO. > >> > >> > >> Regards, > >> Alan > >> > >> > >> On Feb 20, 2012, at 4:49 PM, Mohammad Nour El-Din wrote: > >> > >>> I have one concern, still by having an XML generated and we still like > >>> reading only information about such classes and the overhead of reading > >> XML > >>> in memory in case we have a large one(s). > >>> > >>> Why not generate a code out of that which is compiled with the jar or > >> even > >>> added to the an existing jar which will be much faster and this code > can > >> be > >>> based on templates which developers can extend, change or customize. > >>> > >>> Thoughts ? > >>> > >>> On Tue, Feb 21, 2012 at 1:46 AM, Mohammad Nour El-Din < > >>> nour.moham...@gmail.com> wrote: > >>> > >>>> > >>>> > >>>> On Tue, Feb 21, 2012 at 12:32 AM, Alan D. Cabrera < > l...@toolazydogs.com > >>> wrote: > >>>> > >>>>> Neat idea. > >>>>> > >>>>> I would include the configuration information in the scan.xml so that > >>>>> tooling would know the criteria used in the scan and decide whether > or > >> not > >>>>> to scan for other annotations or inplementations. > >>>>> > >>>>> I would also put the scan.xml file in some package specific place > like > >>>>> META-INF/org/apache/xbean/scan.xml. > >>>>> > >>>> > >>>> +1 on the idea and the additions on Alan > >>>> > >>>> > >>>>> > >>>>> > >>>>> Regards, > >>>>> Alan > >>>>> > >>>>> > >>>>> On Feb 20, 2012, at 2:40 PM, David Blevins wrote: > >>>>> > >>>>>> We've chatted occasionally on creating a scanning.xml file where > >> people > >>>>> could setup includes and excludes and, overall, optimize classpath > >> scanning. > >>>>>> > >>>>>> Romain is already busy hacking of course :) Here's the idea for a > >>>>> plugin to effectively do the most expensive part of scanning in > >> advance: > >>>>>> > >>>>>> <plugin> > >>>>>> <groupId>org.apache.xbean</groupId> > >>>>>> <artifactId>maven-xbean-finder-plugin</artifactId> > >>>>>> <configuration> > >>>>>> <annotations> > >>>>>> <annotation>javax.ejb.Stateless</annotation> > >>>>>> <annotation>javax.ejb.Stateful</annotation> > >>>>>> <annotation>javax.ejb.Singleton</annotation> > >>>>>> <annotation>javax.annotation.ManagedBean</annotation> > >>>>>> </annotations> > >>>>>> <subclasses> > >>>>>> <subclass>javax.ws.rs.core.Application</subclass> > >>>>>> </subclasses> > >>>>>> <implementations> > >>>>>> > >>>>> > >> <implementation>org.apache.openejb.server.ServerService</implementation> > >>>>>> </implementations> > >>>>>> </configuration> > >>>>>> </plugin> > >>>>>> > >>>>>> With a configuration like the above, the plugin would scan the jar > for > >>>>> subclasses of javax.ws.rs.core.Application, classes annotated with > >>>>> @Stateless, @Singleton, @Stateful and classes that implement > >> ServiceService. > >>>>>> > >>>>>> The result would be a META-INF/scan.xml class that looks like so: > >>>>>> > >>>>>> <scan> > >>>>>> <classes> > >>>>>> <class>org.superbiz.Foo</class> > >>>>>> <class>org.superbiz.Bar</class> > >>>>>> <class>org.superbiz.Baz</class> > >>>>>> </classes> > >>>>>> </scan> > >>>>>> > >>>>>> And on the TODO list would be future support for <packages> > >>>>>> > >>>>>> <scan> > >>>>>> <packages> > >>>>>> <package>org.superbiz.foo</package> > >>>>>> <package>org.superbiz.bar</package> > >>>>>> </packages> > >>>>>> </scan> > >>>>>> > >>>>>> With the above you could easily create scan.xml file by hand that > >> would > >>>>> at least be far faster than scanning an entire jar. > >>>>>> > >>>>>> > >>>>>> Thoughts? > >>>>>> > >>>>>> > >>>>>> -David > >>>>>> > >>>>> > >>>>> > >>>> > >>>> > >>>> -- > >>>> Thanks > >>>> - Mohammad Nour > >>>> ---- > >>>> "Life is like riding a bicycle. To keep your balance you must keep > >> moving" > >>>> - Albert Einstein > >>>> > >>>> > >>> > >>> > >>> -- > >>> Thanks > >>> - Mohammad Nour > >>> ---- > >>> "Life is like riding a bicycle. To keep your balance you must keep > >> moving" > >>> - Albert Einstein > >> > >> > >