axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thilina Gunarathne" <cset...@gmail.com>
Subject Re: [Axis2]Finding current tomcat Port from Axis2
Date Fri, 19 Dec 2008 14:02:24 GMT
Hi Deepal,

On Thu, Dec 18, 2008 at 2:45 PM, Deepal jayasinghe <deepalk@gmail.com>wrote:

>
> > No, that code again go and call listenerManager.getEPRforService(..),
> > which I was using. I walked through the code, and
> > listenerManager.getEPRforService(..) work fine with other transports,
> > but with tomcat, it reads the port off the first request. When in
> > doubt  (before the request arrives) it give 8080, which is the case
> > thilina was complaining .
> >
> I think that is the intended behavior, because the same code should work
> for both client side and the server side.

I doubt whether it's the correct behaviour. In my case I was mislead for
some time that this gives the correct port using some magic underneath
and it took me some debuging time to realise the method does not
return *correct* information.

IMHO if it can't return the correct one, then it should not return
any assumptions.. At least we should document this behaviour in BIG CAPITAL
letters all the API's.

thanks,
Thilina


>
> > For my usecase, I can not wait for the first request as what I am
> > developing is a management agent. for now, I wrote a code to parse
> > tomcat server.xml.
> >
> Well, what you are doing is ok, iff you are going to use your
> application in tomcat. A better approach would be either feed the port
> number using axis2.xml or web.xml
>
> Deepal
>



-- 
Thilina Gunarathne  - http://thilinag.blogspot.com

Mime
View raw message