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 Steve Ebersole <st...@austin.rr.com> on 2004/03/04 05:12:10 UTC

slide and external UserTransactions

I am interested in proofing usage of Slide as a transactional file store
inside some existing apps.  The transactional part, however, must be bound
to global JTA UserTransactions through external TransactionManager lookups
(specifically WebLogic and JBoss TM lookups).  I searched the archives and
found a message
http://marc.theaimsgroup.com/?l=slide-dev&m=105698978309612&w=2 that
references a patch to allow Slide to be used in this manner.  That message
was dated June 6, 2003.

Did that feature make the new 2.0 beta release?

Thanks


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org


Re: slide and external UserTransactions

Posted by Daniel Florey <df...@c1-fse.de>.
Hi Steve,
I'm sorry to tell you that it is not possible to use slide as a 
transactional file store in j2ee-context. We are working on making slide 
available as a xa datasource via jca, but this will take some time.
This feature will not make it into slide 2.0 but perhaps in slide 2.x (x>0).
Regards,
Daniel


Steve Ebersole wrote:

>I am interested in proofing usage of Slide as a transactional file store
>inside some existing apps.  The transactional part, however, must be bound
>to global JTA UserTransactions through external TransactionManager lookups
>(specifically WebLogic and JBoss TM lookups).  I searched the archives and
>found a message
>http://marc.theaimsgroup.com/?l=slide-dev&m=105698978309612&w=2 that
>references a patch to allow Slide to be used in this manner.  That message
>was dated June 6, 2003.
>
>Did that feature make the new 2.0 beta release?
>
>Thanks
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: slide-user-help@jakarta.apache.org
>
>
>.
>
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org


Re: Deadlock when 2 node stores point to the same resource

Posted by Martin Holz <ho...@fiz-chemie.de>.
Hi,

"Willie Vu" <ct...@ust.hk> writes:

> > However since 
> > ever J2EE store has its own connections, there are separate 
> > SQL transactions started for each store. If the stores share 
> > the same tables, there could be deadlocks, if the complete 
> > table is locked. However I would expect, that 
> > two stores would never access the same rows. So a database, 
> > which locks only at row level should work fine.
> > 
> > So far I did not find any deadlocks using 
> > Postgres/OldJDBCAdapter and separate stores for / and /history.
> > 
> 
> I can reproduce the problem with MySQL 4.x using Slide 2.0 Beta 1.  The
> configuration is simple:
> 
> <scope match="/users" store="mysql-users" />
> <scope match="/" store="mysql"/>
> 
> It will cause the following exception:
> 
> 09 Mar 2004 11:47:54 - org.apache.slide.store.impl.rdbms.JDBCStore - DEBUG -
> Getting current connection for thread Thread[main,5,main]
> 09 Mar 2004 11:48:45 - org.apache.slide.store.impl.rdbms.MySqlRDBMSAdapter -
> ERROR - SQL error 1205 on /: General error: Lock wait timeout exceeded; Try
> restarting transaction
> 09 Mar 2004 11:48:45 - org.apache.slide.common.SlideException - DEBUG -
> org.apache.slide.common.ServiceAccessException: Service
> org.apache.slide.store.impl.rdbms.JDBCStore@6545d2 access error : General error:
> Lock wait timeout exceeded; Try restarting transaction
> 	at
> org.apache.slide.store.impl.rdbms.MySqlRDBMSAdapter.createException(MySqlRDBMSAd
> apter.java:60)
> 	at

do you know, how MySQL locks a database? Does it lock the complete table
or just rows or is using some other mechanism to handle concurrent access?

Martin


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org


RE: Deadlock when 2 node stores point to the same resource

Posted by Willie Vu <ct...@ust.hk>.
> However since 
> ever J2EE store has its own connections, there are separate 
> SQL transactions started for each store. If the stores share 
> the same tables, there could be deadlocks, if the complete 
> table is locked. However I would expect, that 
> two stores would never access the same rows. So a database, 
> which locks only at row level should work fine.
> 
> So far I did not find any deadlocks using 
> Postgres/OldJDBCAdapter and separate stores for / and /history.
> 

I can reproduce the problem with MySQL 4.x using Slide 2.0 Beta 1.  The
configuration is simple:

<scope match="/users" store="mysql-users" />
<scope match="/" store="mysql"/>

It will cause the following exception:

09 Mar 2004 11:47:54 - org.apache.slide.store.impl.rdbms.JDBCStore - DEBUG -
Getting current connection for thread Thread[main,5,main]
09 Mar 2004 11:48:45 - org.apache.slide.store.impl.rdbms.MySqlRDBMSAdapter -
ERROR - SQL error 1205 on /: General error: Lock wait timeout exceeded; Try
restarting transaction
09 Mar 2004 11:48:45 - org.apache.slide.common.SlideException - DEBUG -
org.apache.slide.common.ServiceAccessException: Service
org.apache.slide.store.impl.rdbms.JDBCStore@6545d2 access error : General error:
Lock wait timeout exceeded; Try restarting transaction
	at
org.apache.slide.store.impl.rdbms.MySqlRDBMSAdapter.createException(MySqlRDBMSAd
apter.java:60)
	at
org.apache.slide.store.impl.rdbms.StandardRDBMSAdapter.storeObject(StandardRDBMS
Adapter.java:197)
	at
org.apache.slide.store.impl.rdbms.StandardRDBMSAdapter.storeObject(StandardRDBMS
Adapter.java:95)
	at
org.apache.slide.store.impl.rdbms.AbstractRDBMSStore.storeObject(AbstractRDBMSSt
ore.java:462)
	at
org.apache.slide.store.AbstractStore.storeObject(AbstractStore.java:526)
	at
org.apache.slide.store.ExtendedStore.storeObject(ExtendedStore.java:424)
	at
org.apache.slide.structure.StructureImpl.store(StructureImpl.java:452)
	at
org.apache.slide.structure.StructureImpl.create(StructureImpl.java:347)
	at
org.apache.slide.common.XMLUnmarshaller.loadObjectNode(XMLUnmarshaller.java:164)
	at
org.apache.slide.common.XMLUnmarshaller.loadObjectNode(XMLUnmarshaller.java:301)
	at
org.apache.slide.common.XMLUnmarshaller.unmarshal(XMLUnmarshaller.java:96)
	at
org.apache.slide.common.NamespaceAccessTokenImpl.importData(NamespaceAccessToken
Impl.java:267)
	at org.apache.slide.common.Namespace.loadBaseData(Namespace.java:775)
	at org.apache.slide.common.Domain.initNamespace(Domain.java:814)
	at org.apache.slide.common.Domain.init(Domain.java:433)
	at org.apache.slide.common.Domain.selfInit(Domain.java:747)
	at org.apache.slide.common.Domain.accessNamespace(Domain.java:235)


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org


Re: Deadlock when 2 node stores point to the same resource

Posted by Martin Holz <ho...@fiz-chemie.de>.
"Willie Vu" <ct...@ust.hk> writes:
 
> Correct me if I'm wrong.  Currently, Slide will start a new transaction when it
> encounters a new node store.  So, when Slide initializes the Domain and starts
> loading data definition from Domain.xml, it creates object nodes from "/" using
> transaction #1.  When subject nodes are read, Slide sees that the "users" store
> is currently from the current "mssql" store, it starts another transaction #2.
> Deadlock occurs because transaction #1 locks many database objects that
> transaction #2 needs to access.

AFAIK no new Slide transaction is started for a new store. Slide transactions 
are only created at a high level, e.g AbstractWebdavMethod. However since 
ever J2EE store has its own connections, there are separate SQL transactions
started for each store. If the stores share the same tables, there could
be deadlocks, if the complete table is locked. However I would expect, that 
two stores would never access the same rows. So a database, which locks only at
row level should work fine.

So far I did not find any deadlocks using Postgres/OldJDBCAdapter and separate
stores for / and /history.

Martin



---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org


Deadlock when 2 node stores point to the same resource

Posted by Willie Vu <ct...@ust.hk>.
I have the following configuration:

<store name="mssql">
  <!-- using JDBCStore with SQLServer adapter -->
  ...
</store>

<store name="users">
  <!-- stores using the same configuration as the mssql store -->
  ...
</store>

<scope match="/users" store="users" />
<scope match="/" store="mssql"/>


Correct me if I'm wrong.  Currently, Slide will start a new transaction when it
encounters a new node store.  So, when Slide initializes the Domain and starts
loading data definition from Domain.xml, it creates object nodes from "/" using
transaction #1.  When subject nodes are read, Slide sees that the "users" store
is currently from the current "mssql" store, it starts another transaction #2.
Deadlock occurs because transaction #1 locks many database objects that
transaction #2 needs to access.

The above sample Domain.xml is to reproduce the problem.

My real life example is below.  I have good reason for the 2 stores having the
same rdbms resource.  I just want the nodes coming from LDAP while others coming
from database.

<store name="useres">
  <nodestore>
     <!-- connect to LDAP -->
  </nodestore>
  <!-- other stores using the same configuration as the mssql store -->
  ...
</store>



--
Willie Vu
Center for Enhanced Learning and Teaching
Hong Kong University of Science and Technology
(O) +852 2358 8926
(F) +852 2358 2201
mailto:ctwillie@ust.hk


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org


Re: slide and external UserTransactions

Posted by Oliver Zeigermann <oz...@c1-fse.de>.
Steve,

WebDAV is transactionless. That's right. Though, when you view Slide as 
a database for content, not only as a WebDAV server, why not having 
transactions in Slide? Of course a transaction method for external 
control will be none-WebDAV-standard, but Slide specific.

Oliver

Steve Ebersole wrote:

> Thanks for all the info.
> 
> Oliver, when you say "a connector to Slide talking WebDAV", are you taking
> about from inside the XAResource?  Isn't WebDAV inherently transactionless?
> 
> 
> 
> -----Original Message-----
> From: Oliver Zeigermann [mailto:ozeigermann@c1-fse.de]
> Sent: Thursday, March 04, 2004 3:44 AM
> To: Slide Users Mailing List
> Subject: Re: slide and external UserTransactions
> 
> 
> Hi Steve,
> 
> if you just want to have a transactional file system, plugging in all
> Slide might be overkill. I have implemented the tx file system to be
> more or less independent of Slide. Have a look at the classes in
> org.apache.slide.store.txfile.rm. What you would have to do, though, is
> to write something like an XAResource suitable to your needs and some
> notion of a connection to the tx file system. The connection might be a
> dummy when you only plan to access the local file system.
> 
> However, the "clean" way to go would be to have a connector to Slide
> talking WebDAV. We are currently evaluating this...
> 
> As this is a bit off topic, fell free to personally contact me for details.
> 
> Cheers,
> Oliver
> 
> 
> Steve Ebersole wrote:
> 
>>I am interested in proofing usage of Slide as a transactional file store
>>inside some existing apps.  The transactional part, however, must be bound
>>to global JTA UserTransactions through external TransactionManager lookups
>>(specifically WebLogic and JBoss TM lookups).  I searched the archives and
>>found a message
>>http://marc.theaimsgroup.com/?l=slide-dev&m=105698978309612&w=2 that
>>references a patch to allow Slide to be used in this manner.  That message
>>was dated June 6, 2003.
>>
>>Did that feature make the new 2.0 beta release?
>>
>>Thanks
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: slide-user-help@jakarta.apache.org
>>
>>
>>.
>>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-user-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-user-help@jakarta.apache.org
> 
> 
> .
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org


Re: slide and external UserTransactions

Posted by Daniel Florey <df...@c1-fse.de>.
Hi,
we are currently working on a webdav method that will provide some kind 
of transaction support via webdav.  So this is the basis for 
implementing a connector.
regards,
Daniel

Steve Ebersole wrote:

>Thanks for all the info.
>
>Oliver, when you say "a connector to Slide talking WebDAV", are you taking
>about from inside the XAResource?  Isn't WebDAV inherently transactionless?
>
>
>
>-----Original Message-----
>From: Oliver Zeigermann [mailto:ozeigermann@c1-fse.de]
>Sent: Thursday, March 04, 2004 3:44 AM
>To: Slide Users Mailing List
>Subject: Re: slide and external UserTransactions
>
>
>Hi Steve,
>
>if you just want to have a transactional file system, plugging in all
>Slide might be overkill. I have implemented the tx file system to be
>more or less independent of Slide. Have a look at the classes in
>org.apache.slide.store.txfile.rm. What you would have to do, though, is
>to write something like an XAResource suitable to your needs and some
>notion of a connection to the tx file system. The connection might be a
>dummy when you only plan to access the local file system.
>
>However, the "clean" way to go would be to have a connector to Slide
>talking WebDAV. We are currently evaluating this...
>
>As this is a bit off topic, fell free to personally contact me for details.
>
>Cheers,
>Oliver
>
>
>Steve Ebersole wrote:
>  
>
>>I am interested in proofing usage of Slide as a transactional file store
>>inside some existing apps.  The transactional part, however, must be bound
>>to global JTA UserTransactions through external TransactionManager lookups
>>(specifically WebLogic and JBoss TM lookups).  I searched the archives and
>>found a message
>>http://marc.theaimsgroup.com/?l=slide-dev&m=105698978309612&w=2 that
>>references a patch to allow Slide to be used in this manner.  That message
>>was dated June 6, 2003.
>>
>>Did that feature make the new 2.0 beta release?
>>
>>Thanks
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: slide-user-help@jakarta.apache.org
>>
>>
>>.
>>
>>    
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: slide-user-help@jakarta.apache.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: slide-user-help@jakarta.apache.org
>
>
>.
>
>  
>



---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org


RE: slide and external UserTransactions

Posted by Steve Ebersole <st...@austin.rr.com>.
Thanks for all the info.

Oliver, when you say "a connector to Slide talking WebDAV", are you taking
about from inside the XAResource?  Isn't WebDAV inherently transactionless?



-----Original Message-----
From: Oliver Zeigermann [mailto:ozeigermann@c1-fse.de]
Sent: Thursday, March 04, 2004 3:44 AM
To: Slide Users Mailing List
Subject: Re: slide and external UserTransactions


Hi Steve,

if you just want to have a transactional file system, plugging in all
Slide might be overkill. I have implemented the tx file system to be
more or less independent of Slide. Have a look at the classes in
org.apache.slide.store.txfile.rm. What you would have to do, though, is
to write something like an XAResource suitable to your needs and some
notion of a connection to the tx file system. The connection might be a
dummy when you only plan to access the local file system.

However, the "clean" way to go would be to have a connector to Slide
talking WebDAV. We are currently evaluating this...

As this is a bit off topic, fell free to personally contact me for details.

Cheers,
Oliver


Steve Ebersole wrote:
> I am interested in proofing usage of Slide as a transactional file store
> inside some existing apps.  The transactional part, however, must be bound
> to global JTA UserTransactions through external TransactionManager lookups
> (specifically WebLogic and JBoss TM lookups).  I searched the archives and
> found a message
> http://marc.theaimsgroup.com/?l=slide-dev&m=105698978309612&w=2 that
> references a patch to allow Slide to be used in this manner.  That message
> was dated June 6, 2003.
>
> Did that feature make the new 2.0 beta release?
>
> Thanks
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-user-help@jakarta.apache.org
>
>
> .
>


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org


Re: slide and external UserTransactions

Posted by Oliver Zeigermann <oz...@c1-fse.de>.
Hi Steve,

if you just want to have a transactional file system, plugging in all 
Slide might be overkill. I have implemented the tx file system to be 
more or less independent of Slide. Have a look at the classes in 
org.apache.slide.store.txfile.rm. What you would have to do, though, is 
to write something like an XAResource suitable to your needs and some 
notion of a connection to the tx file system. The connection might be a 
dummy when you only plan to access the local file system.

However, the "clean" way to go would be to have a connector to Slide 
talking WebDAV. We are currently evaluating this...

As this is a bit off topic, fell free to personally contact me for details.

Cheers,
Oliver


Steve Ebersole wrote:
> I am interested in proofing usage of Slide as a transactional file store
> inside some existing apps.  The transactional part, however, must be bound
> to global JTA UserTransactions through external TransactionManager lookups
> (specifically WebLogic and JBoss TM lookups).  I searched the archives and
> found a message
> http://marc.theaimsgroup.com/?l=slide-dev&m=105698978309612&w=2 that
> references a patch to allow Slide to be used in this manner.  That message
> was dated June 6, 2003.
> 
> Did that feature make the new 2.0 beta release?
> 
> Thanks
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: slide-user-help@jakarta.apache.org
> 
> 
> .
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org