WAS and MQ integration (1)

Development and deployment 1. WAS product package Application Server Toolkit can do for your development and operation of which help? 2. Whether the use of MDB (Message-Driven Bean) to listen for MQ queue? 3. How to deal with the Chinese JSP display problems? 4. In WAS MQ to connect what way? What is the best way? 5. I would like to write a Web application can support as many clients, what precautions? 6. I WAS on their own can achieve multi-threaded programming and implementation class loader? 7. In several independent WebSphere Application Server environment, a server application, how to access other servers running the application? 8. For the EJB deployment code is generated in building a good application, or deploy the application generates good? 9. On the Java EE development, best practices which should be adopted? 10. I can run PHP in WAS CE it? 11. In the WebSphere Application Server in the ability to deploy multiple applications co-exist? 1. WAS product package in Application Server Toolkit can do for your development and operation of which help? A: Application Server Toolkit (AST) to create for WebSphere Application Server V6.1 provides new applications of basic support. Including for creating new Web applications, Web services, Portlet, EJB components, various guides and tools, and annotation-based programming support, new management tools for editing WebSphere-specific binding and extension tools and so on. WAS V6.1 includes the J2EE perspective and the Web perspective, Eclipse 3.1 and Eclipse Web Tools Platform (WTP) Version 1.0. Itself is a complete J2EE development environment, so you can use it construct, debug, and directly to the deployment of new applications to WebSphere Application Server V6.1. Although fully capable of developing J2EE applications, but AST is IBM Rational ® development environment, such as Rational Software Architect and Rational Application Developer subset. Figure 2 shows the hierarchy can be a good combination that the relationship between these types of tools. Function of the outer tool provides complete functionality including the inner tool. Figure 2 Integrated Development Environment for WAS V6.1 of AST in the Eclipse Web Tools Platform to provide the basis of the following key features: * the server for WebSphere Application Server tools, such as debugging and unit testing support. * Support for WebSphere Application Server-specific extensions, such as SIP and Jython tools. * Properties for the WebSphere Application Server deployment descriptor files and graphics editor. Rational combination provides a more even expansion of features, some of the key features include: modeling and visualization tools. * Analysis, verification and code correction tools. * Testing and analysis tools. • Support for multiple server types. AST is authorized as part of WebSphere Application Server components. To its unrestricted reproduction, which makes the AST can be used to develop for WebSphere Application Server V6.1 application. The WAS and AST of more resources, see the developerWorks article, the site of China "Hello World, Part 4: WebSphere Application Server and Application Server Toolkit V6.1". 2. Whether the use of MDB (Message-Driven Bean) to listen for MQ queue? A: We suggest using the MDB (Message-Driven Bean) to listen for MQ queue. Because the MDB implements multi-threaded approach, and MDB EJB specification is the programmer for programming and maintenance are easy. MDB has its own container to manage these threads, so that applications do not care MQ listener and the various details of the thread pool. 3. How to deal with the Chinese JSP display problems? A: WAS in the following two steps you need to solve the JSP of the Chinese display problems: 1. Top of each jsp file, add the following two lines: 2. In the console, select Server> Java and Process Management> Process Definition> Java Virtual Machine, JVM parameters to set common: Dfile.encoding = GBK Dclient.encoding.override = GBK Ddefault.client.encoding = GBK characters in the Web development deal more resources, see the developerWorks article, the Chinese site: · "JSP / Servlet in the character encoding" · "UTF-8 character handling in Web Application Development" 4. In WAS MQ to connect what way? What is the best way? A: Typically, in WAS the way to connect WebSphere MQ has the following three ways: 1. Using the WebSphere MQ link using the WAS Admin Console to configure and manage WebSphere MQ link (WebSphere MQ Link). WAS the way the service integration bus (SI BUS) messaging with WebSphere MQ queue manager in the network provide a direct connection between the. WebSphere MQ connection similar to the server and the server connection, where the WAS as a WebSphere MQ Server to be configured. 2. In the WebSphere Application Server WebSphere MQ server to configure WAS to use the management console to configure a WebSphere MQ server. The way in WebSphere Application Server service integration messaging engines and z / OS WebSphere MQ queue manager or queue sharing group to provide a direct connection between the. However, the configuration in the WAS in the WebSphere MQ server is designed for the use of WebSphere MQ on z / OS network to provide high availability and optimum load balancing features. SoThis approach applies in connection WAS z / OS WebSphere MQ on the situation. 3. To WebSphere MQ as external JMS provider WAS In this way, as an external JMS provider of WebSphere MQ will not be service integration bus to connect to the WebSphere MQ messaging network, which allows direct access from WebSphere Application Server WebSphere MQ. In this way, WAS do not need to configure WebSphere MQ servers, do not need to set the SI BUS-related content, just need to create JMS resources, choose to create WebSphere MQ resources (MQQueueConnectionFactory and MQQueue) can. For WAS and WebSphere MQ are installed on the same machine, there are two configuration methods are: (1) If the WAS and WebSphere MQ on the same server, in the configuration MQQueueConnectionFactory the time of its property "transportType" select "BINDING". (2) If the WAS and WebSphere MQ is not the same server, the configuration MQQueueConnectionFactory the time of its property "transportType" select "CLIENT". More detailed description of the ways reference WAS InfoCenter: http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.websphere.pmc.nd.doc/tasks/ tjfp0015_.html In summary, through a combination of customer case study in the best way to connect WebSphere MQ for the third, especially when WAS and WebSphere MQ on the same server on the circumstances, that is 3 - (1). This configuration model from the perspective of WAS is the most simple and the reliability and performance are also the best. If the WAS and WebSphere MQ on the same server can not be recommended 3 - (2), performance is second only to 3 - (1) approach. WAS and WebSphere MQ connection on more resources, visit the developerWorks article, the Chinese site, "to ensure WebSphere Application Server and WebSphere MQ connection between the security": Part 1 / 2 part. 5. I would like to write a Web application can support as many clients, what precautions? A: You can be summarized in one sentence: the less you rely on features, you can support the more clients. * Less use ActiveX, Applet; · less persistent cookies, but non-persistent cookies does not matter; * fewer pop-up window; * usually no problem using Javascript, but be careful: some people will limit the operation of some Javascript; * use a variety of plug-in risk. The main functions (such as flash, media player) it is unwise to use plug-ins. However, the use of plug-in additional features not matter. * Sure that sensitive information on the use of HTTPS, and make sure to use well-known CA issued certificate. 6. I WAS on their own can achieve multi-threaded programming and implementation class loader? A: not recommended developers go their own control of the realization of multi-threaded applications, because WebSphere has provided multi-threaded container. Each request to run in the WAS is a thread in a separate operation. If the application itself to achieve multi-threaded programming, creating new threads and threads on the system for maintenance of the system has a significant overhead. Also WebSphere class loader has been provided, the application does not need to implement their own class loader. 7. In several independent WebSphere Application Server environment, a server application, how to access other servers running the application? A: This relates to the name space (namespace) of the joint problem. For example: Suppose we have two separate WebSphere Application Server Server1 and Server2, Server1, in order to run the program to access the EJB Server2 process, we need to use CorbaName binding Server1 and Server2's name space. In the joint context before running Server1 the / bin directory dumpNameSpace.sh / bat command, such as: dumpNameSpace.sh-root server-port 2809 then only list the name of Server1 space content. Next, we bound to the namespace Server2 on Server1. Server1, management console, select the "environment"> "name"> "name space binding", scope select "Node 1"> "Server1", click "New", select "CORBA" binding type, specifying "bind identity" in the name of the input space in the name Server2 (which we want to use the name), the "Corba name of the URL", enter the following similar content: corbaname: iiop :*.*.*.*: 2810 # nodes/NODE1/servers/server2 select the "joint context." At this point, run: dumpNameSpace.sh-root server-port 2809 then the name will be listed in Server2 space content. So, when we Server1 Server2 as the Client, the original JNDI name "ejb / ibm / CMPHome" should be changed to "server2/ejb/ibm/CMPHome". In summary, in order to allow different applications on the server exchange of visits, the key to achieve the shared name space. Once the name of one server to another server space to share, then the second application server by modifying the JNDI name, you can easily access the first server application. 8. For the EJB deployment code is generated in building a good application, or deploy the application generates good? A: This depends on the specific environment: If you determine the server's version, database type, then build applications directly to generate a complete package to run the EAR would be better. If you need a different server versions, different databases running on EJB application, then the application should be selected to deploy "to deploy EJB" button. Another lesson: the development and testing of large applications, according to different stages, either in the building when the deployment of EJB, and can deploy applications in the deployment of EJB. Elaborate on the following: • In the early stages of development, if you use IBM development tools, can be generated directly by the developer complete the EAR package, which contains the EJB code to be deployed to facilitate developers for single tests and functional tests. • In the medium-term development phase, when the code is added to a database system, the need to establish a unified database system in the library. At this point, to deploy the application to the deployment of EJB. For example, in managing the deployment of an EJB-written with third-party applications, build the entire application because it is not complete, so it is necessary to deploy applications in the deployment of EJB. * However, installing the product stage, this is often automated using wsadmin script, unable to deploy applications in the deployment of EJB, it needs to build applications on the deployment of EJB. 9. On the Java EE development, best practices which should be adopted? A: Here we summarize the 19 best practices for Java EE development: 1. Always use MVC framework: the business logic (Java Bean and EJB components) from the controller logic (Servlet / Struts action) and the presentation logic (JSP, XML / XSLT) in clearly separated. Good stratification can bring many benefits. 2. Do not do repetitive work: Use common, proven frameworks such as Apache Struts, JavaServer Faces and the Eclipse RCP. 3. In each layer are automatic unit testing and test management: do not just test your graphical user interface (GUI). Tiered testing makes debugging and maintenance work has become extremely simple. 4. In accordance with the specifications for development, rather than in accordance with the application server for development: To specifications memorized by heart, if you want to deviate from norms, and subject to careful consideration before they can do so. This is because when you deviate from the rules of the time, you are not doing the things you should do. 5. From the outset, plans to use the Java EE security: Enable WebSphere security. Lock your EJB and URL, allowing only authorized users access to all. 6. Build what you know: iterative development work will allow you to gradually master all of the Java EE module. Create a small and simple from the beginning rather than the module immediately from the start, all the modules involved. 7. To use EJB components, always use the Session Fa ç ade: In the case of architecture appropriate to use the local EJB. 8. Use a stateless session Bean, rather than a state of the session Bean: This will make your system more stand the test failure. Use HttpSession to store and user-related status. 9. Use container-managed transaction: learning about Java EE of two-phase commit transaction, and use this approach, rather than developing your own transaction management. Container in the transaction optimization is almost always better. 10. The JSP as the presentation layer of choice: Only that you need a variety of output types, and the output type must be a single controller and back-end support when using the XML / XSLT. 11. When using HttpSession, try to only save the current state of need, which firms, and other content not stored in the HttpSession in: Enable session persistence. 12. Take full advantage of application server do not need to modify the code features: the use of certain features (such as WebSphere Application Server cache and Prepared Statement cache) can greatly improve performance, and makes minimal overhead. 13. Full use of the existing environment: a Java EE EAR and configurable installation script, not the black box binary installer. 14. Full use of the application server environment, the quality of services provided: design can use the WebSphere Application Server Network Deployment cluster applications. 15. Full use of Java EE, do not cheat: committed to building a real function using Java EE Java EE applications. 16. Arranged version of the update: Change is inevitable. Arrangements for the new release and restoration updates, so your customers can get the latest version. 17. In the code all the key areas, using a standard logging framework for recording the program status: This includes the exception handler. Used as the JDK 1.4 Logging or Log4J logging framework like. 18. Upon completion of the corresponding task, always clean up: If you get an object from the pool, always ensure that their return to the pool. 19. In the development and testing process to follow strict procedures: This includes the introduction and follow software development methodology. Due to space reasons, can not be elaborated here, for more information, please visit the developerWorks article, the Chinese site, "IBM WebSphere Developer Technical Journal: The most important Java EE best practices." 10. I can run PHP in WAS CE it? A: can PHP Integration Kit for IBM's open source server, WebSphere Application Server Community Edition (WAS CE) to support PHP scripts. PHP is a web application development in the very popular scripting language. When we use PHP as a server-side scripting, you need to run the Apache HTTP server or Microsoft IIS web server on this. Although we can also configure the Apache HTTP server, PHP and JSP support, But needs to PHP and JSP requests are forwarded to the appropriate PHP engine or Java application server, the PHP script and there is no relationship between the JSP code, an HTML page can not mix PHP scripts and JSP code. Through the PHP Integration Kit for WebSphere Application Server (WAS), Community Edition (CE), PHP scripts can be integrated into Java 2 Enterprise Edition (J2EE) applications, such as through Container Managed Security (CMS) to control access to the PHP script authority, through the management console WAS CE to install / update PHP applications can also be modified through the Java Filter technology to the HTML page contains the PHP script. You can find the IBM alphaWorks Web site the latest information on this project, currently supported platforms are Windows and Linux, but now the project can not use in the production environment. PHP Integration Kit through the Servlet container configuration FastCGI filter, the request will be forwarded to the PHP script, PHP engine. PHP Integration Kit provides a launcher to call the PHP engine. Be noted that the PHP Integration Kit is not re-build a PHP engine, but need to use the existing PHP engine (this is easier to understand because the PHP engine is provided and maintained by the PHP.net). If the system is installed there are several versions of PHP engine, web deployment descriptor file web.xml in the configuration of the PHP engine. Due to space reasons, can not be elaborated here. More about PHP Integration Kit installation and configuration information, please visit the developerWorks article, the Chinese site, "in WebSphere Application Server Community Edition to run PHP". 11, issue: whether it is possible in the WebSphere Application Server to deploy multiple applications co-exist? A: Yes. In the IBM WebSphere Application Server The single instance procedure to deploy multiple coexisting Yingyong some environments have some benefits, but the problem isolation and problem determination Fangmianyehui Chanshengyixie unique difficulties. Advantages of a low cost. The main advantage of this method is its economy of scale. A small amount of physical host servers and server processes a large number of applications can usually hardware resources, infrastructure, software costs and system management costs, save a lot of expenses. 2, resource sharing. In a server instance, share resources among multiple applications of this concept makes better use of resources possible. An application of the idle period of the application may be another peak period. Of course, this may be multiple independent servers to share a common pool of hardware resources, but also may be in a single application server process further sharing of other resources pool (for example, shared memory pools, database connection pool, etc.). By their very nature, this principle is actually calculated on demand. Disadvantages 1, the problem identified. If a server crashes or have some form of abnormal behavior (such as slow response time, error messages, etc.), then in the same server simultaneously deployed multiple applications, it may be difficult to determine exactly what caused this application problem is caused by direct or indirect result of the. In fact, the only concern in an application configuration defects or errors may not be enough; base WebSphere Application Server run-time defects or errors in a configuration may affect in different ways in different applications - or perhaps because of some the presence of a particular application triggered, thereby affecting other applications. In these cases, the coexistence of multiple applications may explore the root causes of problems more difficult. 2, problem isolation. Because multiple applications share many common resources and the environment, an application from any problems on the same server may eventually affect other applications running. They may be relevant from the performance tuning with minimal impact to the server completely paralyzed, usually require the application and deploy personnel and administrators to deal with different applications to coordinate their activities.

分类:Java 时间:2010-04-28 人气:445
blog comments powered by Disqus


  • 初识 IBM Rational Data Architect V6.1 2012-03-09

    由于工作需要,我有机会熟悉并了解很多IBM软件的新产品与新技术,这段时间一直都在和Rational Software Architect, RequisitePro, SoDA, ClearCase 打交道,当项目进行到需要将UML2中的诸多与数据库设计相关的模型进行DB2/ORALCE平台的实例化的时候,我认识了今天给大家介绍的主角Rational Data Architect .在后面的日子里,为了能从不同角度学习这个产品,我会和其他产品进行对比分析,比如Sybase的PowerDesige

  • Software architect must master the WEB application software architecture technology 2010-08-26

    In recent years, when people for the WORDPRESS, DISCUZ like the large-scale web applications is difficult to extend, difficult to maintain when the pain This software architect aware of the importance of the work, as well as the importance of good so

  • 企业级的java开发工具Rational Application Developer(RAD) 2012-09-22

    本试用版软件具备产品的全部功能.该产品试用版的试用期为 60 天.(查看限制条件) 操作系统 版本 大小 方法 下载 Linux®.Windows™ V8.5 90-91 MB* Installation Manager(推荐) Linux.Windows V8.5 3540 MB to 6,503 MB HTTP | Download Director * IBM Installation Manager 大约 180 MB.试用版软件的大小以及下载所需时间依据您所选择的产品组件及语言版本而不

  • GeoServer map development solution (a): Environment set up articles 2011-07-04

    GeoServer map development solution (a): Environment articles GeoServer is built OpenGIS Web server to achieve J2EE specification community open source projects, the use of the release of GeoServer can easily map data, characteristics of the data allo

  • Websphere Application Server environment configuration and application deployment best practices 2010-12-11

    Original Address http://www.ibm.com/developerworks/cn/websphere/library/techarticles/0811_zhengminrui/0811_zhengminrui.html The release of a run on the WebSphere Application Server's J2EE application prior to the application server configuration and

  • <2008 IBM Rational Software Development Summit Forum> small mind 2008-09-15

    I always wanted to write some summary for the exchange and notes, then did not pick up a pen, to participate in this activity to a feeling of a small mind open head, Oh! In fact, participated in "2008 IBM Rational Software Development Summit Forum&qu

  • Configuring PHP server environment 2010-09-07

    Yesterday to help a student get a PHP problem solving, usually because their development is in the development of the company's remote server, so the machine is not equipped with a PHP server environment, just by the help of his way to take the machi

  • LInux application how to deal with the current operating environment, the environment variable 2010-08-19

    Linux application how to deal with the current operating environment, environment variables GNU / Linux runs each of the following program has a so-called operating environment, the environment here is actually a set of variable definitions. All the

  • Environment, the environment. 2009-06-09

    Question: on a machine running a normal environment, change to another machine on the gp, or take a very complicated configuration from scratch, ranging from hours to days to waste time. Reasons, including the environment is usually scattered in diff

  • Project management and defect tracking system software installation and use of MANTIS 2009-04-13

    At present, popular defect tracking systems Introduction For project management, defect tracking is a very important aspect, it can be apart from the completion of the demand for control, but also the quality of the software itself is controlled in o

iOS 开发

Android 开发

Python 开发



PHP 开发

Ruby 开发






Javascript 开发

.NET 开发



Copyright (C) codeweblog.com, All Rights Reserved.

CodeWeblog.com 版权所有 黔ICP备15002463号-1

processed in 0.421 (s). 12 q(s)