Child pages
  • Database Compatibility and Comparisons-OpenBase

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

Performance

http://www.codefab.com/wordpress/index.php/2006/02/11/webobjectseof-patch-better-way-to-limit-fetches-with-openbase/Image Removed

Category:WebObjects

Deadlocks

When writing high volumes of data over multiple tables from a WebObjects system, it is possible to create a deadlock. OpenBase resolves the deadlock condition by aborting one of the transactions and returning an error to the WebObjects application.

...

Code Block
START TRANSACTION 
WRITE TABLE foo, bar 
INSERT INTO foo... 
INSERT INTO bar... 
COMMIT 

Supplied with LEWOStuff (http://www.lindesay.co.nz/Image Removed) is a framework called JavaOPENBASEJDBCAdaptor. This framework is able to place these locks after each EOF generated transaction is started in order to prevent deadlocks from occuring. You need to copy the framework build product into your local library folder. Under MacOS-X this would be...

Code Block
/Library/Frameworks/JavaOPENBASEJDBCAdaptor.framework 

You then need to add this framework to the Frameworks grouping within your X-Code WO project. In your WebObjects "Application" subclass constructor, insert some code of the following form to
get this adaptor to work with your model.

Code Block
EOModel model = EOModelGroup.defaultGroup().modelNamed("MyModel"); 
if(null!=model) 
model.setAdaptorName("OPENBASEJDBC"); 

This code will locate the framework for the adaptor, load the adaptor as well as set the adaptor in
the model. If you are using SQL logging from EOF, the WRITE TABLE... clauses will be written
to the log as well.

...