Changes for page Database Compatibility and Comparisons-OpenBase
Last modified by Pascal Robert on 2007/09/03 21:02
From version 3.1
edited by Pascal Robert
on 2007/09/03 21:01
on 2007/09/03 21:01
Change comment:
There is no comment for this version
To version 4.1
edited by smmccraw
on 2007/07/08 09:44
on 2007/07/08 09:44
Change comment:
There is no comment for this version
Summary
-
Page properties (3 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 -Database Compatibility and Comparisons-OpenBase 1 +Programming__WebObjects-Database Compatibility and Comparisons-OpenBase - Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. probert1 +XWiki.smmccraw - Content
-
... ... @@ -1,48 +1,48 @@ 1 -== Overview == 1 +== Overview == 2 2 3 -== Performance == 3 +== Performance == 4 4 5 - [[http://www.codefab.com/wordpress/index.php/2006/02/11/webobjectseof-patch-better-way-to-limit-fetches-with-openbase/]]5 +http:~/~/www.codefab.com/wordpress/index.php/2006/02/11/webobjectseof-patch-better-way-to-limit-fetches-with-openbase/ 6 6 7 7 Category:WebObjects 8 8 9 -== Deadlocks == 9 +== Deadlocks == 10 10 11 -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. 11 +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. 12 12 13 -A possible solution to this problem is to identify the tables to write to immediately after opening a transaction. The necessary SQL would look something like this. 13 +A possible solution to this problem is to identify the tables to write to immediately after opening a transaction. The necessary SQL would look something like this. 14 14 15 15 {{code}} 16 16 17 -START TRANSACTION 18 -WRITE TABLE foo, bar 19 -INSERT INTO foo... 20 -INSERT INTO bar... 21 -COMMIT 17 +START TRANSACTION 18 +WRITE TABLE foo, bar 19 +INSERT INTO foo... 20 +INSERT INTO bar... 21 +COMMIT 22 22 23 23 {{/code}} 24 24 25 -Supplied with LEWOStuff ( [[http://www.lindesay.co.nz/]]) 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...25 +Supplied with LEWOStuff (http:~/~/www.lindesay.co.nz/) 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... 26 26 27 27 {{code}} 28 28 29 -/Library/Frameworks/JavaOPENBASEJDBCAdaptor.framework 29 +/Library/Frameworks/JavaOPENBASEJDBCAdaptor.framework 30 30 31 31 {{/code}} 32 32 33 -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 34 -get this adaptor to work with your model. 33 +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 34 +get this adaptor to work with your model. 35 35 36 36 {{code}} 37 37 38 -EOModel model = EOModelGroup.defaultGroup().modelNamed("MyModel"); 39 -if(null!=model) 40 -model.setAdaptorName("OPENBASEJDBC"); 38 +EOModel model = EOModelGroup.defaultGroup().modelNamed("MyModel"); 39 +if(null!=model) 40 +model.setAdaptorName("OPENBASEJDBC"); 41 41 42 42 {{/code}} 43 43 44 -This code will locate the framework for the adaptor, load the adaptor as well as set the adaptor in 45 -the model. If you are using SQL logging from EOF, the WRITE TABLE... clauses will be written 44 +This code will locate the framework for the adaptor, load the adaptor as well as set the adaptor in 45 +the model. If you are using SQL logging from EOF, the WRITE TABLE... clauses will be written 46 46 to the log as well. 47 47 48 48 There is no need to include the LEWOStuff framework in your project if you are going to use this one.