`
Xgw123485
  • 浏览: 88434 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论
文章列表
package com.huawei.esb; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.Reader; import java.io.StringReader; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.ArrayLi ...
package com.huawei.esb; import java.io.File; import java.util.Map; import java.util.Map.Entry; import org.kxml2.kdom.Element; public class EnumerateFile {     //枚举文件对应一个File     private File enumFile;     //对应一个element     private Element enumElement;     //对应一个lastModified     private Long enumLa ...
/*      *得到数据库连接      */ public synchronized Connection getConnection() throws SQLException { // TODO Auto-generated method stub if (!availableConnections.isEmpty()) { Connection existingConnection =                  (Connection)availableConnections.lastElement();             int lastIndex ...
public synchronized int getMaxConnectionNumber()   {   return maxConnections;   } public int getCurrentConnectionNumber()   {       return availableConnections.size();   }     /*    *总共的连接数(包括已连接的和未被连接的)    */   public synchronized int totalConnections()   {       return (availableCo ...

JdbcPool -1

package com.huawei.db; import java.sql.Connection; import java.sql.Driver; import java.sql.DriverManager; import java.sql.SQLException; import java.util.Vector; public abstract class JdbcPool implements ConnectionPool,Runnable {   protected String driver, url, username, password;   private int ma ...
package com.huawei.db; import java.sql.*; /** * 分配,回收和管理JDBC连接 */ public class JdbcOdbcConnectionPool extends JdbcPool {      public JdbcOdbcConnectionPool      (                         String driver, String url,                         String username, String password,                        ...
package com.huawei.db; import java.sql.*; /** * 分配,回收和管理JDBC连接 */ public class InformixConnectionPool extends JdbcPool {      public InformixConnectionPool      (                         String driver, String url,                         String username, String password,                        ...
package com.huawei.db; import java.sql.*; /** *  分配,回收和管理JDBC连接 */ public class DefaultConnectionPool extends JdbcPool {      public DefaultConnectionPool      (                         String driver, String url,                         String username, String password,                         ...

DBTools

package com.huawei.db; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import org.apache.log4j.Logger; /** * 针对Connection的单次调用,然后马上释放的原则 * @author z00133176 * */ public class DBTools { /** * Colse Connection * @para ...
package com.huawei.db; import java.util.Hashtable; import javax.naming.InitialContext; import javax.naming.NamingException; import javax.sql.DataSource; import org.apache.log4j.Logger; import com.huawei.common.BaseException; import com.huawei.esb.FileManager; public class DataSourceConnectionPo ...
package com.huawei.db; import java.sql.*; import java.io.*; import javax.sql.DataSource; public class ConnectionPoolFactory {   protected static final String DEFAULT_POOL_NAME = "ORACLE";   protected static final String DEFAULT_DB_TYPE = "DbType";     protected static boole ...
package com.huawei.db; import java.sql.* ; public interface ConnectionPool { /** * Gets a Connection from pool. * @return the connection with a special Database. * @exception SQLException when access database, or not. */ public Connection getConnection () throws SQLException ; /** * R ...
package com.huawei.db; import com.huawei.esb.FileManager; public class Configuration { public static String getProperty(String key,String defaultName) { String name = FileManager.getESBProperty(key); return (name == null)?defaultName:name; } public static String getProperty(String key) ...
package com.huawei.common; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStreamReader; import org.apache.log4j.Logger; import org.kxml2.io.KXmlParser; import org.kxml2.kdom.Document; import org.kxml2.kdom.Element; import org.xmlpull.v1.XmlPullParser; import or ...
package com.huawei.common; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import org.apache.log4j.Logger; import org.kxml2.kdom.Element; import com.huawei.bo.EsbRequest; import com.huawei.bo.MsgBO; public class XMLController { protected static Logger log = Logger ...
Global site tag (gtag.js) - Google Analytics