Multiple puppet resources which share a single config file

My go-to approach for things like this is to use the concat module, which will handle all of the notifications for building the config file itself, and wrap it in application-specific resource definitions. What I mean by that last part is something like this:

class jboss {
  concat { '/path/to/jboss/config/file':
    owner => 'whoever',
    group => 'whoever',
    mode  => 'whatever',
  }
  concat::fragment { 'jboss header':
    target  => '/path/to/jboss/config/file',
    content => template('jboss/config.header.erb'),
    order   => 00,
  }
  concat::fragment { 'jboss footer':
    target  => '/path/to/jboss/config/file',
    content => template('jboss/config.footer.erb'),
    order   => 99,
  }
}
define jboss_config ($config) {
  concat::fragment { "jboss config ${title}":
    target  => '/path/to/jboss/config/file',
    content => template('jboss/config.item.erb'),
    # Alternately, if your needs are simple enough:
    #content => "${config}\n",
  }
}

Because you're wrapping the file concatenation, the client modules don't have to know about the exact mechanism you're using for the configuration, and you can add parameters to the resource as needed for describing it in a natural way (i.e. not having to write strings that match the config file syntax, but specifying only the necessary configuration data.)