1 22 23 package org.jboss.resource.deployment.ds.metadata; 24 25 31 public class TransactionSupportMetaData 32 { 33 34 private final int support; 35 36 37 private TransactionIsolationMetaData isolation; 38 39 private TransactionSupportMetaData(int support){ 40 41 this.support = support; 42 43 } 44 45 46 public static final TransactionSupportMetaData NONE = new TransactionSupportMetaData(0); 47 48 49 public static final TransactionSupportMetaData LOCAL = new TransactionSupportMetaData(1); 50 51 52 public static final TransactionSupportMetaData XA = new TransactionSupportMetaData(2); 53 54 public TransactionIsolationMetaData getIsolation() 55 { 56 return this.isolation; 57 58 } 59 60 public void setIsolation(TransactionIsolationMetaData isolation) 61 { 62 this.isolation = isolation; 63 } 64 65 public static TransactionSupportMetaData fromString(String value) 66 { 67 TransactionSupportMetaData txmd = null; 68 69 if(value.equals("no-tx-datasource") || value.equals("no-tx-connection-factory")) 70 { 71 txmd = NONE; 72 73 }else if(value.equals("local-tx-datasource") || value.equals("local-transaction")) 74 { 75 txmd = LOCAL; 76 77 }else if(value.equals("xa-datasource") || value.equals("xa-transaction")) 78 { 79 txmd = XA; 80 81 }else 82 { 83 } 85 86 return txmd; 87 88 } 89 } 90 | Popular Tags |