ASF Bugzilla – Attachment 27858 Details for
Bug 52099
Allow to set the transaction isolation in the JDBC Connection Configuration
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed fix for Revision 1190010 of DataSourceElementBeanInfo.java
Enh52099_JdbcTransactionIsolationFix1190010.patch (text/plain), 1.64 KB, created by
Roman Bargezi
on 2011-10-28 05:42:38 UTC
(
hide
)
Description:
Proposed fix for Revision 1190010 of DataSourceElementBeanInfo.java
Filename:
MIME Type:
Creator:
Roman Bargezi
Created:
2011-10-28 05:42:38 UTC
Size:
1.64 KB
patch
obsolete
>Index: DataSourceElementBeanInfo.java >=================================================================== >--- DataSourceElementBeanInfo.java (revision 1190069) >+++ DataSourceElementBeanInfo.java (working copy) >@@ -29,8 +29,11 @@ > > import org.apache.commons.lang.StringUtils; > import org.apache.jmeter.testbeans.BeanInfoSupport; >+import org.apache.jorphan.logging.LoggingManager; >+import org.apache.log.Logger; > > public class DataSourceElementBeanInfo extends BeanInfoSupport { >+ private static final Logger log = LoggingManager.getLoggerForClass(); > private static Map<String,Integer> TRANSACTION_ISOLATION_MAP = new HashMap<String, Integer>(5); > static { > // Will use default isolation >@@ -73,7 +76,6 @@ > p.setValue(NOT_UNDEFINED, Boolean.TRUE); > p.setValue(DEFAULT, "DEFAULT"); > p.setValue(NOT_EXPRESSION, true); >- p.setValue(NOT_OTHER, true); > Set<String> modesSet = TRANSACTION_ISOLATION_MAP.keySet(); > String[] modes = modesSet.toArray(new String[modesSet.size()]); > p.setValue(TAGS, modes); >@@ -106,7 +108,14 @@ > */ > public static int getTransactionIsolationMode(String tag) { > if (!StringUtils.isEmpty(tag)) { >- return TRANSACTION_ISOLATION_MAP.get(tag); >+ Integer isolationMode = TRANSACTION_ISOLATION_MAP.get(tag); >+ if (isolationMode == null) { >+ try { >+ return Integer.parseInt(tag); >+ } catch (NumberFormatException e) { >+ log.warn("Illegal transaction isolation configuration '" + tag + "'"); >+ } >+ } > } > return -1; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 52099
:
27855
| 27858