[ 
https://issues.apache.org/jira/browse/CONNECTORS-345?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14154486#comment-14154486
 ] 

Karl Wright commented on CONNECTORS-345:
----------------------------------------

{quote}
The example is here.

In fact, Jetty itself uses XmlConfiguration.main(args) when starting by 
start.jar. See Also: org.eclipse.jetty.start.Main
{quote}

Well, here's the code:

{code}
Resource fileserver_xml = Resource.newSystemResource("exampleserver.xml");
XmlConfiguration.main(fileserver_xml.getFile().getAbsolutePath());
{code}

The XmlConfiguration.main() method works like any main method; you call it and 
it doesn't return until Jetty stops running.  The jetty runners, especially 
MCFJettyRunner, need to be able to start and stop the instance in software.  
What I was looking for was a way to load the Server configuration from an xml 
file, but not start the server yet.  I could then change the configuration with 
the things that MCF cares about, and deploy the MCF wars, before starting the 
server.

Other XmlConfiguration methods that might help are not immediately obvious.  
Maybe 
http://download.eclipse.org/jetty/stable-9/apidocs/org/eclipse/jetty/xml/XmlConfiguration.html#configure%28java.lang.Object%29
 will work, when Object is a Server instance?  I don't know...



> Jetty Configuration Support
> ---------------------------
>
>                 Key: CONNECTORS-345
>                 URL: https://issues.apache.org/jira/browse/CONNECTORS-345
>             Project: ManifoldCF
>          Issue Type: Improvement
>          Components: Framework core
>    Affects Versions: ManifoldCF 0.4
>         Environment: Jetty Configuration
>            Reporter: Michael J. Kelleher
>            Assignee: Karl Wright
>             Fix For: ManifoldCF 2.0
>
>         Attachments: CONNECTORS-345-sample.patch
>
>
> Can the single process example be extended to support Jetty configuration?
> 1) jetty.xml
> 2) webdefault.xml
> 3) OPTIONS=.... along with their corresponding XML config files, most 
> importantly the JMX option, Server,ajp,setuid would be nice to have



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to