构建面向对象的应用软件系统框架

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

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ç63WebsharpAOPzzz‹‹‹‹‹7zzz8¾¾¾¾¾¾¾¾¾¾¾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:INVALID18‹‹‹‹subsystemWinFormsubsystemWebsubsystemSubscribeLogicSubscribr()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

1 / 151
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功