-
1. Re: lifecylde api?
adrian.brock Jan 7, 2005 1:40 PM (in response to bill.burke)No it is not implemented yet.
In fact, some like the EJB container do a form three phase startup.
You'll find there are three reasons for two phase startup.
1) Need to lookup/use something from a different service which won't be in a useful
state until it has been started.
2) Need to do something beyond basic config, e.g. bind to jndi or a server socket.
3) Similar to (1) and (2): do some of registry processing, e.g. a jms queue
does destinationManger.addQueue() during start.
All these are planned to be replaced by microcontainer aspects
1) Dependency Injection
2) Externalization of configuration:<bean name="whatever" .../> <bean name="whatever.jndi" bean="JNDIBinding"> <attribute name="target"><depends name="whatever"/></attribute> <attribute name="jndiName">some/context/whatever</attribute> </bean>
3) This is an aspect of the reverse dependency processing:<bean name="queue"> ... <reverse-dependency name="destinationManager" method="addQueue"/> </bean>
which means when queue is fully available do destinationManager.addQueue(this); -
2. Re: lifecylde api?
adrian.brock Jan 7, 2005 1:45 PM (in response to bill.burke)Additionally, the lifecycle will be implemented for backwards compatibility,
but it will more flexible so you don't have to extend JBoss classes.
There will be an implementation that does recognise the old jboss ServiceMBean
rather than having to retrofit tags/xml config.@jboss.start public void bindToJNDI() { } @jboss.stop public void unbindToJNDI() { }
More frequently, it will not need dependency processing on other beans.
Instead it just wants to do what create() gives you. i.e. all config parameters
have been set so do some additional processing:@jboss.afterInjection public void getGo() { }
-
3. Re: lifecylde api?
ivelin.ivanov Jan 8, 2005 1:41 AM (in response to bill.burke)reverse-dependency is a misleading term. The queue cannot be added before DestinationManager is available, so it is like normal dependency. On the other hand the DestManager does not really need the Queue in order to init and start. Maybe <reverse-inject>? It communicates that there is no tight dependency between the two beans, but they still work together.
-
4. Re: lifecylde api?
adrian.brock Jan 10, 2005 2:39 PM (in response to bill.burke)I called it reverse-dependency because you are specify a dependency
but it works the other way around.
Instead of,
depends:The Queue needs a DestinationManager
you write
reverse-depends The Queue should active the DestinationManager
if it is not already active.
This enables the on-demand/manual startup configuration.
i.e. don't bootstrap JMS unless there are queue deployments.
You are correct, that I do want to extend the idea to areas where it is not
a strict dependency, more of a relationship. -
5. Re: lifecylde api?
juha Jan 12, 2005 4:06 PM (in response to bill.burke)So call it "activate"... what with this "reverse" stuff, anyway? ;-)
-
6. Re: lifecylde api?
adrian.brock Jan 12, 2005 4:32 PM (in response to bill.burke)Humpty dumpty :-)
-
7. Re: lifecylde api?
juha Jan 12, 2005 6:15 PM (in response to bill.burke)No, the right answer would have been: obfuscation is good for the services business ;-)