[jboss-dev-forums] [Design of POJO Server] - Re: Why do Topic/Queue descriptors need extra metadata in or

alesj do-not-reply at jboss.com
Fri Nov 21 08:39:35 EST 2008


"adrian at jboss.org" wrote : 
  | Even without the xml, it should be possible to write a simple bean
  | that can be deployed to the MC to do this as a "quick fix".
  | 
I guess we need something like this (but more generic).

  |       Kernel kernel = null;
  |       KernelMetaDataRepository repository = kernel.getMetaDataRepository();
  |       MutableMetaDataRepository mmdr = repository.getMetaDataRepository();
  |       String className = context.getBeanInfo().getName();
  |       if ("org.jboss.jms.server.destination.QueueService".equals(className))
  |       {
  |          MutableMetaData retrieval = (MutableMetaData)mmdr.getMetaDataRetrieval(new ScopeKey(CommonLevels.CLASS, className));
  |          ManagementObjectClass moc = null; // proxy
  |          retrieval.addAnnotation(moc);
  |       }
  | 
But what would be a good place to add this?
Does ServiceControllerContext even have similar logic?

We need to know that context has passed Instantiate state - to match class name.

This would be pretty trivial to add as a bean with callbacks
if only callbacks could get a hold of ControllerContext that triggered callback. :-)

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

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



More information about the jboss-dev-forums mailing list