I am having problems getting OFBiz to work with MS SQL.  OFBiz works with MS
SQL during the setup (creating tables, importing all seed data), but it
seems to be having database locks when I import an order.  This import
service is a custom service I developed and it works on MySQL with no
problems. 

Without getting into detail of the custom code, it basically creates a new
transaction and creates an order. The code freezes when I call
dispatcher.runAsync("sendOrderConfirmation").  I've parsed deep into this
code and it specifically freezes at the point where it attempts to run this
SQL: SELECT RUNTIME_INFO, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP,
CREATED_STAMP, CREATED_TX_STAMP FROM dbo.RUNTIME_DATA WHERE
RUNTIME_DATA_ID=?

It looks like the Async call creates it's own new transaction and is blocked
because the previous transaction also accessed RUNTIME_DATA. 

The database shows 2 processes are blocked from a different, single process. 
It looks like this "blocker" process is the main transaction I open when I
create the order.  I am sure one blocked processes is the transaction that
is opened when I call sendOrderConfirmation.  The profiler shows the
"blocker" process last executes "sp_cursorclose".

I have only found 1 related posting that is of no help:
http://lists.ofbiz.org/pipermail/users/2004-January/002817.html

We are using OFBiz 4.0 and jTDS v.1.2.2 for the driver.  I have
useCursors=true set in the entityengine jdbc-uri config.  We have followed
the directions for jTDS to install the XA procedures.  We have tried MS
SQL's driver and have the same exact problem.

Does anyone have any ideas as to where we messed up? I am told the XA
features are suppose to handle this. Is there any way we can verify that we
installed XA correctly?  Am I using OFBiz transactions wrong?

// begin a transaction
boolean beganTransaction = false;
beganTransaction = TransactionUtil.begin(transactionTimeout);
-- 
View this message in context: 
http://www.nabble.com/MS-SQL-and-OFBiz%2C-database-locks-on-transactions-tp23225473p23225473.html
Sent from the OFBiz - User mailing list archive at Nabble.com.

Reply via email to