1 23 package com.sun.enterprise.repository; 24 25 import java.io.Serializable ; 26 import java.util.*; 27 import com.sun.enterprise.util.Utility; 28 29 34 public class IASJdbcXAResource extends JdbcXAResource { 35 36 private JdbcConnectionPool jdbcConnectionPool_; 37 38 public IASJdbcXAResource(String name) { 39 super(name); 40 } 41 42 protected J2EEResource doClone(String name) { 43 IASJdbcXAResource clone = new IASJdbcXAResource(name); 44 clone.setEnabled(isEnabled()); 45 clone.setDescription(getDescription()); 46 clone.setJdbcConnectionPool(getJdbcConnectionPool()); 47 return clone; 48 } 49 50 51 public String getUserName() { 52 return getJdbcConnectionPool().getUserName(); 53 } 54 55 public String getPassword() { 56 return getJdbcConnectionPool().getPassword(); 57 } 58 59 public String getClassname() { 60 return getJdbcConnectionPool().getDatasourceClassname(); 61 } 62 63 public void setClassname(String classname) { 64 getJdbcConnectionPool().setDatasourceClassname(classname); 65 } 66 67 public JdbcConnectionPool getJdbcConnectionPool() { 68 return jdbcConnectionPool_; 69 } 70 71 public void setJdbcConnectionPool(JdbcConnectionPool jdbcConnectionPool) { 72 jdbcConnectionPool_ = jdbcConnectionPool; 73 } 74 75 public Set getProperties() { 76 return getJdbcConnectionPool().getProperties(); 77 } 78 79 public void addProperty(ResourceProperty property) { 80 getJdbcConnectionPool().addProperty(property); 81 } 82 83 public boolean removeProperty(ResourceProperty property) { 84 return getJdbcConnectionPool().removeProperty(property); 85 } 86 87 public ResourceProperty getProperty(String propertyName) { 88 return getJdbcConnectionPool().getProperty(propertyName); 89 } 90 91 public String toString() { 92 String propsString = getPropsString(); 93 return "< IAS JDBC XA Resource : " + getName() + 94 ((propsString.length() > 0) ? 95 propsString : "No properties") + " >"; 96 } 97 } 98 | Popular Tags |