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 Tom Jordahl <to...@macromedia.com> on 2004/08/30 17:07:34 UTC
RE: Using multiple AxisServlet in webapp share the same AxisEngin
e
Guillaume,
Wouldn't this break existing applications?
--
Tom Jordahl
Macromedia Server Development
-----Original Message-----
From: Guillaume Sauthier [mailto:Guillaume.Sauthier@objectweb.org]
Sent: Monday, August 23, 2004 5:00 AM
To: axis-dev@ws.apache.org
Subject: Using multiple AxisServlet in webapp share the same AxisEngine
Hi team
I'm using AxisServlet multiple time in my webapp with different
configuration for each servlet.
Here is my web.xml :
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>WebApp Dispatching SOAP Requests to SSBs</display-name>
<servlet-name>My Web Services</servlet-name>
<servlet-class>org.apache.axis.transport.http.AxisServlet</servlet-class>
<init-param>
<param-name>axis.serverConfigFile</param-name>
<param-value>server-config-0.wsdd</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>My Web Services</servlet-name>
<url-pattern>/My Web Services/*</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>OtherWebServices</servlet-name>
<servlet-class>org.apache.axis.transport.http.AxisServlet</servlet-class>
<init-param>
<param-name>axis.serverConfigFile</param-name>
<param-value>server-config-1.wsdd</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>OtherWebServices</servlet-name>
<url-pattern>/OtherWebServices/*</url-pattern>
</servlet-mapping>
</web-app>
I have developed my own EngineConfigurationFactory to load the specified
config file.
But when I try this, I discover that the AxisEngine was loaded only once
and was shared between my AxisServlet instances.
That happens because when we store the Engine, we store it inside the
ServletContext (that is shared between servlets) under a name that is
not unique among the servlets : ATTR_AXIS_ENGINE = "AxisEngine"
is this possible to prefix this name with the servlet name to uniquely
identify the Engine ?
I attached a Patch with my simple modification
Regards
Guillaume
Re: Using multiple AxisServlet in webapp share the same AxisEngin
e
Posted by Guillaume Sauthier <Gu...@objectweb.org>.
Hi
this could break:
- if users have declared multiple AxisServlet and assumes that the
Engine is the same (But I don't see why they want to do this ?)
- the AutoRegisterServlet !! (maybe we could add some code to allow this
servlet to discover the servlet name of the deployed AxisServlet ?)
Do you see some other potential problems ?
All single AxisServlet application will continue to run as expected.
The message processing itself continue to work as usual since all
invokation parameters are stored inside MessageContext and not in
ServletContext.
Regards
Guillaume
Tom Jordahl wrote:
>Guillaume,
>
>Wouldn't this break existing applications?
>
>--
>Tom Jordahl
>Macromedia Server Development
>
>-----Original Message-----
>From: Guillaume Sauthier [mailto:Guillaume.Sauthier@objectweb.org]
>Sent: Monday, August 23, 2004 5:00 AM
>To: axis-dev@ws.apache.org
>Subject: Using multiple AxisServlet in webapp share the same AxisEngine
>
>Hi team
>
>I'm using AxisServlet multiple time in my webapp with different
>configuration for each servlet.
>
>Here is my web.xml :
><?xml version="1.0" encoding="UTF-8"?>
><web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
>http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
> <display-name>WebApp Dispatching SOAP Requests to SSBs</display-name>
> <servlet-name>My Web Services</servlet-name>
>
><servlet-class>org.apache.axis.transport.http.AxisServlet</servlet-class>
> <init-param>
> <param-name>axis.serverConfigFile</param-name>
> <param-value>server-config-0.wsdd</param-value>
> </init-param>
> </servlet>
> <servlet-mapping>
> <servlet-name>My Web Services</servlet-name>
> <url-pattern>/My Web Services/*</url-pattern>
> </servlet-mapping>
> <servlet>
> <servlet-name>OtherWebServices</servlet-name>
>
><servlet-class>org.apache.axis.transport.http.AxisServlet</servlet-class>
> <init-param>
> <param-name>axis.serverConfigFile</param-name>
> <param-value>server-config-1.wsdd</param-value>
> </init-param>
> </servlet>
> <servlet-mapping>
> <servlet-name>OtherWebServices</servlet-name>
> <url-pattern>/OtherWebServices/*</url-pattern>
> </servlet-mapping>
></web-app>
>
>I have developed my own EngineConfigurationFactory to load the specified
>config file.
>But when I try this, I discover that the AxisEngine was loaded only once
>and was shared between my AxisServlet instances.
>That happens because when we store the Engine, we store it inside the
>ServletContext (that is shared between servlets) under a name that is
>not unique among the servlets : ATTR_AXIS_ENGINE = "AxisEngine"
>
>is this possible to prefix this name with the servlet name to uniquely
>identify the Engine ?
>I attached a Patch with my simple modification
>
>Regards
>Guillaume
>
>
>