1 23 24 package com.sun.enterprise.connectors; 25 26 import javax.resource.spi.ManagedConnectionFactory ; 27 import javax.security.auth.Subject ; 28 import com.sun.enterprise.deployment.ResourcePrincipal; 29 import com.sun.enterprise.connectors.authentication.RuntimeSecurityMap; 30 31 32 46 47 public class PoolMetaData { 48 49 private ManagedConnectionFactory mcf = null; 50 private String poolName = null; 51 private Subject subj = null; 52 private ResourcePrincipal prin_; 53 private int txSupport_; 54 private boolean isPM_ = false; 55 private boolean isNonTx_ = false; 56 private RuntimeSecurityMap runtimeSecurityMap; 57 private boolean lazyEnlistable_ = false; 58 private boolean lazyAssoc_ = false; 59 private boolean isAuthCredentialsDefinedInPool_ = true; 60 61 public PoolMetaData(String poolName, ManagedConnectionFactory mcf, 62 Subject s, int txSupport, ResourcePrincipal prin, 63 boolean isPM, boolean isNonTx, boolean lazyEnlistable, 64 RuntimeSecurityMap runtimeSecurityMap, boolean lazyAssoc) { 65 this.poolName = poolName; 66 this.mcf = mcf; 67 this.subj = s; 68 txSupport_ = txSupport; 69 prin_ = prin; 70 isPM_ = isPM; 71 isNonTx_ = isNonTx; 72 lazyEnlistable_ = lazyEnlistable; 73 lazyAssoc_ = lazyAssoc; 74 this.runtimeSecurityMap = runtimeSecurityMap; 75 } 76 77 public ManagedConnectionFactory getMCF() { 78 return this.mcf; 79 } 80 81 public Subject getSubject() { 82 return this.subj; 83 } 84 85 public int getTransactionSupport() { 86 return txSupport_; 87 } 88 89 public ResourcePrincipal getResourcePrincipal() { 90 return prin_; 91 } 92 93 94 public void setIsNonTx( boolean flag ) { 95 isNonTx_ = flag; 96 } 97 98 99 public boolean isNonTx() { 100 return isNonTx_; 101 } 102 103 104 public void setIsPM( boolean flag ) { 105 isPM_ = flag; 106 } 107 108 109 public boolean isPM() { 110 return isPM_; 111 } 112 113 public RuntimeSecurityMap getRuntimeSecurityMap(){ 114 return this.runtimeSecurityMap; 115 } 116 117 public void setLazyEnlistable( boolean flag ) { 118 lazyEnlistable_ = flag; 119 } 120 121 public boolean isLazyEnlistable() { 122 return lazyEnlistable_; 123 } 124 125 public void setLazyAssoc( boolean flag ) { 126 lazyAssoc_ = flag; 127 } 128 129 public boolean isLazyAssociatable() { 130 return lazyAssoc_; 131 } 132 133 public void setAuthCredentialsDefinedInPool(boolean authCred) { 134 this.isAuthCredentialsDefinedInPool_ = authCred; 135 } 136 137 public boolean isAuthCredentialsDefinedInPool() { 138 return this.isAuthCredentialsDefinedInPool_; 139 } 140 141 public String toString() { 142 StringBuffer sb = new StringBuffer ("PoolMetaData : " + poolName ); 143 sb.append( "\ntxSupport => " + txSupport_ ); 144 sb.append( "\nisPM_ => " + isPM_ ); 145 sb.append( "\nisNonTx_ => " + isNonTx_ ); 146 sb.append( "\nisLazyEnlistable_ => " + lazyEnlistable_ ); 147 sb.append( "\nisLazyAssociatable => " + lazyAssoc_ ); 148 sb.append( "\nsecurityMap => " + runtimeSecurityMap.toString()); 149 return sb.toString(); 150 } 151 } 152 | Popular Tags |