[jboss-dev-forums] [Design of POJO Server] - Re: JBAS-1841 - ServiceController/Microcontainer integration

adrian@jboss.org do-not-reply at jboss.com
Thu Aug 10 16:04:20 EDT 2006


I've nearly finished this, so I can soon start working on the
new deployers. :-)

* Things that need doing immediately:

1) Make the synchronization inside AbstractController only for state,
like the old ServiceController.

Currently when you do install() or change() it synchronizes to
avoid concurrent access. This means that shutdown will hang
if one of these operations hangs. e.g. an MBean is broken
The shutdown thread can't enter the synchronized method.

2) There are a couple of things I found that need fixing
in the old ServiceController during testing. These need
to be backported to JBoss4. Most are just NPEs where
errors/invalid configuration are not handled correctly.

One however causes a broken state machine when the parsing
of an invalid object name in a dependency leaves the MBean
registered but not under the control of the ServiceController.

The fix is trivial, it needs to catch Throwable instead of Exception
to do the tidyup.

Also, the use of ObjectNameFactory.create() is spurious in this code
(that method factory is a helper for known valid ObjectNames),
since this will throw java.lang.Error instead of the real
MalformedObjectNameException

* Things that need doing for the new deployers:

1) Rewrite the IncompleteDeploymentException to include pojo
contexts.

* Things that need doing longer term:

1) Test the trim/replace attributes in the ServiceController
I think this will probably open a can of worms. :-)

2) Test XMBean

3) Add extra metadata options to -service.xml
like constructor dependencies/injection

  | <server>
  |    <constructor>
  |       <arg type="SomeClass"><inject bean="Blah"/>
  | ...
  | 

4) Make MBeanProxy injection be a CONFIGURED dependency
as well as a CREATE/START injection.

This is trivial and just needs testing.

e.g.

  | <server>
  |    <mbean>
  |       <depends optional-attribute-name="Attribute"
  |                       proxy-type="SomeInterface">test:type=Depends</depends>
  | 

Currently if test:type=Depends is not installed it will fail
when trying to use the proxy.
The MBean should not reach the CONFIGURED stage
until test:type=Depends is installed.

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

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



More information about the jboss-dev-forums mailing list