[jboss-dev-forums] [Design of POJO Server] - Re: Customizing attachment name in parsing deployers

anil.saldhana@jboss.com do-not-reply at jboss.com
Wed Mar 18 14:35:50 EDT 2009


I am referring to parsing deployers derived from "AbstractParsingDeployerWithOutput".


  | /**
  |     * Create some meta data. Calls createMetaData(unit, name, suffix, getDeploymentType().getName()).
  |     * 
  |     * @param unit the deployment unit
  |     * @param name the name
  |     * @param suffix the suffix
  |     * @throws DeploymentException for any error
  |     */
  |    protected void createMetaData(DeploymentUnit unit, String name, String suffix) throws DeploymentException
  |    {
  |       createMetaData(unit, name, suffix, getOutput().getName());
  |    }
  | 


I had to write a deployer that overrode the create method as follows:

  | public final static String XACML_ATTACHMENT_NAME = "xacml.config";
  |  /**
  |     * Method overridden to make the attachment name to be not the same as
  |     * the deployment type but a custom name
  |     */
  |    @Override
  |    protected void createMetaData(DeploymentUnit unit, String name, String suffix) throws DeploymentException
  |    {
  |       createMetaData(unit, name, suffix, XACML_ATTACHMENT_NAME);
  |    } 
  | 

Maybe a method called as setAttachmentName?

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

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



More information about the jboss-dev-forums mailing list