axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher K. St. John" <>
Subject MinTC Servlet Container, DefaultAxisServerFactory
Date Wed, 10 Apr 2002 18:28:25 GMT

 MinTC is a servlet container designed to be run entirely out
of its jar, with no local filesystem access. Its good for
things like web-based admin interfaces and wrapping up webapps
so you can deploy them without requiring a separate servlet

 I've been testing MinTC with Axis, and I've managed to get
example3 from the userguide to run. That makes me happy and
grateful for the well written code and documentations, so:
thank you to the developers. 

 I did have to do some hacking, though, and I'm wondering if
there is a better way: o.a.a.server.DefaultAxisServerFactory
wants access to the local filesystem for PROP_ATTACHMENT_DIR.
I can't give it local access, because MinTC doesn't have any
concept of a local file system. Now, JNDIAxisServerFactory
doesn't bother with PROP_ATTACHMENT_DIR, and it turns out
that o.a.axis.MessageContext will do some defaulting based on
settings in axis/WEB-INF/web.xml.

 So I commented out the PROP_ATTACHMENT_DIR references in 
DefaultAxisServerFactory and that seemed to work. 

 Question 1: Presumably the right thing to do would be to
write a new MinTCAxisServerFactory instead of messing
with DefaultAxisServerFactory? Then set properties so my
implementation gets used? This might be an issue for
any servlet container that doesn't expand wars.

 Question 2: It looks like the only think that really cares
is o.a.a.attachments.ManagedMemoryDataSource. I think I may
be safe setting the "axis.attachments.Directory" in web.xml
to point to, but I'm unsure of the consequences.
What happens if I just leave it null? Etc. The source is the
best guide, of course, but any hints are appreciated.

 And a comment: AxisServlet looks to have a race. I believe 
that this test/set:

   if (engine == null) {
      try {
       engine = getEngine();
 in doGet() and doPost() is unsafe. Multiple threads could
enter doGet() and simultaneously call getEngine() Since the
context.getAttribute("AxisEngine") == null test in getEngine()
has the same problem, the body of getEngine() could get run
twice. I think. Maybe?

 Thanks for any feedback,

Christopher St. John

View raw message