테스트 환경 : WebLogic 12cR2, Tuxedo 12c (OS: AIX)
WTC(Weblogic Tuxedo Connector)는 WebLogic과 Tuxedo를 연동하여 weblogic 어플리케이션과 Tuxedo 서비스 간에 상호 운용성을 제공해주는 컴포넌트이다.
JOLT와의 차이라면, JOLT는 WebLogic에서만 Tuxedo의 서비스를 호출할 수 있지만 WTC는 양방향이 가능하다.
## Tuxedo에서 WebLogic WTC 정보는 다음과 같이 필요하다
- WLS Domain Name (임의 설정)
- IP, Port
- Connection Policy (default: on demand)
## WebLogic에서 Tuxedo WTC 정보는 다음과 같이 필요하다
-TUX Domain Name (임의 설정)
- IP, Port
- Connection Policy (default: on demand)
-Tuxdeo Service Name (턱시도 서비스 이름 (ex> TOUPPER))
=========================================================================
WebLogic 설정 방법
1. WTC 서버 생성
2. 로컬 AP 설정
여기서 로컬은 WebLogic WTC domain을 의미한다.
- 엑세스 지점 이름 및 ID는 일반적으로 동일하게 맞춘다. wlstux는 임의 설정한 이름이며 네트워크 주소는
//{IP}:{PORT} (WLS instance 정보) 로 맞춰서 설정한다.
3. 원격 AP 설정
여기서 원격은 Tuxedo WTC domain을 의미한다.
엑세스 포인트 및 ID는 실제 TUXEDO에 설정되어 있는 Domain 이름으로 설정한다.
또한 로컬 엑세스는 기존에 설정했던 WLS 엑세스 포인트로 설정한다.
네트워크 주소는 tuxedo 기준 내용 상동
4. Import Service 설정
- Tuxedo의 서비스를 WLS로 가져올 때 설정한다.
- 리소스 이름 및 원격 이름은 사용하고자 하는 TUXEDO의 서비스 이름을 설정한다.
TOLOWER는 현재 TUXEDO에 설정되어 있는 서비스이며, 모든 문자를 소문자로 변경하는 옵션이다.
- 원격 엑세스 지점 목록의 경우, 현재 서비스를 가지고 있는 Tuxedo 도메인을 작성한다.
단, <aaa,bbb,ccc,...> 형태로 작성하면 앞 순서대로 fail over 기능이 제공된다 (aaa,bbb,ccc가 모두 같은 서비스를 가지고 있다는 가정 하에 가능)
5. 설정 확인
콘솔에서 접속됨 및 상태 확인을 통해서 확인 가능
dmadmin -r 로 접속 이후 pd -d {TUXEDO_DOMAIN} 을 통해 tuxedo에서도 WLS 서버 접속 확인이 가능하다.
7. application 확인
<html> <head> <meta http-equiv="Content-Type" content="text/html;CHARSET=iso-8859-1"> <meta name="description" content="BEA WebLogic Server"> <meta name="keywords" content="BEA WebLogic Server"> <title>WTC Simpapp JSP</title> <LINK REL="stylesheet" TYPE="text/css" HREF="wls_examples.css" TITLE="BEA WebLogic Server"> </head> <body bgcolor="#ffffff" link="#3366cc" vlink="#9999cc" alink="#0000cc"> <!-- top intro paragraph tables --> <!-- RED LINE --> <table cellspacing="0" cellpadding="0" border="0" width="100%"> <tr> <td width="100%" bgcolor="#ff0000" height="1"> <p class="small"> </p> </td> </tr> </table> <!-- TITLE --> <table border=0 cellspacing="18" cellpadding="0"> <tr> <td valign="top"> <h3>WTC Simpapp JSP Example</h3> </td> </tr> </table> <!-- RED LINE --> <table cellspacing="0" cellpadding="0" border="0" width="100%"> <tr> <td width="100%" bgcolor="#ff0000" height="1"> <p class="small"> </p> </td> </tr> </table> <%@ page import=" java.io.*, java.lang.*, java.util.*, java.rmi.RemoteException, javax.servlet.*, javax.servlet.http.*, javax.ejb.*, javax.naming.*, java.rmi.RemoteException, weblogic.jndi.*, weblogic.wtc.jatmi.Reply, weblogic.wtc.jatmi.TPException, weblogic.wtc.jatmi.TypedString, weblogic.wtc.jatmi.TypedBuffer, weblogic.wtc.jatmi.TuxedoService, weblogic.wtc.gwt.TuxedoConnection, weblogic.wtc.jatmi.TPServiceInformation, weblogic.wtc.gwt.TuxedoConnectionFactory "%> <% Context ctx; Reply myRtn; String chek; int result=1; TuxedoConnection myTux=null; TuxedoConnectionFactory tcf; Environment env = new Environment(); %> <!-- EXAMPLE CONTENT --> <table summary="EXAMPLES_CONTENT" border=0 cellspacing="18" cellpadding="0"> <tr> <td valign="top"> <h3><p> Starting Invocation to Tuxedo Domain ... <% String TuxString = "Hello World"; TypedString myData = new TypedString(TuxString); try { %> <p> Obtain the Environment InitialContext .... <% ctx = env.getInitialContext(); %> <p> Obtain TuxedoConnectionFactory ... <% tcf = (TuxedoConnectionFactory) ctx.lookup ("tuxedo.services.TuxedoConnection"); %> <p> lookup TuxedoConnectionFactory successful ... <p> Obtain TuxedoConnection ... <% myTux = tcf.getTuxedoConnection(); %> <p> Connection obtained ... <p> Data transmitted is "<i><font color=red><%= myData.toString()%></font></i>" <p> Invoking Tuxedo TOUPPER service... <% myRtn = myTux.tpcall("TOUPPER", myData, 0); %> <p> tpcall SUCCESSFULL ... <p> Get the Reply buffer ... <% myData = (TypedString) myRtn.getReplyBuffer(); %> <p> Reply buffer recieved ... <% if (myData.toString().equals(TuxString.toUpperCase()) ) { result = 0; } else { result = 1; } } catch (TPException tpe) { %> <p> ERROR: TPException "<i><font color=red><%= tpe.toString()%></font></i>" <% result =1; } catch (Exception ex) { %> <p> ERROR: Exception "<i><font color=red><%= ex.toString()%></font></i>" <% result =1; } finally { myTux.tpterm(); if( result == 0) { %> <h3><p>SUCCESS: Data Recieved from Tuxedo TOUPPER is "<i><font color=red><%= myData.toString()%></font></i>"</h3> <% } else { %> <h3><p>FAILURE: Test for Tuxedo "TOUPPER" service through WTC FAILED <% } } %> <p> </td> </tr> </table> <br> <!-- RED LINE --> <table cellspacing="0" cellpadding="0" border="0" width="100%"> <tr> <td width="100%" bgcolor="#ff0000" height="1"> <p class="small"> </p> </td> </tr> </table> <!-- FOOTER --> <table cellspacing="0" cellpadding="0" border="0" width="100%"> <tr> <td align="left"> <p class="copyright">Last updated: November 2003</p> </td> </tr> </table> <table cellspacing="0" cellpadding="0" border="0" width="100%"><!-- RED LINE --> <tr> <td width="100%" bgcolor="#ff0000" height="1"> <p class="small"> </p> </td> </tr> </table> Home | Corporate Info | News | Solutions | Products | Partners | Services | Events | Download | How to Buy <br>Copyright 2003, BEA Systems, Inc. All rights reserved. <br>Required browser: Netscape 4.0 or higher, or Microsoft Internet Explorer 4.0 or higher. Contact BEA </p> </body> </html> |
=> 다음 application을 WLS에 배포한 이후 호출 시 다음과 같이 TOLOWER 서비스가 제대로 적용이 되면 TUXEDO ~ WebLogic이 성공적으로 연동됐다는 의미이다.
'Oracle > Weblogic' 카테고리의 다른 글
WebLogic Cluster 관련 정리 글 (0) | 2022.11.04 |
---|---|
Admin console 접속 시 j_security_check (1) | 2022.10.13 |
WebLogic 점검 간소화 (0) | 2022.09.22 |
WebLogic Multicast cluster debugging (0) | 2022.09.21 |
WebLogic JDBC connection pool 비밀번호 decryption (0) | 2022.09.06 |