You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by Jiantao Pan <ji...@labbook.com> on 2002/01/07 22:49:20 UTC

RE: Enlist failure when two client running simultanously

Thanks Colin,
 I tried the combination of J2EEDescriptorsStore and FileContentStore, it works.
 There is still another question in my mind:
 For MySql database, it does NOT support transaction. Seems slide code assumes trasaction support. (Correct me if I am wrong). How could we make it work with mysql database. Is there a easy way to turn off the transaction?   I saw the class: slidestore.mysql.MySQLDescriptorsStore. in the comments, it says "This store should only be used with version 3.22 and older of MySQL". How about newer version of mysql? 
  The reason I am asking this is because when I use J2EEDescriptorsStore with mysql, and run multi putting at the same time, I got the attached exception occasionally:

 
 Thanks
Jiantao

-----Original Message-----
From: Colin Britton [mailto:cbritton@metatomix.com]
Sent: Friday, December 28, 2001 9:20 AM
To: Slide Users List
Subject: Re: Enlist failure when two client running simultanously


The FileContentStore is multi-transaction capable and the
J2EEDescriptorsStore is also, so this should work.

The issue is that all requests that use transaction support are enlisted
using the service instance as the key for the transaction, the JDBC stores
use AbstractSimpleService as the base and this allows only one instance of a
service at a time, therefore creating the restriction.

AbstractService (which FileContentStore and J2EEDescriptorsStore extend)
creates an instance of the service per request and therefore allows multiple
requests. The reason why the JDBC stores code extends AbstractSimpleService
is that the database connection is made by the store at startup, it does not
know how many connections to make or a way to tie them to service instances.
For this reason we moved the connection code outside by creating a J2EE
datasource in Tomcat, the store no longer needs to worry about the
connections, it just asks the datasource for one, which either creates a new
one or hands one out from it's pool.

This also has the benefit of providing a single set of DB connections for
both stores and we will also look to change our realm configuration to use
this.

Certainly other ways of solving this problem exist and there may be other
issues we didnt see,  also we would like to look at using the transactional
support provided in the J2EE datasources but for now this got us multi-user
(which was the major block).

rgds
CB



----- Original Message -----
From: "Jiantao Pan" <ji...@labbook.com>
To: "Slide Users List" <sl...@jakarta.apache.org>
Sent: Thursday, December 27, 2001 2:52 PM
Subject: RE: Enlist failure when two client running simultanously


I will give a try Thanks!
Two more question:
1. I assume servlet automatically support multi-access with servlet's
multi-threading.(Except that one should be careful with class level
variables in the servlet, which make me wondering whether variable "token"
in WebdavServlet could be a problem.)  Why do we need to do something specia
l to the Store to support multiple access? In other words, where the problem
is and what exactly in the two classes that fixed it?
2. Can one use the J2EEDescriptorsStore and FileContentStore and still allow
multiple access? If FileContentStore does not work, how could we make it
work?
Thanks and have a good one
Jiantao

-----Original Message-----
From: Kumar, Ashok [mailto:akumar@metatomix.com]
Sent: Thursday, December 27, 2001 2:32 PM
To: Slide Users List
Subject: RE: Enlist failure when two client running simultanously


Hi

Look into the mail dated on 12/20/2001 with Subject header "Datasource
and multiple access support"
posted to slide developers list. It can help - I believe....

Ashok

-----Original Message-----
From: Jiantao Pan [mailto:jiantao.pan@labbook.com]
Sent: Thursday, December 27, 2001 2:27 PM
To: Slide Users List
Subject: Enlist failure when two client running simultanously


Hi,
  I am using slide1.0.16 and tomcat4.0.1. It is configured to use
FileContentStore and JDBCDescriptorsStore with the following
configurateion in Domain.xml. When I start two client simultanously to
batch loading(both running putmethods), I got the following Warning on
the server console.
  My question is: What does the warning mean and is it a serious
problem?
  Thanks and have a nice holiday.


Server console log:

27 Dec 2001 14:03:08 - org.apache.slide.webdav.WebdavServlet - INFO -
MKCOL = 201 Created (time: 172 ms) URI = /files/gbcon2/22-NOV
27 Dec 2001 14:03:08 - org.apache.slide.transaction.SlideTransaction -
WARNING - Enlist failure: Resource manager
slidestore.reference.JDBCDescriptorsStore@77eaf8 Error code XAER_OUTSIDE
in Transaction 89 xid HttpProcessor[8080][2]-10094797
88314-89- in thread HttpProcessor[8080][2]
27 Dec 2001 14:03:08 - org.apache.slide.webdav.WebdavServlet - INFO -
PUT = 201
Created (time: 187 ms) URI = /files/gbcon1/04-OCT/AE002769


Domain.xml configuration:

    <definition>
      <store name="jdbc">
        <nodestore classname="slidestore.mysql.MySQLDescriptorsStore">
         <parameter name="driver">org.gjt.mm.mysql.Driver</parameter>
         <parameter name="url">mysql://localhost:3306/slide</parameter>
         <parameter name="user">slide</parameter>
         <parameter name="password">password</parameter>
        </nodestore>
        <securitystore>
          <reference store="nodestore" />
        </securitystore>
        <lockstore>
          <reference store="nodestore" />
        </lockstore>
        <revisiondescriptorsstore>
          <reference store="nodestore" />
        </revisiondescriptorsstore>
        <revisiondescriptorstore>
          <reference store="nodestore" />
        </revisiondescriptorstore>
        <!--contentstore
classname="slidestore.reference.JDBCContentStore">
         <parameter name="driver">org.hsql.jdbcDriver</parameter>
         <parameter name="url">HypersonicSQL:slidecontent</parameter>
         <parameter name="user">sa</parameter>
         <parameter name="password"></parameter>
        </contentstore-->
        <contentstore classname="slidestore.reference.FileContentStore">
          <parameter name="rootpath">files</parameter>
        </contentstore>
      </store>
      <scope match="/" store="jdbc" />
    </definition>

--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>