logo资料库

新闻管理系统详细设计说明书样例.pdf

第1页 / 共14页
第2页 / 共14页
第3页 / 共14页
第4页 / 共14页
第5页 / 共14页
第6页 / 共14页
第7页 / 共14页
第8页 / 共14页
资料共14页,剩余部分请下载后查看
1 引言
1.1 编写目的
1.2 背景
1.3 定义
1.4 参考资料
2 系统结构图
3 系统类结构
3.1 类结构图
连接池抽象类
连接池类
资源注册和启动服务类
3.1.4 资源生成类
3.2 主要时序图
4 类1(ConnectionPool)设计说明
4.1 类描述
4.2 成员变量
4.3 静态初始化操作
4.4 构造函数
4.5 成员函数
4.5.1 函数1 getPoolName:
4.5.2 函数2 isDestroyed:
4.5.3 函数3 setPoolLimits:
4.5.4 函数4 getPoolLimits:
4.5.5 函数5 getPoolFeatures:
4.5.6 函数6 getConnectionCount:
4.5.7 函数 7 getConnectionCreatedCount:
4.5.8 函数 8 getConnectionDestroyedCount
4.5.9 函数 9 getAvailableConnectionCount:
5 接口2(Resource)设计说明
5.1 类描述
5.2 成员变量
5.3 成员函数
5.3.1 函数1(getXAResource() )
5.3.2 函数 2(getRelationPoolName())
5.3.3 函数 3(getResourceName())
5.3.4 函数 4(setPoolLimits(PoolLimits limits))
5.3.5 函数5 (destroy())
6 类3(PoolLimits)设计说明
6.1 类描述
样例说明 秘密,保密三年 详细设计说明书 更改记录 日期 修改章节 修改类型* 修改描述 修改人 版本 *修改类型分为 A - ADDED M - MODIFIED D – DELETED 第1页 共14页
样例说明 秘密,保密三年 1 引言 1.1 编写目的 编写这份详细设计说明描述了 JCA 体系结构以及主要类之间的关系,是为了让自己和其他相关人员了解 JCA,JDBC 部分的实现原理,发现不足之处,提出合理改进措施。 1.2 背景 这份文档说明的是 JCA,JDBC 模块的详细设计。他们隶属于应用服务器的模块。 这部分提出者:。 开发者: 1.3 定义 JCA : Java Connector Architecture. JDBC: Java Database Connectivity 1.4 参考资料 JCA 1.5 规范。 JDBC 3.0 规范。 2 系统结构图 第2页 共14页
Application Component 样例说明 秘密,保密三年 Application Server ResourceAdapter ConnectionManager ConnectionFactory Connection SecutityService Manager PoolManager ManagedConnectionFactory ManagedConnection LocalTransaction TransactionManager XAResource ConnectionEventListener EIS 第3页 共14页
样例说明 秘密,保密三年 3 系统类结构 3.1 类结构图 3.1.1 连接池抽象类 PoolFeatures (from Use Case View) private long _accumUsedTime; private long _accumUnusedTime; private int _accumCreated; private int _accumUsed; private int _accumUnused; private int _accumDiscarded; private int _accumErrors; protected int _total; protected int _available; get/setMethod() PoolLimits (from Use Case View) private int _maximum private int _initial private int _maxIdle private int _timeout get/setMethod() ConnectionPool (from Use Case View) PoolLimits _poolLimits PoolFeatures _poolFeatures void setPoolLimits() PoolFeatures getPoolFeatures() int getConnectionCount() int getConnectionCreatedCount() int getConnectionDestroyedCount() long getAvailableConnectionCount() void shutdown() Object reserveConnection() void returnConnection() void discardConnection() Object allocateConnection() 第4页 共14页
3.1.2 连接池类 样例说明 秘密,保密三年 ConnectionPool (from Use Case View) PoolLimits _poolLimits PoolFeatures _poolFeatures void setPoolLimits() PoolFeatures getPoolFeatures() int getConnectionCount() int getConnectionCreatedCount() int getConnectionDestroyedCount() long getAvailableConnectionCount() void shutdown() Object reserveConnection() void returnConnection() void discardConnection() Object allocateConnection() ConnectionEventListener (from Use Case View) ConnectionManager (from Use Case View) blic abstract Object getClientFactory() c abstract Class getClientFactoryClass() c abstract XAResource getXAResource() public abstract void destroy() Resource (from Use Case View) JcaConnectionPool (from Use Case View) private JcaPoolEntry[] _pool private PoolLimits _poolLimits = null private PoolFeatures _poolFeatures = null; private XAResource _xaResource = null; private boolean _destroyed = false; public void setPoolLimits() public PoolFeatures getPoolFeatures() public int getConnectionCount() public Object reserveConnection() public void returnConnection() public void discardConnection() public Object allocateConnection() public Object getClientFactory() public void destroy() public XAResource getXAResource() public Object allocateConnection() public void connectionClosed() public void connectionErrorOccurred() public void localTransactionCommitted() public void localTransactionRolledback() public void localTransactionStarted() 第5页 共14页
ConnectionEventListener (from Use Case View) ConnectionPool (from Use Case View) 样例说明 秘密,保密三年 PoolLimits _poolLimits PoolFeatures _poolFeatures void setPoolLimits() PoolFeatures getPoolFeatures() int getConnectionCount() int getConnectionCreatedCount() int getConnectionDestroyedCount() long getAvailableConnectionCount() void shutdown() Object reserveConnection() void returnConnection() void discardConnection() Object allocateConnection() DataSource (from Use Case View) public abstract Object getClientFactory() public abstract Class getClientFactoryClass() public abstract XAResource getXAResource() Resource (from Use Case View) public abstract void destroy() JdbcConnectionPool (from Use Case View) private JcaPoolEntry[] _pool private PoolLimits _poolLimits = null private PoolFeatures _poolFeatures = null; private XAResource _xaResource = null; private boolean _destroyed = false; public void setPoolLimits() public PoolFeatures getPoolFeatures() public int getConnectionCount() public void returnConnection() public void discardConnection() public Object machPooledConnections() public void destroy() public void connectionClosed() public void connectionErrorOccurred() public void localTransactionCommitted() public connection getConnection() public connection getConnection() 第6页 共14页
3.1.3 资源注册和启动服务类 样例说明 秘密,保密三年 RARDeployer (from Use Case View) public void deploy() public void undeploy() JcaServices (from Use Case View) String _serviceName Resources _resources String _path; String _resourcesXML int _serviceStatus Server _server init() start() stop() deploy() undeploy() createDeploymentInfo() createPoolConfig() Services (from Use Case View) init() start() stop() setServer() terminate() JdbcServices (from Use Case View) Resources _resources String _serviceName String _path; String _resourcesXML int _serviceStatus Server _server init() start() stop() deploy() undeploy() createDeploymentInfo() createPoolConfig() Resources (from Use Case View) private HashMap _resourceMaker; private HashMap _resources; private HashMap _pools; public Resources() public synchronized void addResourceMaker() public synchronized ResourceMaker deleteResourceMaker() public boolean hasResourceMaker() public synchronized void addResource() public synchronized Resource deleteResource() public boolean hasResource() public synchronized void addPool() public synchronized ConnectionPool deletePool() public boolean hasPool() public Iterator listResourceMakers() public Iterator listResources() public Iterator listPools() 第7页 共14页
3.1.4 资源生成类 样例说明 秘密,保密三年 ResourceMaker (from Use Case View) protected String _resourceName protected String _jarFileName; protected String _additionalPaths; protected PoolLimits _poolLimits; protected boolean _twoPhase = false protected Object _wrapFactory; public abstract Resource createResource() public abstract Object createFactory() set/getMethod() protected String getGetPropertyMethodName() protected String getSetPropertyMethodName() public void initConfigPropertyValue() DataSourceMaker (from Use Case View) ConnectionPoolDataSource _pooledDataSource RARDeployment _deploymentInfo ClassLoader _classLoader public Resource createResource() public Object createFactory() private void configFactory() public set/get() JcaResourceMaker (from Use Case View) private ManagedConnectionFactory _managedConnectionFactory private ClassLoader _classLoader private RARDeployment _deploymentInfo; public Resource createResource() public Object createFactory() private void configFactory() public set/get() 3.2 主要时序图 第8页 共14页
分享到:
收藏