Thanks, that seems to have done the trick. I thought I tried that, but perhaps 
not.

On Jan 4, 2013, at 9:47 , Matthew Serrano <mserr...@menlolabs.com> wrote:

> Rick,
> 
> I've been using resin's import ability with 3.0, 3.1 and now 4.0. I had some 
> issues in 4.0 that required tweaking my namespaces on the imported xml file 
> so below is an example of my resin.xml and app.xml that I am now using in 
> 4.0.32. If you are using 3, you might have to change the location in 
> resin.xml and/or the namespaces on the included files.
> 
> I am not sure about moving the files in and out of the directory without 
> restarting resin…if the war file is still in the web apps directory resin 
> will try to run it without the config. You would have to experiment with that 
> as I usually run all the apps all the time. My primary purpose for using the 
> import is to have an app xml file for each environment (production, qa, dev, 
> etc) which allows me to deploy the war and xml to whichever environment 
> without touching the resin.xml and also using the exact same war file in 
> every environment.
> 
> resin.xml
> <resin xmlns="http://caucho.com/ns/resin"; 
> xmlns:resin="urn:java:com.caucho.resin">
>    ...
>    <cluster id="app">
>       ...
>       <host id="" root-directory=".">
>       ...
>       <!-- Import app-specific XML files (after ROOT web app definition) -->
>       <resin:import>
>          <fileset dir="webapps">
>             <include name="*.xml" />
>          </fileset>
>       </resin:import>
>       ...
>       </host>
>    </cluster>
>    ...
> </resin>
> 
> myapp-environment.xml
> Inside the webapps folder, I then add a file for each app that needs a 
> configuration. I set various things in this file but below are a force-to-SSL 
> redirect, database connection pool, a hessian service used by the app, and a 
> simple JNDI string.
> <host xmlns="http://caucho.com/ns/resin"; 
> xmlns:resin="urn:java:com.caucho.resin">
>    <web-app id="/myapp" root-directory="webapps/myapp">
>       <resin:Redirect regexp="^/" target="https://www.mydomain.com/aws/";>
>          <resin:IfSecure value="false" />
>       </resin:Redirect>
>       <database>
>          <jndi-name>myapp/jdbc</jndi-name>
>          <driver>
>             <type>oracle.jdbc.pool.OracleConnectionPoolDataSource</type>
>             
> <url>jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=mydatabase)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=XE)(SERVER=DEDICATED)))
>             </url>
>             <user>myappdbuser</user>
>             <password>myappdbpassword</password>
>          </driver>
>          <max-connections>15</max-connections>
>          <max-idle-time>600</max-idle-time>
>          <close-dangling-connections>false</close-dangling-connections>
>       </database>
>       <remote-client interface="com.menlolabs.hessian.service.Sample" 
> name="myapp/sample">
>          <uri>hessian:url=http://localhost/hessianapp/service/sample</uri>
>       </remote-client>
>       <env-entry>
>          <env-entry-name>myapp/system/environment</env-entry-name>
>          <env-entry-type>java.lang.String</env-entry-type>
>          <env-entry-value>production</env-entry-value>
>       </env-entry>
>    </web-app>
> </host>
> 
> 
> 
> On Jan 3, 2013, at 2:40 PM, Rick Mann <rm...@latencyzero.com> wrote:
> 
>> 
>> On Jan 3, 2013, at 14:32 , Scott Ferguson <f...@caucho.com> wrote:
>> 
>>> You need to use <host> in this case.
>>> 
>>> The <resin:import> expects the current tag as the included top-level tag.
>>> 
>>> That way, your foo.xml could have multiple <web-app> items or other 
>>> <host> children.
>> 
>> I tried that, too, but got the same error.
>> 
>> -- 
>> Rick
>> 
>> 
>> 
>> 
>> _______________________________________________
>> resin-interest mailing list
>> resin-interest@caucho.com
>> http://maillist.caucho.com/mailman/listinfo/resin-interest
> 
> _______________________________________________
> resin-interest mailing list
> resin-interest@caucho.com
> http://maillist.caucho.com/mailman/listinfo/resin-interest


-- 
Rick




_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to