[jboss-user] [Microcontainer] - Re: migrating from ServiceMBeanSupport

jhalliday do-not-reply at jboss.com
Thu Nov 29 05:59:29 EST 2007


Fair enough. So I can't do much of my setup in the service constructor, as I don't have the information yet at that time. I need to do the work in the start method instead. That's actually less effort for me, as it's how things currently work.

The problem with that is: many other services depend on the transaction manager. As far as I can tell, under the old pre-MC semantics, depends meant 'ensure the other service has started'. As a result, work the transaction manager does in the start method would be finished before anything that depends on it was executed. Under MC, depends seems to mean 'ensure the service I depend on has reached at least the same point in the lifecycle as the one I'm transitioning to' by default.

As a result, some services are being instantiated and failing because they actually depend on the transaction manager having been started, not just created. Moving the work of transaction manager setup into its service constructor would have fixed that, but it's not an option. The only alternative I see is to change the depends clause of all the things that depend on the transaction manager, such that they explicitly require it to be started. That's somewhat less elegant than I was hoping for.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4108833#4108833

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4108833



More information about the jboss-user mailing list