您好,欢迎访问三七文档
当前位置:首页 > 行业资料 > 能源与动力工程 > 构建面向对象的应用软件系统框架
1221TCP/IPOSINN2.12.1CORBAJavaJavaRMIEJBWindowsDCOMCOM+.NetWebService.NetRemoting[6]J2EEJDOWebsharp22[7]Web23MVCM--O-RMAPWebASP.NetJSPASP.NetJSP,WebWebWeb2.2Websharp24MVC[8]MCVProductProductJavaVectorC#ArrayList(C#)C++ObjectCollectionCollectionFormDetailFormDetailsCollection(C#)(Recordset)ASPEJBJ2EEEntityBeanJ2EEEntityBeanEntityBean(ValueObject)J2EEJ2EE[9]JDOJ2EEJDOJDOJDOPersistenceManager[10]EJBJDOXMLXMLEJBJDOXMLDuwamish[11]WebsharpWebsharp.NetFrameworkDataSetAttributeEntityDataDataSetWebsharpPersistenceCapableXMLEntityData25XMLJavaJDBCWindowsADOADO.NetBug----(2.3)2.3J2EEEntityBeanCMPBMPEJB2.0CMPBMPEJB2.0JDOPersistenceManagerCustomerWebsharpJDOWebsharpPersistenceManagerJ2EEJDOWebsharpWebsharpTransaction26[12]J2EE.NetWindowsCOM+WebsharpTransactionWebsharpEnterpriseServiceAOPAOP27BusinessFacadeFacadeFacadeWebServiceWinFormWebIofficeDemoFacade28WebWeb29210WebsharpVisualStudio.Net332/¾¾¾33¾¾¾¾¾4O/RMapping¾¾¾¾¾¾¾¾¾5O/RMapping51¾¾¾¾.NET.NET¾¾¾¾¾52¾¾¾¾¾5354¾¾¾55¾¾¾¾……6¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾¾SecuritySecuritySecuritySecurityCheckRightSecurityBusinessClassBusinessClassAspectManagedAttributeBusinessClassAspectObjectSecuritySecurityAspectBusinessClassAOPBusinessClassBusinessMethodBusinessClassSecuritySecurityAOPBusinessClassSecurityAspectç63WebsharpAOPzzz7zzz8¾¾¾¾¾¾¾¾¾¾¾publicvoidpersistAndSend(Stringdata)throwsException{try{DataSourceoracleDS=getDataSource(java:comp/env/jdbc/OracleXADS);persist(data,oracleDS);DataSourcedb2DS=getDataSource(java:comp/env/jdbc/DB2XADS);persist(data,db2DS);QueueConnectionFactoryfactory=getQueueConnectionFactory(java:comp/env/jms/XAExampleQCF);Queuequeue=getQueue(java:comp/env/jms/XAExampleQ);send(data,factory,queue);}catch(Exceptione){e.printStackTrace();this.getSessionContext().setRollbackOnly();throwe;}}privatevoidpersist(Stringdata,DataSourcedatasource)throwsSQLException{System.out.println(Addinganewdatabaserowcontaining:+data);Connectionconnection=null;try{connection=datasource.getConnection();PreparedStatementstatement=connection.prepareStatement(INSERTINTOXA_EXAMPLE(TEXT)VALUES(?));statement.setString(1,data);statement.execute();System.out.println(Successfullyaddedrow:+data);}finally{if(connection!=null)connection.close();}}privatevoidsend(Stringdata,QueueConnectionFactoryfactory,Queuequeue)throwsJMSException{System.out.println(Sendingamessagecontaining:+data);QueueConnectionconnection=null;try{connection=factory.createQueueConnection();QueueSessionsession=connection.createQueueSession(false,Session.AUTO_ACKNOWLEDGE);QueueSendersender=session.createSender(queue);TextMessagemessage=session.createTextMessage(data);sender.send(message);System.out.println(Successfullysentmessage:+data);}finally{if(connection!=null)connection.close();}}privateDataSourcegetDataSource(StringjndiName)throwsNamingException{return(DataSource)this.getJNDIObject(jndiName);}privateQueueConnectionFactorygetQueueConnectionFactory(StringjndiName)throwsNamingException{return(QueueConnectionFactory)this.getJNDIObject(jndiName);}privateQueuegetQueue(StringjndiName)throwsNamingException{return(Queue)this.getJNDIObject(jndiName);}privateObjectgetJNDIObject(StringjndiName)throwsNamingException{Contextroot=newInitialContext();returnroot.lookup(jndiName);}91011¾¾¾12tools.jarCodeDOMCodeDOMSystem.CodeDomSystem.CodeDom.CompilerCodeDOM.NETFrameworkC#JScriptVisualBasicSystem.CodeDom.CompilerCodeDom1.CodeCompileUnit2.CodeNamespaceCodeTypeDeclaration1399®zzz14¾¾¾1516[][]17BookBorrowInfoStudentBorrowInterface(fromUseCase...)BorrowSubscribrInfo(fromUseCase...)BookBookIDAllCountCurrentCountBorrowInfoBorrowTimeStudentBookStudentNameCardNoBorrowInterfaceSubscribrInfoBorrowBorrow()CheckCanBorrow()BorrowInfoBookStudentReturnBorrowInterfaceReturnInterfaceManageManageInterface(fromUseCase...)SearchSearchInterfaceSubscribeSubscribeInterface(fromUseCase...)BorrowSubscribrInfo:Borrow::BorrowInterface:Student:BorrowInfo:SubscribrInfo:Book3:4:Borrow()5:6:VALID7:8:9:10:OKMessage11:1:2:::BorrowInterface:Borrow:Student3:8:1:2:4:Borrow()7:FAILMessage5:6:INVALID18subsystemWinFormsubsystemWebsubsystemSubscribeLogicSubscribr()CnacelSubscribr()StudentNameCardNoUserIDPasswordBorrowServerBorrow()BorrowInfoBorrowTimeStudentBookBookBookIDAllCountCurrentCountBorrowLogicBorrow()CheckCanBorrow()CancelSubscribe()BorrowOperation()ValidMaxCount()SubscribrInfoSubscribeTimeStudentBook:Client:BorrowServer:BorrowLogic:SubscribeLogic:Student:Book:BorrowInfo1:Borrow()2:Borrow(Student,Book[])3:CheckCanBorrow()4:GetBorrowedBook()5:BorrowedBookCount6:ValidMaxCount()7:create()8:UpdateCurrentCount()9:CancelSubscribe()10:OKMessage11:OKMessage12:OKMessageFormBorrowSubmitBorrow()BorrowClientBorrow()BorrowServerBorrow()(from)::FormBorrow:BorrowClient:BorrowServer1:Open()2:SubmitBorrow()3:Borrow()4:Borrow()5:OKMessage6:OKMessage7:DisplaySuccessMessage
本文标题:构建面向对象的应用软件系统框架
链接地址:https://www.777doc.com/doc-4475621 .html