-
15. Re: ManagedObject support in next messaging release
starksm64 Nov 7, 2007 4:19 PM (in response to starksm64)This won't work because it requires the mbean code to use the annotations. The point of the indirection was to allow the deployment descriptor to specify the class to parse for the annotations, and to provide that as part of the server integration code. So, a queue would use the mbean/annotation to indicate the class to pass to the AbstractManagedObjectFactory:
<mbean code="org.jboss.jms.server.destination.QueueService" name="jboss.messaging.destination:service=Queue,name=DLQ" xmbean-dd="xmdesc/Queue-xmbean.xml"> <annotation>@org.jboss.system.deployers.managed.ManagementObjectClass(code="org.jboss.jms.server.destination.QueueServiceMO")</annotation> <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends> <depends>jboss.messaging:service=PostOffice</depends> </mbean>
The org.jboss.jms.server.destination.QueueServiceMO class would be in the jbossas/messaging integration codebase. -
16. Re: ManagedObject support in next messaging release
alesj Nov 8, 2007 3:58 AM (in response to starksm64)"scott.stark@jboss.org" wrote:
Here is another approach that also moves toward having the annotations in the xml config. We do have some annotation support in the service mbean descriptors, for example:
I can see we are parsing the annotation element in mbeans.
But we are not merging the annotations - as in MC - in some of the Controller actions?
Is this something that should/must be done?
Or is this the solution? :-)"scott.stark@jboss.org" wrote:
Possibly, if you change from -service.xml to -beans.xml for the destinations. -
17. Re: ManagedObject support in next messaging release
dimitris Nov 8, 2007 12:03 PM (in response to starksm64)Yes, I don't see the in the -service.xml descriptor being merged in the loaded mbean class. They only appear as strings inside the service metadata. I suppose they should be merged.
-
18. Re: ManagedObject support in next messaging release
starksm64 Nov 8, 2007 2:30 PM (in response to starksm64)Currently the annotation is just metadata. The service mbean container has no integration with the aop layer. Its just extra metadata. There is a future jira issue to rewrite the xmbean container to have its interceptors be proper aop aspects.
http://jira.jboss.com/jira/browse/JBAS-1701
For the ServiceMetaDataICF issue, it just needs to ServiceMetaData/ServiceAnnotationMetaData to see if there is another class that should be used for the managed object view. -
19. Re: ManagedObject support in next messaging release
dimitris Nov 8, 2007 2:50 PM (in response to starksm64)Ok, I'll use that.
-
20. Re: ManagedObject support in next messaging release
dimitris Nov 9, 2007 5:51 AM (in response to starksm64)I added the org.jboss.system.deployers.managed.ManagementObjectClass annotation and modified the code do deal with it in org.jboss.system.deployers.managed.ServiceMetaDataICF .
The 2 queues in deploy/messaging/destination-service.xml are now annotated by default:<mbean code="org.jboss.jms.server.destination.QueueService" name="jboss.messaging.destination:service=Queue,name=DLQ" xmbean-dd="xmdesc/Queue-xmbean.xml"> <annotation>@org.jboss.system.deployers.managed.ManagementObjectClass(code=org.jboss.jms.server.destination.QueueServiceMO)</annotation> <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends> <depends>jboss.messaging:service=PostOffice</depends> </mbean>
Based on the xmbean metadata for JBM QueueService and TopicService I created 2 new classes to hold the management information in the messaging integration module:
org.jboss.jms.server.destination.QueueServiceMO
org.jboss.jms.server.destination.TopicServiceMO -
21. Re: ManagedObject support in next messaging release
dimitris Nov 9, 2007 6:21 AM (in response to starksm64)Running tests-profileservice there is a debug message in the server log about not been able to read the serverPeer attribute.
After the management class for a service is defined by ServiceMetaDataICF.getManagedObjectClass() so that management metadata can be established, is that class participating at all when reading/writing attribute values?2007-11-09 13:11:42,640 DEBUG [org.jboss.system.deployers.managed.ServiceMetaDataICF] Using alternate class 'class org.jboss.jms.server.destination.QueueServiceMO' for class class org.jboss.jms.server.destination.QueueService 2007-11-09 13:11:42,640 DEBUG [org.jboss.system.deployers.managed.ServiceMetaDataICF] Failed to get property value for bean: org.jboss.jms.server.destination.QueueServiceMO, property: serverPeer java.lang.IllegalArgumentException: Property is not readable: MBeanServer for javax.management.ObjectName at org.jboss.beans.info.plugins.AbstractPropertyInfo.get(AbstractPropertyInfo.java:170) at org.jboss.beans.info.plugins.AbstractBeanInfo.getProperty(AbstractBeanInfo.java:238) at org.jboss.metatype.plugins.values.DefaultMetaValueFactory.createCompositeValue(DefaultMetaValueFactory.java:361) at org.jboss.metatype.plugins.values.DefaultMetaValueFactory.internalCreate(DefaultMetaValueFactory.java:773) at org.jboss.metatype.plugins.values.DefaultMetaValueFactory.create(DefaultMetaValueFactory.java:432) at org.jboss.system.deployers.managed.ServiceMetaDataICF.getValue(ServiceMetaDataICF.java:141) at org.jboss.system.deployers.managed.ServiceMetaDataICF.getValue(ServiceMetaDataICF.java:52) at org.jboss.managed.plugins.factory.AbstractManagedObjectFactory.populateValues(AbstractManagedObjectFactory.java:585) at org.jboss.managed.plugins.factory.AbstractManagedObjectFactory.populateManagedObject(AbstractManagedObjectFactory.java:534) at org.jboss.managed.plugins.factory.AbstractManagedObjectFactory.initManagedObject(AbstractManagedObjectFactory.java:171) at org.jboss.managed.plugins.factory.AbstractManagedObjectFactory.getValue(AbstractManagedObjectFactory.java:727) at org.jboss.managed.plugins.factory.AbstractManagedObjectFactory.populateValues(AbstractManagedObjectFactory.java:585) at org.jboss.managed.plugins.factory.AbstractManagedObjectFactory.populateManagedObject(AbstractManagedObjectFactory.java:534) at org.jboss.managed.plugins.factory.AbstractManagedObjectFactory.initManagedObject(AbstractManagedObjectFactory.java:171) at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.build(AbstractParsingDeployerWithOutput.java:290) at org.jboss.deployers.plugins.deployers.DeployerWrapper.build(DeployerWrapper.java:202) at org.jboss.deployers.plugins.deployers.DeployersImpl.getManagedObjects(DeployersImpl.java:339) at org.jboss.deployers.plugins.main.MainDeployerImpl.getManagedObjects(MainDeployerImpl.java:459) at org.jboss.deployers.plugins.main.MainDeployerImpl.processManagedDeployment(MainDeployerImpl.java:508) at org.jboss.deployers.plugins.main.MainDeployerImpl.getManagedDeployment(MainDeployerImpl.java:437) at org.jboss.profileservice.management.ManagementViewImpl.loadProfile(ManagementViewImpl.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:121) at org.jboss.aspects.remoting.AOPRemotingInvocationHandler.invoke(AOPRemotingInvocationHandler.java:82) at org.jboss.profileservice.remoting.ProfileServiceInvocationHandler.invoke(ProfileServiceInvocationHandler.java:56) at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:771) at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:573) at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:373) at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:166)