Hi, On 29.03.2010 23:55, Justin Edelson wrote: > This does remind me that I keep meaning to ask if anyone knows/remembers why > the bundles are in the start levels they are and whether or not this is > necessary.... e.g. why is commons.log in start level 1 (and not 0)? > > In this particular case, it seems like we should move jcr.resource into > start level 15, with the other jcr bundles. > > OR... > > we should get rid of start levels at all and just stick everything in 0. > > In either case, I think we should use Require-Bundle to express the > dependency between servlets.get and jcr.resource. I usually don't love the > use of Require-Bundle but in this case, we need to document the dependency > somewhere (even though we recover from the error)
Require-Bundle is like a red rag to me ;-) It would create all sorts of problems (strong bundle dependency is just one among them) to fix a minor issue which is a bit exagerated due to the stacktrace occurring in the log file (as I said, node type management is currently sub-optimal and error handling close to impossible). Also, there is (technically) no relationship between servlets.get and jcr.resource. There is a dependency of the node type in servlets.get on the node types provided by jcr.resource. That's all. And nothing dramatic - in the end of the day (today), servlets.get is not operational at all if jcr.resource is not available. Maybe it is just plain wrong to have node type definitions in the servlets.get bundle in the first place. Maybe its better to move the node types to the jcr.resource bundle, because it is basically the jcr.resource bundle, which creates the redirect resource instance while the servlets.get bundle just supports such resources for redirection. So, how about moving the node type definition to the jcr.resource bundle ? Regards Felix > > Justin > > > On Sun, Mar 28, 2010 at 4:20 AM, Ian Boston <[email protected]> wrote: > >> Hi >> What us the procedure for handling unlisted bundle dependencies ? >> >> eg, servlets/get has a dependency on resources since it has a redirect.cnd >> with a super type defined in jcr/resource >> >> If servlets get loads it node types before jsr/resource the there is an >> exception, eg >> Caused by: org.apache.jackrabbit.core.nodetype.InvalidNodeTypeDefException: >> [{http://sling.apache.org/jcr/sling/1.0}Redirect<http://sling.apache.org/jcr/sling/1.0%7DRedirect>] >> invalid supertype: >> {http://sling.apache.org/jcr/sling/1.0}Resource<http://sling.apache.org/jcr/sling/1.0%7DResource> >> >> This only happens on certain OS's since the load sequence is file system >> order dependent with disconnected bundles in the same start level. (eg its >> OK on OSX which lists directors in natural order, but not ok on ext3 which >> lists in date order iirc) >> >> and a second question. >> >> Is it possible to change, invert or randomize the start order in Felix so >> that I don't have to test startup on all the OS's I can run a VM for ? >> >> >> Ian >> >> (perhaps redirect.cnd should be in jcr/resources ? ) >
