jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gamba <holger.bre...@handelshof.de>
Subject Confirming assumptions about transactional environment and session-handling
Date Thu, 10 Sep 2009 07:29:43 GMT

Hi,

I need some help confirming some assumptions about jackrabbit in a
transactional environment with jboss.

I need to verify some points to find some problems with concurrent updates
in my code.

I'm running jackrabbit 1.6.0 on jboss 4.2.3 with mysql at the backend. All
the code to access the jackrabbit-api is placed in a stateless session bean,
in different methods (add node, delete node, ...). I'm using container
managed transaction with tx_required on each method. Each method are using
an own
session with a technical user (the same in all methods) to read/write access
jackrabbit. The session logout() method is called in a finally { .. } blocj
at the end of each method. 
I have own node-types for nodes and files.

1) First of all I want to know if this is a common scenario or are there any
known problems regarding
the environment?

After implementing this I'm reading something about locks and concurrent
updates and asks myself
If I need the mixin-typ mix:lockable for my own nodes. After reading the
Spec 8.4.10 I think I don't need 
the mixin types and did not handle manually node-locking, because I'm
working in a transactional environment: 

"As a result, if a lock is enabled and then disabled within the same
transaction, its effect never makes it to the persistent workspace and
therefore it does nothing. In order to use locks properly (that is, to
prevent the “lost update problem”), locking and unlocking must be done in
separate
transactions."

2) Is it correct that I need not bother with such locking issues?

3) So I did not expect an InvalidItemStateExcpeton?

4) Have I call the session.save() method inside my method-transactions. Or
is it saved automatically
on a the transaction-commit?

5) Are there any known session-complications with only one technical user in
this environment?

Ok, so far, to get a feeling for my code ... 

Thx
Gamba



-- 
View this message in context: http://www.nabble.com/Confirming-assumptions-about-transactional-environment-and-session-handling-tp25378625p25378625.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Mime
View raw message