Application Interoperability: Microsoft .NET and J2EE

xiaoxiao2021-03-06  112

Microsoft Corporation

Summary: Brought you available, about how to ensure the best information based on J2EE-based enterprise applications with Microsoft.NET-based components and their opposite process. In a corporate environment, if you are a developer who is responsible for implementing the interoperability between these two platforms, then this book is suitable for you to read.

This page

Who should read this book How to use this book What is Microsoft .NET? What is Java 2 Enterprise Edition? Confirmation of interoperability business requirements Define Interoperability Example Application Introduction Summary Reference

Welcome to "Interoperability of Apps: Microsoft .NET and J2EE". This book gives you the best information about how to ensure the Java 2 Platform, Enterprise Edition (J2EE) with Microsoft-based component harmonious work and its opposite process. In a corporate environment, if you are a developer who is responsible for implementing the interoperability between these two platforms, then this book is suitable for you to read.

The information in this book has both practical and normative. This book does not discuss various possible interoperability technical issues, but is concerned about three most likely, and explain how to solve these specific issues. If you want to explore the concepts behind these materials more deeper, review the following resources, such as Simon Guest's Microsoft .NET and J2EE Interoperability Toolkit, (Microsoft Press, ISBN 0-7356-1922-0).

Focus is more focused on enterprise or data center environment, their scalability, throughput, reliability and security are the main operational requirements. This book is unintentional to how to write .NET or J2EE application manual, but pay attention to how to reduce these components while minimizing the effectiveness of running validity.

This book includes information provided by Advisers and interoperability solutions in this area. It contains the best practices for running the Microsoft .NET application with the J2EE component. We hope that you like to read this book and hope that you can find help and grow the material that you can grow and interested in this book.

Who should read this book?

This book is responsible for creating and implementing Microsoft .NET or J2EE enterprise-level business applications, and requires developers who need interoperability on both platforms.

Precondition

Because this written written to two readers, there is different prerequisites for each reader group:

• Some of the .NET developers assume that readers understand the development process of distributed applications and master Microsoft Visual Studio .NET programming tools. Because the sample application is written in C # (C Sharp, the development experience of the language is basic requirement. It is also beneficial to development experience with .NET framework SDK and MSDN? Library. • Some of the Java developers assume that they are familiar with Java programming methods and tools, especially Enterprise Java Beans (EJB), and Java APIs (for example: Java Names, Directory Interface (JNDI), and Java Message Services (JMS)). Note Whether you are a .NET developer or a Java developer, a correct understanding of other platforms will be beneficial, which allows you to understand the inter-platform inter-platform intercommination technology.

Both readers need to be familiar with cross-platform open standards, such as the syntax and methods of Scalable Markup Language (XML), SOAP, Web Services Description Language (WSDL), and TCP / IP. This book also assumes that you understand the concept of distributed enterprise applications, such as multi-layer architecture, cache, asynchronous message processing, request routing, and buffering. For .NET developers, you can find this information in the MSDN Application Architecture for .NET: Designing Applications and Services; and for Java developers, the same information can be obtained on Sun's Web site. For more details, see the reference section at the end of this chapter. Documentation

The style conventions and terms used in this book are shown in Table 1.1.

Table 1.1: Documentation Convention Elements Meaning Bold Full Follow the characters (including commands and switches) to display content. Programming elements, for example: methods, functions, data types, and data structures appear in bold (in addition to the part of the code example, sometimes they use the Monospace font). User interface elements also use bold. Italic you assign a specific value. For example, FileName.ext can represent any valid file name in the discussion. The new terms are also used in the first time. Monospace Font Code Sample% SystemRoot% Windows installation folder.

Back to top

How to use this book

This book consists of Jiuzhang. Other eight chapters are:

• Chapter 2: "Understanding Enterprise Platform" • Chapter 3: "Basic Principles of Interoperability" • Chapter 4: "Interoperability Technology: Point-to-Point" • Chapter 5: "Interoperability Technology: Data Layer" • Chapter 6: "Interactive Design Elements Enable" • Chapter 7: "In Representation Layer Integration .NET" • Chapter 8: "Integrate .NET" in Business Layer • Chapter 9: "Realizing Asynchronous Intercomity"

The following sections describe the contents of each chapter.

Chapter 2: "Understanding Enterprise Platform"

Chapter 2 consists of two parts. The first part looks at .NET from a rich view of J2EE developers. This chapter links the concept of .NET and the principles you have understood to illustrate the differences and similarities between the two platforms. The second part of this chapter is the image of the first part, providing the same information, but this is for experienced .NET developers. This chapter introduces you to J2EE's business characteristics and explains how Java applications work in a distributed environment.

Chapter 3: "Basic Principles of Interoperability"

Chapter 3 describes the basic principles that will be used based on .NET-based applications and Java-based applications, it is committed to data conversion between these two technologies. It is mainly focused on bringing the data types of the two platforms, especially complex data types.

Chapter 4: "Interoperability Technology: Point-to-Point"

Chapter 4 focuses on the point-to-point communication method for XML Web services and .NET remote processing. The subject includes binary communication and routing, and the use of a third party running-hour bridge for integrating Java and .NET.

Chapter 5: "Interoperability Technology: Data Layer"

This chapter continues in Chapter 4, focus on techniques applied to data layers or resource layers. The techniques involved include shared databases and asynchronous message queues. Finally, this chapter briefly introduces other asynchronous techniques, such as using MSMQ-MQSeries Bridge in Microsoft Host Integration Server.

Chapter 6: "Realizing Interoperability Design Elements"

Chapter 6 describes how to implement these ideas in an enterprise application under Chapter 4 and 5. This chapter introduces best practices in J2EE and .NET programming, which emphasizes the role of abstract layers in the application. This chapter will continue to explain how to implement an abstraction layer in your design (for example: service interface and interoperability fitting layer). Finally, it details how the sample application uses these elements to achieve interoperability. Chapter 7: "In the representation layer integrates .NET"

Chain 7 describes the following scenario: I hope that the assembly of the ASP.NET represents the layer is integrated while retaining the existing J2EE business layer. This allows an organization to protect it to J2EE's existing investment and use a richer client experience provided by ASP.NET.

Chapter 8: "Integrates .NET in the business layer."

Chapter 8 describes how the Xbikes example integrates new .NET business layer components while retaining the same JavaServer Page (JSP) front end. This solution applies to companies that need to maintain the same client experience but modify the business layer. Adding .NET components allow quick development of business logic components or allowing the use of third parties .NET Framework applications.

Chapter 9: "Realizing Asynchronous Interoperability"

The last chapter focuses on the interoperability of the message processing component in the data layer. Using the Xbikes sample code illustrates how to connect message queues with message processing components (such as Microsoft Message Queuing or Java), provide asynchronous operations and support for transactions and long-time operations.

Back to top

What is Microsoft .NET?

Microsoft .NET is a term that covers the latest programming and development environments for Microsoft's creation distributed enterprise applications. The .NET framework is the main component, which is specifically configured to simplify and enhance the process of a set of elements. The .NET framework includes some components such as public language runtime (CLR), ASP.NET, ADO.NET, business services, and .NET remote processing.

Other components of Microsoft .NET include:

• Visual Studio .NET Development System • Windows Server 2003 Operating System Series • Active Directory Directory Services • Windows Server System Components, for example: SQL Server 2000 and Exchange Server 2003

Microsoft .NET supports open standards, such as: SOAP, Web Services Description Language (WSDL), General Description Discovery and Integration (UDDI), and XML. Microsoft provides a full range of support for the .NET framework and has a variety of frameworks running on most Windows versions. Chapter 2 provides introduction to Microsoft .NET for experienced J2EE programmers.

Back to top

What is Java 2 Enterprise Edition?

The J2EE specification describes a multi-layer application model and a set of APIs that can be used to create distributed enterprise applications. With J2EE, you can build multi-layer applications consisting of reusable elements within a unified security model.

The J2EE standard is Sun Microsystems intellectual property. This standard is recognized by many suppliers and manufacturers, especially SUN play an outstanding role in promoting J2EE. Moreover, there are many suppliers and enthusiasts to support J2EE. J2EE runs on many operating systems, including Windows, Sun? Solaris, UNIX, and Linux.

Elements that make up J2EE include:

• JavaServer Pages (JSP) and Servlet • Enterprise JavaBeans (EJB) • J2EE Container and Module • J2EE Software Development Kit • Java Name and Directory Interface (JDNI), Java Message Service (JMS) and Java Database Connection (JDBC) APIJ2EE Currently The version (V1.3) implements an open standard through a third party, such as SOAP, WSDL, UDDI, and XML. J2EE V1.4 (currently Beta 2) supports these protocols itself. Chapter 2 provides an introduction to J2EE for experienced .NET programmers.

Back to top

Confirmation of interrelated business needs

Many organizations have already run a large enterprise environment based on Java or Microsoft .NET. Therefore, if the company considers the use of new applications or add additional content for the current architecture, it habitually tends to consider from the current environment that has been implemented. This situation is sometimes referred to as an environment for adjustment of technology, making decisions on enhancing the current environment more inclined to adjust in an old environment that has been running, rather than new environments that provide the best platform.

The J2EE or Microsoft .NET design Enterprise system is a cost-effective business behavior, but there is usually a sufficient business cause to achieve a mixed environment with individual platform elements. This section will focus on these factors.

Interoperability is a major requirement for many companies that allow the internal system to uniformly work and enable companies to contact consumers, external partners and suppliers. As the requirements of efficiency, responsiveness, and cost reduction are getting higher and higher, interoperability has become a major requirement for modern IT environments.

The method taken by the actual interoperability project is that the organization should use the best technique to handle the work of the hand. If a company creates a large number of applications internally, there may be more factors to keep the current environment. However, for example, if you need to implement a third-party solution or need to use only .NET to provide features, interoperability provides an effective mechanism to ensure two environments work together.

Further deep in-depth exploration of business needs involving the following areas, where interoperability is the main factor:

• Reuse the existing system. • Implementation of Conceptual Verification • Transplantation to Microsoft .NET. • Lower project overhead.

Realize the reuse of existing systems.

When considering why the interoperability item is to be implemented, the existing system is usually considered first. Many organizations usually have a lot of investments in their current infrastructure and to protect these investments. However, changing requirements may make the current system not satisfying the new demand. In this case, you can implement new features with other technologies, and integrate it into the current infrastructure using interoperability.

For example, you might want to join a new ASP.NET web layer in an existing J2EE-based service and data layer. You can integrate the J2EE environment and new representation layer components without replacing the function layer. Then, the new .NET component can increase the value of existing systems, integrating the original application and newly added applications in a changing network environment.

Interoperability technology can also extend the existence value of software assets, such as business layer applications running on dedicated hardware. In addition, if the application and hardware feature are acceptable, it is not necessary to replace it immediately. Simply add a web service interface to extend the running life of the device and provide flexibility to integrate it with updated applications.

Many organizations will maintain and use the current technologies as one of the most important factors. Employee training investment may affect funds in the application infrastructure. Although .NET has greatly shortening the development time relative to Java, but it still needs to provide continuous support for the current architecture. Because you may have skilled employees for current environmental training, you can continue to support those aspects.

Implementation concept verification research

Concept verification or preliminary study makes a vibrant company to test new business methods and techniques at minimal risks. For example: If you want to implement a newly cell-based interface, you can use .NET very quickly constructed the original shape very quickly. Then, when the original code does not change, the new interface is run with an existing environment. Therefore, add new features do not need to abandon and replace all things created. Microsoft .NET's language-independent development environment provides more technical flexibility for many companies and the ability to quickly place the market. Interoperability technology ensures that these newly deployed features are seamlessly operated with the current infrastructure.

Transplant to Microsoft .NET

If your organization is being placed from J2EE to Microsoft .NET, the interoperability can greatly reduce the inner risks of any such graft project, and the conversion between the environments can be smooth. Using interoperability allows each application layer to be transplanted independently, the transplantation plan can reduce project-dependent, process scheduling constraints, and minimize downtime.

Transplantation is not a matter of overnight, so the interoperability transplant plan may include creating a new .NET representation and switching to this layer. After you feel happy with the correct work for the new component, you will start replacing the independent component of the business layer. Finally, transplant the backend database to SQL Server.

Use interoperability technology to make you plan, implement, and correctly perform transplant from J2EE to Microsoft .NET. Even the planned transplant is commercial value, because the current negotiations with suppliers, it makes you a more favorable location. When the current supplier is no longer satisfied, it also allows you to respond faster.

Lower project overhead.

Human costs are the main factors throughout project overhead, including customized applications. .NET can provide lower overall project overhead, mainly because higher efficiency reduces artificial factors. The reason why to produce higher production efficiency using .NET is described below:

• Efficient development tools (for example: Visual Studio.NET) enable developers to quickly convert ideas into applications. • .NET Framework has a wide and easy-to-use class library that properly managed. This class library encapsulates many programming tasks and technologies, and these programming tasks and technologies are difficult to solve about many developers in the past. • Multi-language support enables developers to use existing skills. You can write .NET-based applications, such as Visual Basic® .NET, C , C #, or Java programmers, using syntax, Java programmers, using the Java programmer. .NET also supports many third-party programming languages, such as COBOL and FORTRAN. If you are writing programs with a mainstream development language, the corresponding .NET version may either release, or is preparing to publish.

The reduction in application development time is combined with multi-language compatibility to help you minimize the cost of developing applications. Developers can write programs in any of their most familiar .NETs, ​​and create components (such as web services in Visual Stidio .NET), improve efficiency and reduce deployment time. However, it is necessary to trade with potential risk of the convenience of multilingual support and the potential risk of maintaining the maintenance cost.

Indicates that layer applications are especially benefit from ASP.NET, which allows programmers to create a complete web site with the least code they choose to use. Script elements are separated from the HTML code to make debug more efficient without scrolling HTML to identify encoding errors.

Note JavaServer Face specification should allow J2EE platforms to provide similar tools for ASP.NET, although it is not part of the current J2EE release. For more information on JavaServer Face, see the JavaServer Face web page in http://java.sun.com/j2ee/javaserverfaces/. Reducing development time enables your organization to take solutions to the priority of the market. Carefully select the correct development environment and use appropriate interoperability technology to accelerate the successful deployment of enterprise applications and new features, shorten the time to put markets and reduce development.

Back to top

Define interoperability

This book defines the interoperability as follows:

Use industry standards or broadly recognized data descriptions and communication protocols to communicate or transmit data between functional units running on different platforms implemented by different technologies.

For .NET / J2EE interoperability, the process includes ensuring that applications built on one platform can connect to an application created on another platform. Figure 1.1 illustrates the components of J2EE and .NET in one enterprise application environment, and focusing on the chances and needs of the interoperability in different layers of the architecture.

Figure 1.1: Isofitable components of J2EE and .NET in an enterprise application environment

Organizational benefits can choose the best components more flexibly from all enterprise application environments to meet their business needs. However, this interoperability should only bring minimum performance overhead or functional losses.

Understand interoperability scene

The interoperability occurs in a variety of forms, some scenes are more likely to use interoperability than other scenes, while some scenes are not available or very impossible to adopt interoperability. This book focuses on three major interoperability scenes. They are:

• Integrate .NET components in the representation layer. • Integrate .NET components at the business layer. • Implement asynchronous interoperability.

Chapter 4 and Chapter 5 tells the interoperability techniques that can be used in these scenarios. Chapter 6 describes how to apply these technologies in an enterprise application, and outline the implementation strategy of Xbikes sample application usage. Chapters 7, 8, 9 illustrate each interoperability technology in the code level.

In the representation of the layer integration .NET component

Indicates that the interoperability of the layer to the business layer is an extremely common scene, accounting for a large part of all .NET / J2EE interoperability items. Typically, inter aliac intercompanies involve replacing JSP elements with ASP.NET-based front-end to obtain a richer client experience. Figure 1.2 illustrates this type of work.

Figure 1.2: .NET represents the layer connection J2EE business layer

The first scene is difficult to interact with the ASP.NET component with the J2EE intermediate layer element, as shown in Figure 1.2.

Integrate .NET components at the business layer

The next scene protects the existing JSP front end and integrates the .NET component in the business layer. This method allows developers to create programs and assemblies in any language supported by .NET frameworks. Realization .NET business layer components may include a response to business practices to quickly change or use third-party products. Figure 1.3 illustrates the mode of operation of such implementation.

Figure 1.3: Integrate the .NET business layer component into the J2EE architecture

Here you face the challenge of two interfaces between .NET and J2EE, an interface comes from a layer to the business layer, and the other interface comes from the service layer to the data layer. Chapter 8 gives a detailed example of how to implement.

Realize asynchronous interoperability

This last primary interoperability scenario involves the need to use transactional support, handling long-run transactions or providing network problems recovery. You provide these services by handling an asynchronous resource or message queue component, for example: Microsoft Message Queue (also called MSMQ) or IBM's WebSphere MQ. Figure 1.4 illustrates the implementation.

Figure 1.4: Interoperability of the business layer to the data layer

One example of this scene may be a command queue that connects to a management and monitoring bicycle production. The application can check the items in the queue or receive notifications at the end of a particular operation. After this bicycle production is over, a message will notify the car to ship. Chapter 9 describes this scene in detail.

Interoperability technical list.

There are many ways to implement the interoperability of J2EE to .NET. Each method has its specific advantages and disadvantages, and works in a particular environment different from other environments. These techniques are as follows:

• XML web service. • Run the time bridge. • Middleware for messages. • Share the database. • Integrated agent.

Web service definitions provide services for applications (usually providing a programmable interface), which can directly implement client requests, can also use Internet standard integration with other web services provider services. External consumers or applications communicate with Web services through XML format, usually transmit data on HTTP using XML. XML Web services can be implemented based on .NET-based applications and J2EE-based applications.

Runtime Bridge is a third-party solution for interoperability between J2EE and .NET to make Java classes look similar to .NET class, vice versa. Allows the use of .NET remote processing as a communication method, allowing the runtime bridge to process the call to the Java end. This book lists two products from JnbridgePro from JnbridgePro and Ja.NET from Instrinsyc. Chapter 4 provides detailed information on these products.

Message processing provides an asynchronous mechanism for communication between different layers, usually based on MSMQ or IBM MQSeries. Message processing allows loose coupling operation, especially in the application components, not only one pair of connections, but in the case of not applicable to Web services. Message processing also supports transaction, security (encryption, and authentication), network issues fault tolerance, and messaging messages. However, message processing does not provide any form of synchronization operation, possibly cause problems due to port assignment and firewall operations.

Shared database techniques typically involve a separate connection API (such as an open database connection (ODBC) or Java database connection (JDBC), which provides an abstract layer (usually SQL Server or Oracle) from the database itself. However, the challenge of this technology is to generate a suitable database architecture that all applications can address.

The integrated agent beyond the point-to-point connection provides end-to-end application integration to automate the critical business process across the entire distributed application or enterprise. Usually based on a message processing framework, the integrated agent is extremely important to use the environment where the application's information needs to be used in the application's solution. The integrated agent also provides a prefabricated application adapter that allows multiple external components (such as the primary frame, or third-party applications) to interact with integration agents as providers or consumers (or both functions). Some major integrated agent products include IBM MQSeries Integrator, CommerceBroker, and Microsoft BizTalk® Server 2004.

Note Chapter 4 and Chapter 5 In-depth explains all of these technologies other than integrated agency procedures.

Contact interoperability technology with business scenarios.

Table 1.2 illustrates possible interoperability combinations, and techniques for providing solutions for each combination. What are the techniques that are suitable for each scenario.

Table 1.2: The interoperability field representation layer to the representation layer represents a layer to the business layer business layer to the business layer service layer to the data layer XML Web service Runtime bridge message processing shared database integration agent

It is recommended to use the XML Web service to implement your interoperability solution in any case. To explore the advantages and disadvantages of each interoperability technology in detail, see Chapters 4 and 5 later of this book.

Back to top

Sample application profile

This book uses an example application to explain the interoperability scene described in Chapter 7 to Chapter 9. The app is Xbikes, an e-commerce application, through which you can use a variety of "accelerated" color simulation ordered expensive bikes. There are two separate Xbikes implementations, one for the .NET platform, another for J2EE version. Note Xbikes ?? Not a demonstration of how to write a perfect application with each architecture. This is not about how to write a safe Web site selling bicycles, which is a framework for displaying the J2EE and .NET applications.

Xbikes provides you with a framework and sample code to understand the following interoperability.

• One-round .NET element replaces the independent portion of the J2EE architecture. • Describe how J2EE components can do without limitation and .NET elements together. • Demonstrate transplant steps from J2EE to .NET full environments.

Chapter 6 explains the architecture of Xbikes applications in detail. Xbikes sample code is in the CD of the book.

Back to top

summary

This chapter introduces the structure of this book and the contents of each chapter. It introduces the interoperability of J2EE and .NET from a macroscopic perspective and then covers various scenarios of interoperability. It reviews several interoperability technologies and introduces the Xbikes sample application.

To ensure familiar .NET or J2EE developers are technically the same understanding level, you should now read the contents of Chapter 2.

Back to top

Reference

Guest, Simon, Microsoft .Net and J2ee Interoperability Toolkit, Microsoft Press, ISBN 0-7356-1922-0

For information on distributed enterprise applications (for example: .NET representation layers, business and data layers), see: Application Architecture for .NET: Designing Applications and ServicesHttp: //msdn.microsoft.com/library/ Default.asp? URL = / library / en-us / dnbda / html / distapp.asp

For the corresponding Java information, see the Sun J2EE Web site: http://java.sun.com/j2ee/ For general information about XML web services, see the following Web site:

• .NET XML Web Services Repertory, located at http://www.xmlwebservices.cc/, is located in http://msdn.microsoft.com/webservices Web Services Developer Home

转载请注明原文地址:https://www.9cbs.com/read-124626.html

New Post(0)