1. Overview

WTC 설정 가이드



2. Descriptions

2.1 테스트 환경

  • Tuxedo
    • Address : 172.16.0.145:20001
    • Local Access Point ID : TDOM
  • WebLogic
    • Address : 192.168.56.2:8001
    • Local Access Point ID : WDOM02

Tuxedo 입장에서, WDOM02는 Remote Access Point ID 다.

2.2 웹로직 설정

  1. 콘솔 > 상호 운용성 > WTC 서버 > 새로 만들기 > WTC Server-0

WTC-Configration_1


  1. 새로 만든 WTC Server-0 대상 M1 설정

WTC-Configration_2


  1. WTC Server-0 > 로컬 AP

WTC-Configration_3

netstat -an | grep 8011으로 할당되지 않은 포트 검증하고 진행


  1. WTC Server-0 > 원격 AP

WTC-Configration_4


  1. WTC Server-0 > Import

WTC-Configration_5


Tuxedo 에서 WebLogic 쪽 서비스 호출할 때 이름이다.


2.3 턱시도 서비스 호출

  1. 웹로직 기동 시 8001, 8011 port 확인된다.

WTC-Configration_6


  1. 웹로직 Log에서 TDOM 연결 되었음이 확인된다.

WTC-Configration_7


  1. 아래 JSP를 호출 시 TOUPPER 서비스는 잘 호출되나, 정의되지 않은 tpcall("LTOUPPER") 호출하면 에러 발생한다.

WTC-Configration_8


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>WTC test jsp</title>
</head>
<body>
<%@ page import="java.util.*, java.text.SimpleDateFormat, , javax.naming.* , weblogic.wtc.gwt.*, weblogic.wtc.jatmi.*"%>

<%!
java.util.Date utilDate = new java.util.Date();

public void log(String text){
	System.out.println(utilDate.toString() + " : " + text);
}


public String Toupper(String toConvert)
		   throws TPException, TPReplyException
		{
		     Context ctx;
		     TuxedoConnectionFactory tcf;
		     TuxedoConnection myTux;
		     TypedString myData;
		     Reply myRtn;
		     int status;

		     log("toupper called, converting " + toConvert);

		     try {
		          ctx = new InitialContext();
		          tcf = (TuxedoConnectionFactory) ctx.lookup("tuxedo.services.TuxedoConnection");
		     }
		     catch (NamingException ne) {
		          // Could not get the tuxedo object, throw TPENOENT
		           throw new TPException(TPException.TPENOENT, "Could not get TuxedoConnectionFactory : " + ne);
		     }

		     myTux = tcf.getTuxedoConnection();

		     myData = new TypedString(toConvert);

		     log("About to call tpcall");
		     try {
		          myRtn = myTux.tpcall("TOUPPER", myData, 0);
		}
		     catch (TPReplyException tre) {
		          log("tpcall threw TPReplyExcption " + tre);
		          throw tre;
		     }
		     catch (TPException te) {
		          log("tpcall threw TPException " + te);
		          throw te;
		     }
		     catch (Exception ee) {
		          log("tpcall threw exception: " + ee);
		          throw new TPException(TPException.TPESYSTEM, "Exception: " + ee);
		     }
		     log("tpcall successfull!");

		     myData = (TypedString) myRtn.getReplyBuffer();

		     myTux.tpterm();// Closing the association with Tuxedo

		     return (myData.toString());
		}


%>

<form name="testform" action="/test/testWTC.jsp" method="post">
  Input Text to convert : <input type="text" size="30" name="aaa" value="lower_case_character">
    <input type="submit" name="submitButton" value="submit">
</form>


<%
	
	if ( request.getParameter("aaa") != null) {
		String toConvert = request.getParameter("aaa");
		out.print("Converted text : " + Toupper(toConvert));
	}
%>

	


</body>
</html>