You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Rob Jellinghaus <ro...@unrealities.com> on 2001/05/25 04:13:31 UTC
Fragment of deploy.xml with listeners
Ran an earlier version by Glen, he thought it was OK....
This is along the lines of Glen's "Transport" email. This is a proposed
extended syntax for deploy.xml (a la AdminClient.java). Hopefully whatever
this is doing will also be doable via WSDD but I haven't looked yet (sorry,
James)....
<deploy>
<chain name="secure_http" flow="HTTPAuthHandler,URLMapper"/>
<chain name="open_tcp" flow="TCPActionHandler"/>
<listener name="admin_servlet" type="servlet" input_chain="secure_http">
<servlet>SecondServlet</servlet>
</listener>
<listener name="open_port" type="tcp" input_chain="open_tcp">
<port>8888</port>
</listener>
<service name="urn:xmltoday-delayed-quotes" pivot="stock">
<option name="className" value="samples.stock.StockQuoteService" />
<option name="methodName" value="getQuote" />
<option name="listener" value="open_port"/>
</service>
</deploy>
This deploys two chains (a secure HTTP transport input chain, and a
wide-open TCP transport input chain). It then defines a servlet listener
("admin_servlet") associated with the servlet named SecondServlet, and a
TCP listener ("open_port") on port 8888. Finally, it defines the stock
service, specifying that it can only be accessed via the TCP listener.
A slightly more aggressive model lets us actually *deploy classes of
Listeners*:
<listenerType name="servlet"
class="org.apache.axis.transport.http.ServletListener"/>
<listenerType name="tcp" class="org.apache.axis.transport.tcp.TCPListener"/>
... rest as above ...
Thoughts? I am going to start implementing this tonight since this is the
right next step in the direction of having dynamically added & removed
transport endpoints.
Cheers!
Rob
Re: Fragment of deploy.xml with listeners
Posted by duglin <du...@yahoo.com>.
Then what you want is something different. What you want is
a program that kicks off all of these listeners and when a message
comes in on one of those listeners it then create/finds an axis
engine to process it. So, Axis itself doesn't start the listeners
a separate program does. We can ship this program, but it is
not part of the Axis engine and therefore the config information
for these listeners belongs someplace else - ie. a config file
for this new exe.
-Dug
----- Original Message -----
From: "Glen Daniels" <gd...@macromedia.com>
To: <ax...@xml.apache.org>
Sent: Friday, May 25, 2001 9:18 AM
Subject: Re: Fragment of deploy.xml with listeners
> As far as I can see, Listeners that are Servlets are the only ones we
> *aren't* going to want to start/stop. How can you not have Axis start up
> TCP listeners, for instance? Or POP3 pollers? I'd like to see the
ability
> to start up a standalone Axis engine which begins listening on two TCP
> ports, three email addresses, watching an FTP directory, and starting an
> admin-only micro-HTTP server, depending on configuration.
>
> The <listener> option (which should really be <listeners>) on the Service
> will live in the Service class, and probably be checked by the code for
> setTargetService() in MessageContext (or the actual service dispatching
code
> in AxisServer) - whenever you decide what the service is, you check
against
> the source of the Message to make sure it's OK for this service to run on
> this Listener, and fault if it's not.
>
> --Glen
>
> ----- Original Message -----
> From: "duglin" <du...@yahoo.com>
> To: <ax...@xml.apache.org>
> Sent: Friday, May 25, 2001 8:43 AM
> Subject: Re: Fragment of deploy.xml with listeners
>
>
> > This seems to be headed down the path of having Axis
> > start-up listeners which is not a direction I think we want to go.
> >
> > Having the "listener" option as an element or as
> > an attribute on the service element is good but I'm
> > not keen on the <listener> stuff.
> >
> > You also didn't say what you were going to do with the
> > listener option value? Where are you going to place it
> > and who/where is it going to be checked?
> >
> > -Dug
> >
> > ----- Original Message -----
> > From: "Rob Jellinghaus" <ro...@unrealities.com>
> > To: <ax...@xml.apache.org>
> > Sent: Thursday, May 24, 2001 10:13 PM
> > Subject: Fragment of deploy.xml with listeners
> >
> >
> > > Ran an earlier version by Glen, he thought it was OK....
> > >
> > > This is along the lines of Glen's "Transport" email. This is a
proposed
> > > extended syntax for deploy.xml (a la AdminClient.java). Hopefully
> > whatever
> > > this is doing will also be doable via WSDD but I haven't looked yet
> > (sorry,
> > > James)....
> > >
> > > <deploy>
> > > <chain name="secure_http" flow="HTTPAuthHandler,URLMapper"/>
> > > <chain name="open_tcp" flow="TCPActionHandler"/>
> > > <listener name="admin_servlet" type="servlet"
input_chain="secure_http">
> > > <servlet>SecondServlet</servlet>
> > > </listener>
> > > <listener name="open_port" type="tcp" input_chain="open_tcp">
> > > <port>8888</port>
> > > </listener>
> > > <service name="urn:xmltoday-delayed-quotes" pivot="stock">
> > > <option name="className" value="samples.stock.StockQuoteService" />
> > > <option name="methodName" value="getQuote" />
> > > <option name="listener" value="open_port"/>
> > > </service>
> > > </deploy>
> > >
> > > This deploys two chains (a secure HTTP transport input chain, and a
> > > wide-open TCP transport input chain). It then defines a servlet
> listener
> > > ("admin_servlet") associated with the servlet named SecondServlet, and
a
> > > TCP listener ("open_port") on port 8888. Finally, it defines the
stock
> > > service, specifying that it can only be accessed via the TCP listener.
> > >
> > > A slightly more aggressive model lets us actually *deploy classes of
> > > Listeners*:
> > >
> > > <listenerType name="servlet"
> > > class="org.apache.axis.transport.http.ServletListener"/>
> > > <listenerType name="tcp"
> > class="org.apache.axis.transport.tcp.TCPListener"/>
> > > ... rest as above ...
> > >
> > > Thoughts? I am going to start implementing this tonight since this is
> the
> > > right next step in the direction of having dynamically added & removed
> > > transport endpoints.
> > >
> > > Cheers!
> > > Rob
> > >
> >
> >
> > _________________________________________________________
> > Do You Yahoo!?
> > Get your free @yahoo.com address at http://mail.yahoo.com
> >
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
Re: Fragment of deploy.xml with listeners
Posted by Glen Daniels <gd...@macromedia.com>.
As far as I can see, Listeners that are Servlets are the only ones we
*aren't* going to want to start/stop. How can you not have Axis start up
TCP listeners, for instance? Or POP3 pollers? I'd like to see the ability
to start up a standalone Axis engine which begins listening on two TCP
ports, three email addresses, watching an FTP directory, and starting an
admin-only micro-HTTP server, depending on configuration.
The <listener> option (which should really be <listeners>) on the Service
will live in the Service class, and probably be checked by the code for
setTargetService() in MessageContext (or the actual service dispatching code
in AxisServer) - whenever you decide what the service is, you check against
the source of the Message to make sure it's OK for this service to run on
this Listener, and fault if it's not.
--Glen
----- Original Message -----
From: "duglin" <du...@yahoo.com>
To: <ax...@xml.apache.org>
Sent: Friday, May 25, 2001 8:43 AM
Subject: Re: Fragment of deploy.xml with listeners
> This seems to be headed down the path of having Axis
> start-up listeners which is not a direction I think we want to go.
>
> Having the "listener" option as an element or as
> an attribute on the service element is good but I'm
> not keen on the <listener> stuff.
>
> You also didn't say what you were going to do with the
> listener option value? Where are you going to place it
> and who/where is it going to be checked?
>
> -Dug
>
> ----- Original Message -----
> From: "Rob Jellinghaus" <ro...@unrealities.com>
> To: <ax...@xml.apache.org>
> Sent: Thursday, May 24, 2001 10:13 PM
> Subject: Fragment of deploy.xml with listeners
>
>
> > Ran an earlier version by Glen, he thought it was OK....
> >
> > This is along the lines of Glen's "Transport" email. This is a proposed
> > extended syntax for deploy.xml (a la AdminClient.java). Hopefully
> whatever
> > this is doing will also be doable via WSDD but I haven't looked yet
> (sorry,
> > James)....
> >
> > <deploy>
> > <chain name="secure_http" flow="HTTPAuthHandler,URLMapper"/>
> > <chain name="open_tcp" flow="TCPActionHandler"/>
> > <listener name="admin_servlet" type="servlet" input_chain="secure_http">
> > <servlet>SecondServlet</servlet>
> > </listener>
> > <listener name="open_port" type="tcp" input_chain="open_tcp">
> > <port>8888</port>
> > </listener>
> > <service name="urn:xmltoday-delayed-quotes" pivot="stock">
> > <option name="className" value="samples.stock.StockQuoteService" />
> > <option name="methodName" value="getQuote" />
> > <option name="listener" value="open_port"/>
> > </service>
> > </deploy>
> >
> > This deploys two chains (a secure HTTP transport input chain, and a
> > wide-open TCP transport input chain). It then defines a servlet
listener
> > ("admin_servlet") associated with the servlet named SecondServlet, and a
> > TCP listener ("open_port") on port 8888. Finally, it defines the stock
> > service, specifying that it can only be accessed via the TCP listener.
> >
> > A slightly more aggressive model lets us actually *deploy classes of
> > Listeners*:
> >
> > <listenerType name="servlet"
> > class="org.apache.axis.transport.http.ServletListener"/>
> > <listenerType name="tcp"
> class="org.apache.axis.transport.tcp.TCPListener"/>
> > ... rest as above ...
> >
> > Thoughts? I am going to start implementing this tonight since this is
the
> > right next step in the direction of having dynamically added & removed
> > transport endpoints.
> >
> > Cheers!
> > Rob
> >
>
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
Re: Fragment of deploy.xml with listeners
Posted by duglin <du...@yahoo.com>.
This seems to be headed down the path of having Axis
start-up listeners which is not a direction I think we want to go.
Having the "listener" option as an element or as
an attribute on the service element is good but I'm
not keen on the <listener> stuff.
You also didn't say what you were going to do with the
listener option value? Where are you going to place it
and who/where is it going to be checked?
-Dug
----- Original Message -----
From: "Rob Jellinghaus" <ro...@unrealities.com>
To: <ax...@xml.apache.org>
Sent: Thursday, May 24, 2001 10:13 PM
Subject: Fragment of deploy.xml with listeners
> Ran an earlier version by Glen, he thought it was OK....
>
> This is along the lines of Glen's "Transport" email. This is a proposed
> extended syntax for deploy.xml (a la AdminClient.java). Hopefully
whatever
> this is doing will also be doable via WSDD but I haven't looked yet
(sorry,
> James)....
>
> <deploy>
> <chain name="secure_http" flow="HTTPAuthHandler,URLMapper"/>
> <chain name="open_tcp" flow="TCPActionHandler"/>
> <listener name="admin_servlet" type="servlet" input_chain="secure_http">
> <servlet>SecondServlet</servlet>
> </listener>
> <listener name="open_port" type="tcp" input_chain="open_tcp">
> <port>8888</port>
> </listener>
> <service name="urn:xmltoday-delayed-quotes" pivot="stock">
> <option name="className" value="samples.stock.StockQuoteService" />
> <option name="methodName" value="getQuote" />
> <option name="listener" value="open_port"/>
> </service>
> </deploy>
>
> This deploys two chains (a secure HTTP transport input chain, and a
> wide-open TCP transport input chain). It then defines a servlet listener
> ("admin_servlet") associated with the servlet named SecondServlet, and a
> TCP listener ("open_port") on port 8888. Finally, it defines the stock
> service, specifying that it can only be accessed via the TCP listener.
>
> A slightly more aggressive model lets us actually *deploy classes of
> Listeners*:
>
> <listenerType name="servlet"
> class="org.apache.axis.transport.http.ServletListener"/>
> <listenerType name="tcp"
class="org.apache.axis.transport.tcp.TCPListener"/>
> ... rest as above ...
>
> Thoughts? I am going to start implementing this tonight since this is the
> right next step in the direction of having dynamically added & removed
> transport endpoints.
>
> Cheers!
> Rob
>
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com