[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Need a NamedObject SimpleMetaType

scott.stark@jboss.org do-not-reply at jboss.com
Fri Aug 3 11:32:10 EDT 2007


"adrian at jboss.org" wrote : 
  | Based on your "SecurityDomain" example then I don't see this as anything
  | more than a name with qualifier.
  | 
  | i.e. SecurityDomain/Default.
  | 
  | The trivial requirement could be served from the following
  | pseudo markup.
  | 
  | 
  |   | public class ConnectionManagerMetaData
  |   | {
  |   |    @ManagedObjectRef(type="SecurityDomain');
  |   |    public void setSecurityDomain(String securityDomain);
  |   | }
  |   | 
  |   | @MangedObject
  |   | public class SecurityDeployment
  |   | {
  |   |    @ManagedProperty
  |   |    Collection<SecurityPolicy> getPolicies();
  |   | }
  |   | 
  |   | public SecurityPolicyMetaData
  |   | {
  |   |     @ManagedObjectID(type="SecurityDomain")
  |   |     public String getName();
  |   | }
  |   | 
  | 
  | I'd actually turn the "policies" managed property into a map by id.
  | i.e. the property that gets constructed is not a collection it is effectively.
  | 
  |   | Map<String, ManagedObject<SecurityPolicy>>
  |   | 
  | 
  | There is a similar trick going on the 'unified metadata" for
  | 
  | object (id)
  | -------------
  | ejbs (ejb-name)
  | ejb-refs (ejb-ref-name)
  | etc.

Ok, something needs to identify that the SecurityDeployment is of type "SecurityDomain", and identify what the key under the "SecurityDomain" type is. Presumably something like?


  | @ManagementObject(type="SecurityDomain").
  | public class SecurityDeployment
  | {
  |    @ManagedProperty
  |    @ManagedObjectKey
  |    Collection<SecurityPolicy> getPolicies();
  | }
  | 


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

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



More information about the jboss-dev-forums mailing list