axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Afkham Azeez" <afk...@gmail.com>
Subject Re: [Axis2]Finding current tomcat Port from Axis2
Date Thu, 18 Dec 2008 18:30:08 GMT
Run tomcat with JMX enabled and start jconsole. Connect to the Tomcat
process and go to the MBeans section.

https://wso2.org/repos/wso2/trunk/carbon/org.wso2.carbon.core/src/main/java/org/wso2/carbon/core/ServerManagement.javawaitForCompletion
method in WSO2 Carbon code contains some code which
queries Tomcat MBeans.

Azeez

On Thu, Dec 18, 2008 at 10:22 PM, Srinath Perera <hemapani@gmail.com> wrote:

> Hi Guys;
>
> Does that mean even though it worked for simple axis server, it does
> not work on tomcat?
>
> Azeez, by any chance do you know a pointer to how to do it with
> tomcat? e.g. like JMX approach you mentioned.
>
> Thanks
> Srinath
>
>
> On Thu, Dec 18, 2008 at 10:23 AM, Afkham Azeez <afkham@gmail.com> wrote:
> > Rather, the servlet API does not support getting such information, but
> > different App servers do provide ways of getting this information.
> However,
> > you'd need to write app server specific code to get this information.
> >
> > Azeez
> >
> > On Thu, Dec 18, 2008 at 8:03 PM, Deepal jayasinghe <deepalk@gmail.com>
> > wrote:
> >>
> >> >
> >> >
> MessageContext.getCurrentMessageContext().getConfigurationContext().getAxisConfiguration().getTransportIn("http").getParameter("port")
> >> >
> >> > However, the port needs to be provided as a parameter in the
> >> > TransportIn config in the axis2.xml file.
> >> As thilina mentioned, in the case of tomcat you have the issues of the
> >> port. But I do not think you need to ask for the port in
> SimpleHttpServer.
> >>
> >> The problem of Tomcat or any other application server is, there is no
> >> way to get the the ports that are available for a given servlet.
> >> >
> >> > HTH
> >> > Azeez
> >> >
> >> > On Wed, Dec 17, 2008 at 8:51 PM, Srinath Perera <hemapani@gmail.com
> >> > <mailto:hemapani@gmail.com>> wrote:
> >> >
> >> >     I did not see a way to get a TransportListener from config contex,
> >> >     however, in the listener manager, there is something called getEPR
> >> >     forService(), which I think will do the trick. Will try it and let
> >> > you
> >> >     know.
> >> >
> >> >     Thanks deepal, Azeez !!!
> >> >
> >> >     Srinath
> >> >
> >> >
> >> >     On Wed, Dec 17, 2008 at 10:09 AM, Deepal jayasinghe
> >> >     <deepalk@gmail.com <mailto:deepalk@gmail.com>> wrote:
> >> >     > Hi Srinath,
> >> >     >
> >> >     > Nice to see you asking a question in the list :)
> >> >     > You can get the reply to address as follows
> >> >     >  - first get the configuration context
> >> >     > - from that you can get something called TransportListener
> >> >     > - from that you can ask for a reply to address.
> >> >     >
> >> >     > Thank you!
> >> >     > Deepal
> >> >     >> Hi All;
> >> >     >>
> >> >     >> Is there a way to find the current tomcat port using Axis2
(I
> >> >     need it
> >> >     >> to set a replyto address)? Ideally I want to find the service
> >> >     port at
> >> >     >> the start up, before any request arrived. If that does not
> work,
> >> > I
> >> >     >> might be able to live with getting it with message context.
> >> >     Does the
> >> >     >> message context property TRANSPORT_ADDR give what I want to
> find?
> >> >     >>
> >> >     >> Thanks very much
> >> >     >> Srinath
> >> >     >>
> >> >     >>
> >> >     >
> >> >     >
> >> >     > --
> >> >     > Thank you!
> >> >     >
> >> >     >
> >> >     > http://blogs.deepal.org
> >> >     > http://deepal.org
> >> >     >
> >> >     >
> >> >
> >> >
> >> >
> >> >     --
> >> >     ============================
> >> >     Srinath Perera:
> >> >       Indiana University, Bloomington
> >> >       http://www.cs.indiana.edu/~hperera/<http://www.cs.indiana.edu/%7Ehperera/>
> >> >     <http://www.cs.indiana.edu/%7Ehperera/>
> >> >       http://www.bloglines.com/blog/hemapani
> >> >
> >> >
> >> >
> >> >
> >> > --
> >> > Thanks
> >> > Afkham Azeez
> >> >
> >> > Blog: http://afkham.org
> >> > Developer Portal: http://www.wso2.org
> >> > WSAS Blog: http://wso2wsas.blogspot.com
> >> > Company: http://wso2.com
> >> > GPG Fingerprint: 643F C2AF EB78 F886 40C9  B2A2 4AE2 C887 665E 0760
> >>
> >>
> >> --
> >> Thank you!
> >>
> >>
> >> http://blogs.deepal.org
> >> http://deepal.org
> >>
> >
> >
> >
> > --
> > Thanks
> > Afkham Azeez
> >
> > Blog: http://afkham.org
> > Developer Portal: http://www.wso2.org
> > WSAS Blog: http://wso2wsas.blogspot.com
> > Company: http://wso2.com
> > GPG Fingerprint: 643F C2AF EB78 F886 40C9  B2A2 4AE2 C887 665E 0760
> >
>
>
>
> --
> ============================
> Srinath Perera:
>   Indiana University, Bloomington
>   http://www.cs.indiana.edu/~hperera/<http://www.cs.indiana.edu/%7Ehperera/>
>    http://www.bloglines.com/blog/hemapani
>



-- 
Thanks
Afkham Azeez

Blog: http://afkham.org
Developer Portal: http://www.wso2.org
WSAS Blog: http://wso2wsas.blogspot.com
Company: http://wso2.com
GPG Fingerprint: 643F C2AF EB78 F886 40C9  B2A2 4AE2 C887 665E 0760

Mime
View raw message