This is well beyond my thinking for HiveMind where one aspect of the design is Simplicity.
The problems with adding new modules to a running Registry are several fold. HiveMind has a purposefully near-chaotic approach to moving data around between modules (configurations, contributions, implementations, etc.). In many cases, the data is very opaque, especially when using the ObjectProvider stuff (i.e., service:Foo). HiveMind honestly doesn't have a way to determine what that string resolves to short of resolving it. Adding new modules to the Registry at runtime makes a number of things much more complicated. Suddenly, whole new aspects of HiveMind have to be made threadsafe. This is very similar to my thoughst on hot redeployment: lots of pain, limited gain. Basic problem is configuration data; the new module may make new contributions to existing configuration points, some of which may have been "realized" into a List of Objects. In real HiveMind systems, that data can be dispersed pretty rapidly into many services. The opacity of the data means that HiveMind can't effectively figure out how to close down services and configurations so that they can be rebuilt. To get this to work would require a couple of layers of additional run-time meta-data; it's remotely possible, but not something I can justify working on. I appreciate your use-case and would point you in the direction of careful control of the classpath and class loaders .... do some kind of two-stage construction, where one Registry creates a second Registry from a larger number of locations (i.e., more class loaders). On Fri, 11 Mar 2005 15:16:48 -0600, Joel Trunick <[EMAIL PROTECTED]> wrote: > > This would be useful for our deployment as well, let me know what you > come up with. > > J > > -----Original Message----- > From: Bryce Ewing [mailto:[EMAIL PROTECTED] > Sent: Tuesday, March 08, 2005 10:39 PM > To: [email protected] > Subject: Adding services after starting registry > > Hi, > > I have had a search around for information on this but haven't managed > to find any. I have seen from the source that after starting the > registry if you try to add new service points that an exception is > thrown. > > Now my issue is that I am using hivemind as a component in a container > architecture that has multiple components that will have hivemodules > in them. Hivemind is an early component to load which then picks up > the later components and adds their services into the registry. > > The problem is that components may want to call hivemind services > before all the components are loaded (or a new component with hivemind > services might be hot deployed). Therefore the later hivemodules will > need to be added after the registry has been started. > > Just wondering two things: > a) why is it set up so that you can't do this? and therefore what > would happen if I changed it to do this > b) is there any way around this? > > Cheers > Bryce > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Howard M. Lewis Ship Independent J2EE / Open-Source Java Consultant Creator, Jakarta Tapestry Creator, Jakarta HiveMind Professional Tapestry training, mentoring, support and project work. http://howardlewisship.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
