[jboss-dev-forums] [Design of Security on JBoss] - Re: Security Injection in AS5

scott.stark@jboss.org do-not-reply at jboss.com
Sat Apr 26 10:44:09 EDT 2008


"sguilhen at redhat.com" wrote : 
  | I've started by taking a look at the aop-mc integration, as AOP had to define their beans and metadata factories to make it possible to use the aop elements in the -beans.xml files.
  | 
  | So I've created a module, security-mc-int under the microcontainer project (not sure it should be there, just using the same approach AOP has taken), defined the beans, defined the security-beans.xsd, and started the implementation of the metadata factory.
  | 
Definitely does not belong under the microcontainer project. It belongs under the security project.

"sguilhen at redhat.com" wrote : 
  | I still have to figure out a couple of things. First, can I add post-installation behavior to my beans just by implementing the install and uninstall methods or is it necessary to configure an aop lifecycle for that?
Just define create/start/stop/destroy methods as desired on the bean that should perform the setup.

"sguilhen at redhat.com" wrote : 
  | Second, I don't expect things to magically happen just by defining the metadata factory. Somehow I must bind it to the schema being parsed (that is, somehow the MC must know which factory to use when facing an application-policy element).
  | 

Use the XmlRootElement/JBossXmlSchema to define the element name appearing in under the beans.xml deployment element and its namespace:

  | @JBossXmlSchema(namespace="urn:jboss:aop-beans:1.0", elementFormDefault=XmlNsForm.QUALIFIED)
  | @XmlRootElement(name="annotation-introduction")
  | public class AnnotationIntroductionBeanMetaDataFactory extends AbstractAnnotationBeanMetaDataFactory
  | {
  | 
  |    private static final long serialVersionUID = 1L;
  | 
  |    @Override
  |    protected String getBeanClassName()
  |    {
  |       return AnnotationIntroduction.class.getName();
  |    }
  | 
  | }
  | 

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

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



More information about the jboss-dev-forums mailing list