[geode] branch develop updated: GEODE-5313: User Guide - consolidate transaction coding examples - broken link repairs
This is an automated email from the ASF dual-hosted git repository. dbarnes pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/develop by this push: new c9be10e GEODE-5313: User Guide - consolidate transaction coding examples - broken link repairs c9be10e is described below commit c9be10e3077b4ff1958f44637183799afd00dbab Author: Dave Barnes AuthorDate: Tue Jun 19 10:02:28 2018 -0700 GEODE-5313: User Guide - consolidate transaction coding examples - broken link repairs --- geode-docs/developing/transactions/JTA_transactions.html.md.erb | 2 +- geode-docs/developing/transactions/run_a_cache_transaction.html.md.erb | 2 +- .../developing/transactions/working_with_transactions.html.md.erb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/geode-docs/developing/transactions/JTA_transactions.html.md.erb b/geode-docs/developing/transactions/JTA_transactions.html.md.erb index 5a621d5..412fd48 100644 --- a/geode-docs/developing/transactions/JTA_transactions.html.md.erb +++ b/geode-docs/developing/transactions/JTA_transactions.html.md.erb @@ -205,4 +205,4 @@ See [Setting Global Copy on Read](working_with_transactions.html#concept_vx2_gs4 GFConnection gemfireConn = (GFConnection)cf.getConnection(); ``` -See [JCA Resource Adapter Example](jca_adapter_example.html#concept_swv_z2p_wk) for an example of how to set up a transaction using the JCA Resource Adapter. +See [JCA Resource Adapter Example](transaction_coding_examples.html#jca_adapter_example) for an example of how to set up a transaction using the JCA Resource Adapter. diff --git a/geode-docs/developing/transactions/run_a_cache_transaction.html.md.erb b/geode-docs/developing/transactions/run_a_cache_transaction.html.md.erb index 8f9ead6..9376513 100644 --- a/geode-docs/developing/transactions/run_a_cache_transaction.html.md.erb +++ b/geode-docs/developing/transactions/run_a_cache_transaction.html.md.erb @@ -74,7 +74,7 @@ This discussion centers on transactions on replicated and partitioned regions. I Follow these guidelines when writing the transaction: - Start each transaction with a begin operation. -- Consider whether you will want to suspend and resume the transaction. If some operations should not be part of the transaction, you may want to suspend the transaction while performing non-transactional operations. After the non-transactional operations are complete, you can resume the transaction. See [Basic Suspend and Resume Transaction Example](transaction_suspend_resume_example.html#concept_40AAC4332DCE4E4EB60C4BA141B729A4) for an example. +- Consider whether you will want to suspend and resume the transaction. If some operations should not be part of the transaction, you may want to suspend the transaction while performing non-transactional operations. After the non-transactional operations are complete, you can resume the transaction. See [Basic Suspend and Resume Transaction Example](transaction_coding_examples.html#suspend_resume_example) for an example. - If your transaction operates on a mix of partitioned and replicated regions, do the first region operation on an entry of the partitioned region. This sets the host for the entire transaction. - If you did not configure copy-on-read to true, be sure all cache updates avoid in-place changes. - Take into account the behavior of transactional and non-transactional operations. All transactional operations that are run after the begin and before the commit or rollback are included in the transaction. diff --git a/geode-docs/developing/transactions/working_with_transactions.html.md.erb b/geode-docs/developing/transactions/working_with_transactions.html.md.erb index 50a3686..781d2f0 100644 --- a/geode-docs/developing/transactions/working_with_transactions.html.md.erb +++ b/geode-docs/developing/transactions/working_with_transactions.html.md.erb @@ -94,7 +94,7 @@ or similar methods from within a transaction. See [Function Execution](../function_exec/chapter_overview.html) for more about functions. -See [Transaction Embedded within a Function Example](transactional_function_example.html#concept_22331B3DBFAB4C0BA95EF103BFB71257) for an example. +See [Transaction Embedded within a Function Example](transaction_coding_examples.html#transactional_function_example) for an example. ## Using Queries and Indexes with Transactions
[geode] branch develop updated: GEODE-5313: User Guide - consolidate transaction coding examples - fix a broken link
This is an automated email from the ASF dual-hosted git repository. dbarnes pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/develop by this push: new 065e996 GEODE-5313: User Guide - consolidate transaction coding examples - fix a broken link 065e996 is described below commit 065e996b04f1958f51c6eb6ffd45ef974e62cdcb Author: Dave Barnes AuthorDate: Wed Jun 13 12:00:24 2018 -0700 GEODE-5313: User Guide - consolidate transaction coding examples - fix a broken link --- .../developing/transactions/working_with_transactions.html.md.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geode-docs/developing/transactions/working_with_transactions.html.md.erb b/geode-docs/developing/transactions/working_with_transactions.html.md.erb index e01a158..50a3686 100644 --- a/geode-docs/developing/transactions/working_with_transactions.html.md.erb +++ b/geode-docs/developing/transactions/working_with_transactions.html.md.erb @@ -160,7 +160,7 @@ If the member with the primary copy of the data crashes, the transactional view If a suspended transaction is not touched for a period of time, <%=vars.product_name%> cleans it up automatically. By default, the timeout for a suspended transaction is 30 minutes and can be configured using the system property `gemfire.suspendedtxTimeout`. For example, `gemfire.suspendedtxTimeout=60` specifies a timeout of 60 minutes. -See [Basic Suspend and Resume Transaction Example](transaction_suspend_resume_example.html) for a sample code fragment that suspends and resumes a transaction. +See [Basic Suspend and Resume Transaction Example](transaction_coding_examples.html#suspend_resume_example) for a sample code fragment that suspends and resumes a transaction. ## Using Cache Writer and Cache Listener Plug-Ins -- To stop receiving notification emails like this one, please contact dbar...@apache.org.
[geode] branch develop updated: GEODE-5313: User Guide - consolidate transaction coding examples
This is an automated email from the ASF dual-hosted git repository. dbarnes pushed a commit to branch develop in repository https://gitbox.apache.org/repos/asf/geode.git The following commit(s) were added to refs/heads/develop by this push: new 0f75926 GEODE-5313: User Guide - consolidate transaction coding examples 0f75926 is described below commit 0f759269a61ddb81bd3fcf7a3f9529127a26944a Author: Dave Barnes AuthorDate: Mon Jun 11 16:09:08 2018 -0700 GEODE-5313: User Guide - consolidate transaction coding examples --- .../source/subnavs/geode-subnav.erb| 16 +- .../transactions/jca_adapter_example.html.md.erb | 51 -- .../transaction_coding_examples.html.md.erb| 172 - .../transaction_suspend_resume_example.html.md.erb | 38 - .../transactional_function_example.html.md.erb | 72 - .../transactions/transactions_overview.html.md.erb | 67 6 files changed, 169 insertions(+), 247 deletions(-) diff --git a/geode-book/master_middleman/source/subnavs/geode-subnav.erb b/geode-book/master_middleman/source/subnavs/geode-subnav.erb index b9d042e..ad09b17 100644 --- a/geode-book/master_middleman/source/subnavs/geode-subnav.erb +++ b/geode-book/master_middleman/source/subnavs/geode-subnav.erb @@ -1493,22 +1493,8 @@ limitations under the License. Monitoring and Troubleshooting Transactions - + Transaction Coding Examples - - -Basic Transaction Example - - -Basic Suspend and Resume Transaction Example - - -Transaction Embedded within a Function Example - - -JCA Resource Adapter Example - - diff --git a/geode-docs/developing/transactions/jca_adapter_example.html.md.erb b/geode-docs/developing/transactions/jca_adapter_example.html.md.erb deleted file mode 100644 index 1c7b420..000 --- a/geode-docs/developing/transactions/jca_adapter_example.html.md.erb +++ /dev/null @@ -1,51 +0,0 @@ -title: JCA Resource Adapter Example - - - -This example shows how to use the JCA Resource Adapter in <%=vars.product_name%> . - -``` pre -Hashtable env = new Hashtable(); -env.put(Context.INITIAL_CONTEXT_FACTORY, “weblogic.jndi.WLInitialContextFactory”); -env.put(Context.PROVIDER_URL, “t3://localhost:7001”); -Context ctx = new InitialContext(env); -UserTransaction utx = (UserTransaction) ctx.lookup(“javax.transaction.UserTransaction”); -utx.begin(); - // the XA Resource -javax.sql.DataSource ds = (DataSource) ctx.lookup(“derby”); -javax.sql.Connection derbyConn = ds.getConnection(); -Statement stmt = conn.createStatement(); -stmt.executeUpdate(“insert into test values(2,4) “); - // do ConnectionFactory lookup -GFConnectionFactory cf = (GFConnectionFactory) ctx.lookup(“gfe/jca”); - - // Obtaining the connection begins the LocalTransaction. - // If this is absent, operations will not be part of any transaction. -GFConnection conn = cf.getConnection(); - -testRegion.put(“foo”, “bar-”); -utx.commit(); - - // the connection can also be closed within the transaction -derbyConn.close(); -conn.close(); -``` - - diff --git a/geode-docs/developing/transactions/transaction_coding_examples.html.md.erb b/geode-docs/developing/transactions/transaction_coding_examples.html.md.erb index c2dd517..2d1854f 100644 --- a/geode-docs/developing/transactions/transaction_coding_examples.html.md.erb +++ b/geode-docs/developing/transactions/transaction_coding_examples.html.md.erb @@ -21,20 +21,184 @@ limitations under the License. This section provides several code examples for writing and executing transactions. -- **[Basic Transaction Example](transactions_overview.html)** +- **[Basic Transaction Example](#basic_transaction_example)** This example operates on two replicated regions. It begins a transaction, updates one entry in each region, and commits the result. -- **[Basic Suspend and Resume Transaction Example](transaction_suspend_resume_example.html)** +- **[Basic Suspend and Resume Transaction Example](#suspend_resume_example)** This example suspends and resumes a transaction. -- **[Transaction Embedded within a Function Example](transactional_function_example.html)** +- **[Transaction Embedded within a Function Example