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" <[EMAIL PROTECTED]> To: "Slide Users List" <[EMAIL PROTECTED]> 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:[EMAIL PROTECTED]] 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:[EMAIL PROTECTED]] 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: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
