On Feb 13, 2012, at 1:12 PM, Romain Manni-Bucau wrote: > Idea: dump info tree in a file in the app at build time (mvn for the first > version) then at runtime simply read this file (skip scanning etc...) > > Starting code: > https://svn.apache.org/repos/asf/openejb/trunk/maven-plugins/info-maven-plugin/ > > Still need a lot of enhancement but any help/ideas are welcome ;) > > Current issues: > 1) what to do about paths -> override them after having read the info tree?
Something like that. All the paths are in variables called "path" and only contained in AppInfo and the various "module infos" like ClientInfo. So it would be easy to iterate over them and fix them. Maybe we turn all the module paths into URI strings and make them relative to the AppInfo path (in URI form). Then once that loop is finished, we turn AppInfo.path to null. On the read part, we create a URI for what would be the AppInfo.path, iterate over all the module paths and resolve them relative to the AppInfo URI, turn each one into an absolute file path, then finally set the appInfo.path as an absolute file path from the main URI. > 2) how to replace all the info tree in the current core, it seems it is not > so easy (to do so for EJBContainers and TomEE for instance since the API > usage is different), any preferred place for such a change? I don't really see a good way to support it in the EJBContainer API. The only simple way would seem to be a property that points to the module where we would find a META-INF/app-info.xml. If that was there we'd skip all the other logic and go straight to the assembler part. -David
