Configuration of WebLogic Server-based alsr Cluster

Source: Internet
Author: User
Tags xml example
Configuration of WebLogic Server-based alsr Cluster

Time: 2008-01-30
Author: Zhou xiwei
Browsing times:

23
Keyword: SOA, SOA governance, WebLogic Server, AquaLogic Service Registry
Document tools
Recommended to friends
Print article

Preface

AquaLogic Service Registry (hereinafter referred to as alsr) is an important part of Service Oriented Architecture (SOA) and is the basis for SOA governance (governance) and service lifecycle management. Alsr fully complies with the UDDI V3 standard. As a service registration center in the SOA architecture, alsr can be used for registration, discovery, and search for services.

Alsr can be run independently or deployed on the J2EE application server and can be deployed in clusters. Because alsr is designed to be independent from the application server, some modifications and configurations need to be made when porting to a specific application server. This article describes how to deploy alsr to a WebLogic Server-based cluster.

Configuration of WebLogic Server-based alsr Cluster

Hypothesis:

  • The two machines form a cluster. The hostnames are jizhou01 and publictesting;
  • The database uses ms SQL server2005;
  • Use WebLogic Server 9.2 (WebLogic Server 8.1 SP5 or later, WebLogic Server 9.x)
  • External access URL: http: // jizhou01: 7021/Discovery/UDDI/Web

Note:Take alsr discovery registry as an Example

  • The balancer is a domain management node (not a cluster node) and is responsible for load balancing and forwarding requests by proxy.
  • Configuration Manager: The management node of the cluster, which is responsible for the configuration and Data Synchronization of each node of the cluster to maintain data consistency. Here, the Manager node on jizhou01 is used as the Configuration Manager.
  • Configuration listener: manages multiple nodes in the cluster. Here, the listener1 node is used as an example and runs on the publictesting machine.

Procedure:

Install alsr3.0:

A) Select WebLogic application server as the deployment platform;

B) Select the appropriate database. Do not use the default database in cluster deployment mode. In this example, use MS sqlserver2005;

C) Select the appropriate registry mode during installation. In this example, only the discovery type registry is installed, so the context uses discovery;

D) do not select the "post-installation deployment" option during installation; otherwise, it will be deployed to the domain management node. If you do not need a cluster, you can select this option;

E) after the installation is complete, the discovery. War will be generated under % registry %/CONF/porting/WebLogic/build. This file needs to be configured and modified. Therefore, create the discovery folder in the build directory and decompress the discovery. War content to the Discovery directory using WinZip or jar tools.

Note: you only need to install it on the Management node, and there is no need to install it on other machines in the cluster.

After configuring the correct alsr, the runtime is a standard-based web application, which is very convenient for management.

Create WebLogic Server domain:

A) The Management node is adminserver, SSL is enabled, the listening port is 7022, and the general listening port is 7021.

B) add the managed Node Manager and listener1. Enable SSL, listener port is 7032, and general listener port is 7031. Note that the cluster software proxy needs to use the management node, it is not configured separately, or it can be replaced by Hardware load balancing such as F5.

C) Create a cluster mycluster and add manager and listener1 to the cluster. The cluster address is http: // jizhou01: 7031, http: // publictesting: 7031.

D) add the JDBC driver of the required database to classpath. You can set it in setdomainenv. CMD or setdomainenv. Sh under the bin directory of domain. Note that drivers must be added to all nodes in the cluster.

E) Verify that the cluster configuration is correct. If you are not familiar with cluster deployment, refer to the example weblogic92/samples/Server/examples/src/examples/cluster/sessionrep/inmemrep that comes with Bea deployment.

F) do not use the default multicast address and port of the cluster to avoid conflict with the multicast address and port configured by others.

Security Configuration:

A) access the managed node of the cluster through the IE browser to obtain the certificate of the cluster node and save it as a *. Cer file in base64 format.

B) There is a configuration file pstore under % registry %/CONF/porting/WebLogic/build/Discovery/CONF. XML, You need to import the certificates of all nodes in the cluster to this file; the certificates in this file are used as the trusted certificates of the application, you can use the following command:

Pstoretool add-config % pstore_path %/pstore. XML-certfile [Certificate file name]

Pstore_path = % registry %/CONF/porting/WebLogic/build/Discovery/Conf

Note that the certgenca. Der under % beahome %/weblogic92/Server/lib is also added to pstore. xml because it is the CA certificate issued by the node certificate. In the production environment, you also need to import the CA certificate to the pstore. xml file.

C) after installation, copy the file % registry %/CONF/JAAS. config to the domain directory of all nodes and add the file to the setdomainenv script (you can add the file to the first line)

Set java_options =-djava. Security. Auth. login. Config = % domain %/JAAS. config

Log File Configuration:

A) modify the log file address in the log4j. config file in % registry %/CONF/porting/WebLogic/build/Discovery/CONF. If the specified folder does not exist, an exception is thrown. Make sure that the log file addresses of all nodes in the cluster point to folders of the same structure.

Configure Application

A) Configure discovery/APP/UDDI/CONF/configurator. xml and modify the configuration file according to the cluster node design.

See the following for details: the manager is jizhou01, the listener is publcitesting, and the publication registry IP is 192.168.1.2;

  <?xml version="1.0"  encoding="UTF-8"?>
<config name="configurator" savingPeriod="5000" local="true">
<configManagerUrls>
<url>https://jizhou01:7032</url>
<managerServiceUrlPath>/discovery/uddi/configuratorManager</managerServiceUrlPath>     <managerConfiguratorUrlPath>/discovery/uddi/configurator</managerConfiguratorUrlPath>
</configManagerUrls>
<IPFilter name="configuratorFilter">
<subnet IPAddress="192.168.1.2" subnetMask="255.255.255.255"/>
</IPFilter>
<configManager cluster="true" resendInterval="300">
<configuratorListeners>
<configuratorListener>            
https://publictesting:7032/discovery/uddi/configuratorListener
</configuratorListener>
</configuratorListeners>
</configManager>
<UDDIInterceptorChain name="configuratorApiChain">
</UDDIInterceptorChain>
<UDDIInterceptorMapping>
<mapping UDDIInterceptorChainName="configuratorApiChain" UDDIServiceInterface="org.systinet.uddi.configurator.ConfiguratorApi"/>
</UDDIInterceptorMapping>
</config>

B) Configure discovery/APP/UDDI/CONF/database. XML, which is the database driver configuration. When installing alsr, you will be prompted to enter the database information to ensure that the username and password are entered correctly. The password will be encrypted and saved in the file. Other information, such as the database IP address and Database Name, you can install and modify the ports. If the default database URL is not suitable, You can manually modify it. For example, if you configure it as Oracle RAC, use thin DRIVER:

ORACLE: thin: @ (description = (load_balance = yes) (address = (Protocol = TCP) (host = 192.168.0.1) (Port = 1521) (address = (Protocol = TCP) (host = 192.168.0.2) (Port = 1521) (CONNECT_DATA = (SERVICE_NAME = orcl )))

Modify the default connection pool configuration to meet the needs of the actual environment

C) Configure discovery/APP/UDDI/CONF/web. XML: configure the entry address and Security Entry address according to the actual needs of the cluster. By default, the cluster management node is used as the entry address. If you need to configure different Server Load balancer addresses, modify the corresponding part. You can also modify it on the registry console. For example:

C) package the content in % registry %/CONF/porting/WebLogic/build/discovery into discovery. War and deploy it on the managed node of the cluster.

Configure software Load Balancing applications

A) Create the folder balancer under % registry %, and add web. xml and weblogic. XML in the create WEB-INF. Modify the following files as needed.

Web. xml example:

<? XML version = "1.0" encoding = "UTF-8"?>
<! Doctype web-app public "-// Sun Microsystems, Inc. // DTD web application 2.3 // en"
Http://java.sun.com/dtd/web-app_2_3.dtd>
<Web-app>
<Servlet>
<Servlet-Name> httpclusterservlet </servlet-Name>
<Servlet-class> weblogic. servlet. Proxy. httpclusterservlet </servlet-class>
<Init-param>
<Param-Name> weblogiccluster </param-Name>
<Param-value> jizhou01: 7031 | publictesting: 7031 </param-value>
</Init-param>
</Servlet>
<Servlet>
<Servlet-Name> fileservlet </servlet-Name>
<Servlet-class> weblogic. servlet. fileservlet </servlet-class>
</Servlet>
<Servlet-mapping>
<Servlet-Name> fileservlet </servlet-Name>
<URL-pattern>/Discovery/UDDI/webdata * </url-pattern>
</Servlet-mapping>
<Servlet-mapping>
<Servlet-Name> httpclusterservlet </servlet-Name>
<URL-pattern>/</url-pattern>
</Servlet-mapping>
<Servlet-mapping>
<Servlet-Name> fileservlet </servlet-Name>
<URL-pattern>/Discovery/UDDI/BSC/webdata * </url-pattern>
</Servlet-mapping>
</Web-app>

 

Weblogic. xml example:
<! Doctype Weblogic-web-app public "-// BEA Systems, Inc. // DTD web application 8.1/EN"
Http://www.bea.com/servers/wls810/dtd/weblogic810-web-jar.dtd>
<Weblogic-web-app>
<Context-root>/discovery </context-root>
</Weblogic-web-app>

B) Create build. bat in the balancer directory. The content is as follows:

set JAVA_HOME=C:/bea/esb26rp1/jdk150_10
set REGISTRY_HOME=D:/ALSR3/Discovery
set path=%JAVA_HOME%/bin;%path%
mkdir uddi
mkdir uddi/bsc
cd uddi/bsc
jar xvf %REGISTRY_HOME%/app/uddi/bsc.jar webroot
rename webroot webdata
cd ..
jar xvf %REGISTRY_HOME%/app/uddi/web.jar webroot
rename webroot webdata
cd ..
jar cvf balancer.war *
rmdir /S /Q uddi
echo done

Run this command to obtain balancer. War and deploy it on the Management node.

Note: The war file is the Server Load balancer software proxy. Based on WebLogic's weblogic. servlet. Proxy. httpclusterservlet, the cluster address jizhou01: 7031 | publictesting: 7031 is configured. To replace httpclusterservlet (such as F5) with other Server Load balancer instances, you only need to merge the UDDI directory under the root of the application to the root of the discovery application.

Verify that the installation configuration is correct

A) Start the domain management node and deploy balancer. War on it.

B) Start the manager of the managed node in the cluster and deploy discovery. War on it.

Note that it is normal to throw a connection exception because the SSL port is not yet established at startup. The server automatically registers after the listening port is ready, as shown in.

C) Start the managed node listener1, where discovery. War is deployed.

D) access the Registry through the entry address: https: // jizhou01: 7022/Discovery/UDDI/Web. Make some modifications after logon. You can see that all the modifications have been applied to all nodes in the cluster.

Summary

By configuring the cluster of alsr, you can get the UDDI function of alsr. You can also use the cluster of Weblogic to improve the throughput and reliability of the system and achieve load balancing. Alsr allows you to query services at runtime, Control Service Integrity (such as security and policy), define service release approval processes, and implement precise security control over services, there is a browser-based console. You can also configure UDDI in BEA alsb (ESB) to synchronize services between the business service bus and the UDDI registration center. The UDDI-based alsr provides a solid foundation for enterprises' it transformation to a more standardized SOA environment and improves SOA governance capabilities.

Author Profile
  Zhou Mingwei is a presales technical consultant of (dev2dev ID: zhoujw) BEA System (China) Co., Ltd.

Author other articles

  • Pattern and Application of MVC in Web System
  • ESB-based MQ connection Solution

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.