[Resin-interest] Resin 4.0.36 & mod_caucho - forced to use port 8080 with multiple webapps on same host

2013-07-19 Thread c.whalley
I've just found out some client firewalls block port 8080. This causes a 
problem now since
I used the direct 8080 port for service webapps where there was more 
than one for that host, and that's
because I couldn't figure out how to remove the port number form the url 
in that situation.
Let me clarify that - if I have a webapp, say "MyWebapp", with resin + 
mod_caucho I can deploy it to service.example.com and access it
either using http://service.example.com/MyWebapp or 
http://service.example.com:8080/MyWebapp. The second is a bit
pointless until I need more than 1 webapp. What I'd like to do then is 
the obvious - just access them like
http://service.example.com/MyWebapp1, 
http://service.example.com/MyWebapp2 etc but I find Apache throws 404's
when visiting those. I have to use 
http://service.example.com:8080/MyWebapp1, 
http://service.example.com:8080/MyWebapp2.
Which was ok until I found out about this firewall issue...

One difference is that in the first scenario I don't use a webapp id, so 
the config is like this:

http://caucho.com/ns/resin";>
  

  


Whereas with the config where I'm forced to use 8080 in the URL it is

http://caucho.com/ns/resin";>
  



  


In both configs, the Servlet looks like this:

@WebServlet(value="/MyWebapp", name="example-servlet")
public class APIServlet extends HttpServlet {
...
}
I just deploy the wars appropriately and all is well, and in fact has 
been this way for years until this just came up.
It's probably something blindingly obvious - can anyone spot what, please?

Thanks!

Carl Whalley

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


Re: [Resin-interest] JSF classloader leak triggered by Resin EL

2013-07-19 Thread Mattias Jiderhamn
On Thu, 18 Jul 2013 10:51:52 -0700 Scott wrote:
> On 7/18/13 10:29 AM, Mattias Jiderhamn wrote:
> > On Thu, 18 Jul 2013 09:42:23 -0700 Scott wrote:
> >> On 7/18/13 2:32 AM, Mattias Jiderhamn wrote:
> >>> It seems that a classloader leak in the JSF API as of
> >>> https://java.net/jira/browse/JAVASERVERFACES-2746 is triggered much
> >> more
> >>> easily by the Caucho EL implementation than with the Sun/Glassfish 
> one.
> >>> At least from my point of view the bug still is with JSF and not 
> Resin,
> >>> but somene might find this information useful.
> >> Hmm. I'm not sure why Resin's EL would make a difference. From that
> >> description, it's a JSF bug.
> >>
> >> Do you happen to know what classes are being held?
> > Yes. The bug is triggered when there are additional attributes added to
> > the cached PropertyDescriptors, that implies a strong reference to the
> > classloader. The cases I've seen involves having the
> > javax.el.ELResolver.TYPE (="type") attribute having a class loaded
> > within the webapp as it's value (i.e. a custom JSF component with a
> > custom attribute). Resin adds this attribute in BeanELResolver.java 
> line
> > 520 (Resin 4.0.33), reached from the
> > javax.el.BeanELResolver.BeanProperty constructors in turn called from
> > the javax.el.BeanELResolver.BeanProperties constructor which in the
> > Resin case is used in all five BeanELResolver methods mentioned in my
> > latest comment.
> >
> > In the case of Sun/Glasfish EL, this attribute is (AFAI can see) only
> > added by getFeatureDescriptors().
> >
> > Nevertheless, I agree that it is JSF that needs fixing, not Resin.
>
> Gotcha.
>
> I can make that initialization lazy. That will only initialize the
> reference for getFeatureDescriptors(). 

The leak is already taken care of by my classloader leak prevention 
library [1] for any EL implementation, so there is no need on our part, 
but it might help someone else that don't understand the crashes or is 
unable to find this discussion.

1: 
http://java.jiderhamn.se/2012/03/04/classloader-leaks-vi-this-means-war-leak-prevention-library/

-- 

   



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