Date: 2004-05-05T11:56:29 Editor: 80.121.39.207 <> Wiki: Jakarta HiveMind Wiki Page: NotXMLProposal URL: http://wiki.apache.org/jakarta-hivemind/NotXMLProposal
no comment Change Log: ------------------------------------------------------------------------------ @@ -310,3 +310,8 @@ ColinSampaleanu: I don't know if you're looking for outside opinions, but I hate the idea of inventing a new format like SDL. I agree it's a a bit cleaner and easier to type than XML, but ultimately it doesn't seem to me the gain is that great that it makes up for the fact that it's completely proprietary and nobody is able to leverage the work of anybody else (i.e. other tools able to read the same format). For this reason, YAML or even a scrpting solution like Groovy or BeanShell are preferable to me, along with XML which should remain a standby. +ChristianEssl: I like !BeanShell more and more. Especially Harish's format looks quite readable and the Eclipse support is especially cool. What I still don't like is the way of constructing service-impl. As said it's not only unconvinient but also prevents the use of other !ServiceImplementationFactories. I'd like to see this happen through a script as well. Sorry that I did not respond to the closure question, but I was thinking of a solution and I've now at least an idea how it maybe could work: + +Instead of giving the implementation method a map or array, it should be given the name of a method defined in the script. The method would have the same signature and the same function as !ServiceImplementationFactory.createCoreServiceImplementation. Now the implementation() method would look up the corresponding !BshMethod serialize it and store it (encoded) in an Element. Than it would setup the implementation-descriptor so that a special !BeanShellServiceImplementationFactory is called with the Element as parameter. During runtime the Factory would just take the BshMethod (cache it) and execute it. (This means of course that the method is not executed in the context of the descriptor-script - so it's not a closure). I think a similar aproach could be used for interceptors. + +Beside of this I like !BeanShell, because I think most of the verbosity of xml-descriptors for containers (not only for HiveMind) comes from cut-and-paste for common tasks. Ie if you want to add a logging interceptor to five services you have to type the whole implementation stuff 5 times where only the service-id changes. Compare this with !BeanShell where you just define a method (in a lib) and pass it an array of service-ids. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
