dev@glassfish.java.net

Re: initial xml snippet

From: Vivek Pandey <Vivek.Pandey_at_Sun.COM>
Date: Tue, 07 Jul 2009 13:02:45 -0700

Jerome Dochez wrote:
> Hi Vivek
>
> The service to add the initial container XML snippet is ConfigParser.
> Most likely, you should do that in your Sniffer :
>
Why not the Container? I can do at either place, it is just that why you
prefer doing in Sniffer vs Container?

I will try the ConfigParser and get back to you if there are any questions.

-vivek.
> 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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>