Web application load order

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Web application load order

Mircea Amarascu-3
Hello,

I have two web applications to be loaded by Jetty, e.g.

  <Call name="addWebApplication">
    <Arg>/firstwebapp</Arg>
    <Arg><SystemProperty name="jetty.lib.dir"/>/firstwebapp.war</Arg>
    <Set name="extractWAR">true</Set>
  </Call>

 <Call name="addWebApplication">
   <Arg>/secondwebapp</Arg>
    <Arg><SystemProperty name="jetty.lib.dir"/>/secondwebapp.war</Arg>
    <Set name="extractWAR">true</Set>
 </Call>

Is there a way I can specify that secondwebapp.war is to be
loaded/started after the firstwebapp.war has finished loading ?

Thanks.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support
Reply | Threaded
Open this post in threaded view
|

Re: Web application load order

Jesse McConnell
What mechanism are you using to start jetty with these webapps?  the java -jar start.jar mechanic?

Also could you attach your complete xml file where you have these webapps configured? 

And...your basically wanting to have the second webapp deployment to block until the first webapp is available, correct?

cheers!
jesse

On Dec 20, 2007 8:43 AM, Mircea Amarascu <[hidden email]> wrote:
Hello,

I have two web applications to be loaded by Jetty, e.g.

 <Call name="addWebApplication">
   <Arg>/firstwebapp</Arg>
   <Arg><SystemProperty name="jetty.lib.dir "/>/firstwebapp.war</Arg>
   <Set name="extractWAR">true</Set>
 </Call>

 <Call name="addWebApplication">
  <Arg>/secondwebapp</Arg>
   <Arg><SystemProperty name="jetty.lib.dir"/>/secondwebapp.war</Arg>
   <Set name="extractWAR">true</Set>
 </Call>

Is there a way I can specify that secondwebapp.war is to be
loaded/started after the firstwebapp.war has finished loading ?

Thanks.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support



--
jesse mcconnell
[hidden email]
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support
Reply | Threaded
Open this post in threaded view
|

Re: Web application load order

Mircea Amarascu-3
Jesse McConnell wrote:

> What mechanism are you using to start jetty with these webapps?  the
> java -jar start.jar mechanic?
>
> Also could you attach your complete xml file where you have these
> webapps configured?
>
> And...your basically wanting to have the second webapp deployment to
> block until the first webapp is available, correct?
>
> cheers!
> jesse
>
Hi,

Jetty is started like this : java ... org.mortbay.jetty.Server
/path/to/jetty.xml

I've attached jetty.xml configuration file.

Yes, i want second.war to start deploying only after first.war is available.

Thanks.

<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC
 "-//Mort Bay Consulting//DTD Configure 1.2//EN"
 "http://jetty.mortbay.org/configure_1_2.dtd">
                                               
<Configure class="org.mortbay.jetty.Server">

  <Call name="addListener">
    <Arg>
      <New class="org.mortbay.http.SocketListener">
        <Set name="Port">2000</Set>    
      <Set name="PoolName">P2</Set>
        <Set name="MinThreads">20</Set>
        <Set name="MaxThreads">200</Set>
      </New>
    </Arg>
  </Call>

  <Set name="rootWebApp">sipxconfig</Set>
  <Call name="addWebApplication">
    <Arg>/first</Arg>
    <Arg><SystemProperty name="jetty.lib.dir"/>/first.war</Arg>
    <Set name="extractWAR">true</Set>
  </Call>

 <Call name="addWebApplication">
   <Arg>/second</Arg>
    <Arg><SystemProperty name="jetty.lib.dir"/>/second.war</Arg>
    <Set name="extractWAR">true</Set>
 </Call>

</Configure>

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support
Reply | Threaded
Open this post in threaded view
|

Re: Web application load order

David Yu-2
It looks like you are using jetty 4/5.  If you plan to use Jetty 6, its
simply configured as:

    <Set name="handler">
      <New id="Handlers"
class="org.mortbay.jetty.handler.HandlerCollection">
        <Set name="handlers">
         <Array type="org.mortbay.jetty.Handler">
           <Item>
             <New id="Contexts"
class="org.mortbay.jetty.handler.ContextHandlerCollection"/>
                <Set name="handlers">
                  <Array type="org.mortbay.jetty.Handler">
                    <New class="org.mortbay.jetty.webapp.WebAppContext">
                      <Arg><SystemProperty
name="jetty.lib.dir"/>/first.war</Arg>
                      <Arg>/first</Arg>
                    </New>
                    <New class="org.mortbay.jetty.webapp.WebAppContext">
                      <Arg><SystemProperty
name="jetty.lib.dir"/>/second.war</Arg>
                      <Arg>/second</Arg>
                    </New>                  
                  </Array>
                </Set>
            </New>
           </Item>
           <Item>
             <New id="DefaultHandler"
class="org.mortbay.jetty.handler.DefaultHandler"/>
           </Item>
           <Item>
             <New id="RequestLog"
class="org.mortbay.jetty.handler.RequestLogHandler"/>
           </Item>
         </Array>
        </Set>
      </New>
    </Set>

Cheers

Mircea Amarascu wrote:

> Jesse McConnell wrote:
>> What mechanism are you using to start jetty with these webapps?  the
>> java -jar start.jar mechanic?
>>
>> Also could you attach your complete xml file where you have these
>> webapps configured?
>> And...your basically wanting to have the second webapp deployment to
>> block until the first webapp is available, correct?
>>
>> cheers!
>> jesse
>>
> Hi,
>
> Jetty is started like this : java ... org.mortbay.jetty.Server
> /path/to/jetty.xml
>
> I've attached jetty.xml configuration file.
>
> Yes, i want second.war to start deploying only after first.war is
> available.
>
> Thanks.
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> ------------------------------------------------------------------------
>
> _______________________________________________
> Jetty-support mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jetty-support


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support
Reply | Threaded
Open this post in threaded view
|

Re: Web application load order

p_v_nr
This post was updated on .
I am using Jetty-6.1.15

I tried to follow what is posted below. The following is my xml text from jetty.xml and I am starting jetty using the command java -jar start.jar etc/jetty.xml. Its not working. It loads the war file named First.war first and then Second.war second. Is there anything that I am doing wrong here.

 <New id="Contexts" class="org.mortbay.jetty.handler.ContextHandlerCollection">
                  <Set name="handlers">
                  <Array type="org.mortbay.jetty.Handler">
                    <New class="org.mortbay.jetty.webapp.WebAppContext">
                  <Set name="configurationClasses">
                     <Array type="java.lang.String">
                        <Item>org.mortbay.jetty.webapp.WebInfConfiguration
                        </Item>
                        <Item>org.mortbay.jetty.plus.webapp.EnvConfiguration
                        </Item>
                        <Item>org.mortbay.jetty.annotations.Configuration
                        </Item>
                        <Item>org.mortbay.jetty.webapp.JettyWebXmlConfiguration
                        </Item>
                        <Item>org.mortbay.jetty.webapp.TagLibConfiguration
                        </Item>
                     </Array>
                 </Set>
                <Set name="contextPath">@second_jetty_context_path@</Set>
                <Set name="war">
                    <SystemProperty name="jetty.home" default="." />/webapps/Second.war</Set>
                <Set name="extractWAR">true</Set>
                <Set name="copyWebDir">false</Set>

                      <Arg>/first</Arg>
                    </New>
                    <New class="org.mortbay.jetty.webapp.WebAppContext">
                         <Set name="configurationClasses">
                        <Array type="java.lang.String">
                                <Item>org.mortbay.jetty.webapp.WebInfConfiguration</Item>
                                <Item>org.mortbay.jetty.plus.webapp.EnvConfiguration</Item>
                                <Item>org.mortbay.jetty.annotations.Configuration</Item>
                                <Item>org.mortbay.jetty.webapp.JettyWebXmlConfiguration</Item>
                                <Item>org.mortbay.jetty.webapp.TagLibConfiguration</Item>
                        </Array>
                        </Set>

                        <Set name="contextPath">/first</Set>
                        <Set name="war"><SystemProperty name="jetty.home" default="."/>/webapps/First.war</Set>
                        <Set name="extractWAR">true</Set>
                        <Set name="copyWebDir">false</Set>
                      <Arg>/second</Arg>
                    </New>                 
                  </Array>
                </Set> 
             </New>






David Yu-2 wrote
It looks like you are using jetty 4/5.  If you plan to use Jetty 6, its
simply configured as:

    <Set name="handler">
      <New id="Handlers"
class="org.mortbay.jetty.handler.HandlerCollection">
        <Set name="handlers">
         <Array type="org.mortbay.jetty.Handler">
           <Item>
             <New id="Contexts"
class="org.mortbay.jetty.handler.ContextHandlerCollection"/>
                <Set name="handlers">
                  <Array type="org.mortbay.jetty.Handler">
                    <New class="org.mortbay.jetty.webapp.WebAppContext">
                      <Arg><SystemProperty
name="jetty.lib.dir"/>/first.war</Arg>
                      <Arg>/first</Arg>
                    </New>
                    <New class="org.mortbay.jetty.webapp.WebAppContext">
                      <Arg><SystemProperty
name="jetty.lib.dir"/>/second.war</Arg>
                      <Arg>/second</Arg>
                    </New>                   
                  </Array>
                </Set> 
            </New>
           </Item>
           <Item>
             <New id="DefaultHandler"
class="org.mortbay.jetty.handler.DefaultHandler"/>
           </Item>
           <Item>
             <New id="RequestLog"
class="org.mortbay.jetty.handler.RequestLogHandler"/>
           </Item>
         </Array>
        </Set>
      </New>
    </Set>

Cheers

Mircea Amarascu wrote:
> Jesse McConnell wrote:
>> What mechanism are you using to start jetty with these webapps?  the
>> java -jar start.jar mechanic?
>>
>> Also could you attach your complete xml file where you have these
>> webapps configured?
>> And...your basically wanting to have the second webapp deployment to
>> block until the first webapp is available, correct?
>>
>> cheers!
>> jesse
>>
> Hi,
>
> Jetty is started like this : java ... org.mortbay.jetty.Server
> /path/to/jetty.xml
>
> I've attached jetty.xml configuration file.
>
> Yes, i want second.war to start deploying only after first.war is
> available.
>
> Thanks.
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> ------------------------------------------------------------------------
>
> _______________________________________________
> Jetty-support mailing list
> Jetty-support@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jetty-support


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Jetty-support mailing list
Jetty-support@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jetty-support