dev@glassfish.java.net

initial xml snippet

From: Jerome Dochez <Jerome.Dochez_at_Sun.COM>
Date: Tue, 07 Jul 2009 12:28:22 -0700

Hi Vivek

The service to add the initial container XML snippet is ConfigParser.
Most likely, you should do that in your Sniffer :

public class JrubySniffer implements Sniffer {

        @Inject(optional=true)
        JRubyConfig config=null;

        @Inject
        ConfigParser parser;

        @Inject
        Habitat habitat;

        public void setup() {
                if (config==null) {
                        // time to add first config ever...
                        URL tt = ....
                        config = (JRubyConfig) parser.parseContainerConfig(habitat, tt);
                }

        }

that's it or be close to it... let me know if you run into issues.

Jerome