Re: [Resin-interest] Easing Development

2013-01-07 Thread Rick Mann

On Jan 7, 2013, at 0:26 , Mattias Jiderhamn  wrote:

> I have reported a classloader / memory leak that I believe Scott tried 
> to fix for 4.0.33. Haven't had time to verify yet though.
> 
> Then add this library to your web app, to get rid of third party leaks: 
> http://java.jiderhamn.se/2012/03/04/classloader-leaks-vi-this-means-war-leak-prevention-library/

I'll check it out. I often need to restart, anyway, because I use Spring MVC, 
but that might help.


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


Re: [Resin-interest] Easing Development

2013-01-07 Thread Mattias Jiderhamn
I have reported a classloader / memory leak that I believe Scott tried 
to fix for 4.0.33. Haven't had time to verify yet though.

Then add this library to your web app, to get rid of third party leaks: 
http://java.jiderhamn.se/2012/03/04/classloader-leaks-vi-this-means-war-leak-prevention-library/

  

- Original Message -
Subject: Re: [Resin-interest] Easing Development
Date: Fri, 4 Jan 2013 04:31:03 -0800
From: Rick Mann 

I actually deliberately restart resin quite frequently. ... Add to that 
a persistent leak that causes resin to gobble up memory after a few app 
reloads, and it's best (for me) to restart resin frequently.

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


Re: [Resin-interest] Easing Development

2013-01-05 Thread Rick Mann
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  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
> http://caucho.com/ns/resin"; 
> xmlns:resin="urn:java:com.caucho.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.
> http://caucho.com/ns/resin"; 
> xmlns:resin="urn:java:com.caucho.resin">
>
>   https://www.mydomain.com/aws/";>
>  
>   
>   
>  myapp/jdbc
>  
> oracle.jdbc.pool.OracleConnectionPoolDataSource
> 
> jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=mydatabase)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=XE)(SERVER=DEDICATED)))
> 
> myappdbuser
> myappdbpassword
>  
>  15
>  600
>  false
>   
>name="myapp/sample">
>  hessian:url=http://localhost/hessianapp/service/sample
>   
>   
>  myapp/system/environment
>  java.lang.String
>  production
>   
>
> 
> 
> 
> 
> On Jan 3, 2013, at 2:40 PM, Rick Mann  wrote:
> 
>> 
>> On Jan 3, 2013, at 14:32 , Scott Ferguson  wrote:
>> 
>>> You need to use  in this case.
>>> 
>>> The  expects the current tag as the included top-level tag.
>>> 
>>> That way, your foo.xml could have multiple  items or other 
>>>  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


Re: [Resin-interest] Easing Development

2013-01-04 Thread Matthew Serrano
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
http://caucho.com/ns/resin"; 
xmlns:resin="urn:java:com.caucho.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.
http://caucho.com/ns/resin"; 
xmlns:resin="urn:java:com.caucho.resin">
   
  https://www.mydomain.com/aws/";>
 
  
  
 myapp/jdbc
 
oracle.jdbc.pool.OracleConnectionPoolDataSource

jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=mydatabase)(PORT=1521)))(CONNECT_DATA=(SERVICE_NAME=XE)(SERVER=DEDICATED)))

myappdbuser
myappdbpassword
 
 15
 600
 false
  
  
 hessian:url=http://localhost/hessianapp/service/sample
  
  
 myapp/system/environment
 java.lang.String
 production
  
   




On Jan 3, 2013, at 2:40 PM, Rick Mann  wrote:

> 
> On Jan 3, 2013, at 14:32 , Scott Ferguson  wrote:
> 
>> You need to use  in this case.
>> 
>> The  expects the current tag as the included top-level tag.
>> 
>> That way, your foo.xml could have multiple  items or other 
>>  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


Re: [Resin-interest] Easing Development

2013-01-04 Thread Eric Kreiser
Riccardo has it right - the easiest way to do this is to simply have a 
resin.xml for each webapp - and then just start resin using the 
resin.xml that is configured for the app you want to run.



On 01/04/2013 07:31 AM, Rick Mann wrote:
> On Jan 4, 2013, at 0:53 , Riccardo Cohen  wrote:
>
>> then
>> you don't have to restart resin each time you want to change the
>> application.
> I actually deliberately restart resin quite frequently. It doesn't pick up 
> certain changes just reloading the class (for example, a Spring @Controller 
> reload won't cause Spring to notice a new handler mapping). Add to that a 
> persistent leak that causes resin to gobble up memory after a few app 
> reloads, and it's best (for me) to restart resin frequently.
>
> Which is, more or less, orthogonal to easily switching configurations.
>


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


Re: [Resin-interest] Easing Development

2013-01-04 Thread Rick Mann

On Jan 4, 2013, at 0:53 , Riccardo Cohen  wrote:

> then 
> you don't have to restart resin each time you want to change the 
> application. 

I actually deliberately restart resin quite frequently. It doesn't pick up 
certain changes just reloading the class (for example, a Spring @Controller 
reload won't cause Spring to notice a new handler mapping). Add to that a 
persistent leak that causes resin to gobble up memory after a few app reloads, 
and it's best (for me) to restart resin frequently.

Which is, more or less, orthogonal to easily switching configurations.

-- 
Rick




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


Re: [Resin-interest] Easing Development

2013-01-04 Thread Riccardo Cohen
I personnaly have multiple resin.xml, and launch resin on the one I want 
to see. The only difference in the resin.xml is some path and database 
access. I use this because my application is twice on my mac : one for 
development, and one copy of the production. They have different 
directories and different databases.

You could also run all applications in the same resin instance, thanks 
to different ports, 8000 for the first, 8001 for the second etc. then 
you don't have to restart resin each time you want to change the 
application. For this I guess you'd have to put multiple  with 
different port (never done that).


On 03/01/13 23:21, Rick Mann wrote:
> I typically work on web apps as a component of other projects. At any given 
> time on my local machine I've got three or four web apps that I rotate 
> through. To speed things up, I reconfigure resin.xml each time I switch to a 
> new one, so I don't have to wait for the others to start up. I run resin in 
> console mode to make it easy to kill and restart
>
> I find it a little cumbersome to go to resin.xml and uncomment one  
> and comment out another. I'm wondering if I can't accomplish the same thing 
> by moving the  declarations to separate files in a known directory, 
> and just have resin.xml include all the files in that directory. That way, I 
> can just move the fragment files in and out of this "enabled apps" directory.
>
> So, I tried changing resin.xml to:
>
> 
>  
>   port="6800"/>
>
>  
>  
>
>  
>  
>  
>  
>  
> 
>
> and I'm trying to include a file that contains:
>
> 
> ...
> 
>
> But it doesn't like  at the top level. So I wrapped that in  
> tags, but it doesn't like that, either. Can I not do this?
>   
>

-- 
Riccardo Cohen
+33 (0)6 09 83 64 49
Société Realty-Property.com
1 rue de la Monnaie
37000 Tours
France



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


Re: [Resin-interest] Easing Development

2013-01-03 Thread Rick Mann

On Jan 3, 2013, at 14:32 , Scott Ferguson  wrote:

> You need to use  in this case.
> 
> The  expects the current tag as the included top-level tag.
> 
> That way, your foo.xml could have multiple  items or other 
>  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


Re: [Resin-interest] Easing Development

2013-01-03 Thread Scott Ferguson
On 1/3/13 2:21 PM, Rick Mann wrote:
> I typically work on web apps as a component of other projects. At any given 
> time on my local machine I've got three or four web apps that I rotate 
> through. To speed things up, I reconfigure resin.xml each time I switch to a 
> new one, so I don't have to wait for the others to start up. I run resin in 
> console mode to make it easy to kill and restart
>
> I find it a little cumbersome to go to resin.xml and uncomment one  
> and comment out another. I'm wondering if I can't accomplish the same thing 
> by moving the  declarations to separate files in a known directory, 
> and just have resin.xml include all the files in that directory. That way, I 
> can just move the fragment files in and out of this "enabled apps" directory.
>
> So, I tried changing resin.xml to:
>
> 
>  
>   port="6800"/>
>
>  
>  
>  
>  
>  
>  
>  
>  
> 
>
> and I'm trying to include a file that contains:
>
> 
> ...
> 
>
> But it doesn't like  at the top level. So I wrapped that in  
> tags, but it doesn't like that, either. Can I not do this?

You need to use  in this case.

The  expects the current tag as the included top-level tag.

That way, your foo.xml could have multiple  items or other 
 children.

-- Scott
>   


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