intermax 추가
This commit is contained in:
6
intermax/23.12.07.02/jspd/build-ext/build.bat
Executable file
6
intermax/23.12.07.02/jspd/build-ext/build.bat
Executable file
@@ -0,0 +1,6 @@
|
||||
set JAVA_HOME=
|
||||
set JAVA_VERSION=
|
||||
set ANT_HOME=..\..\ant
|
||||
set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin
|
||||
|
||||
ant -DJAVA_HOME="%JAVA_HOME%" -DJAVA_VERSION="%JAVA_VERSION%" %1
|
||||
7
intermax/23.12.07.02/jspd/build-ext/build.sh
Executable file
7
intermax/23.12.07.02/jspd/build-ext/build.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
export JAVA_HOME=
|
||||
export JAVA_VERSION=
|
||||
export ANT_HOME=../../ant
|
||||
export PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$PATH
|
||||
|
||||
ant -DJAVA_HOME="$JAVA_HOME" -DJAVA_VERSION="$JAVA_VERSION" $1
|
||||
|
||||
16
intermax/23.12.07.02/jspd/build-ext/build.xml
Executable file
16
intermax/23.12.07.02/jspd/build-ext/build.xml
Executable file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="euc-kr"?>
|
||||
<project default="all" basedir=".">
|
||||
<target name="all" depends="jar" />
|
||||
<target name="jar">
|
||||
<delete file="jspd-ext.jar" />
|
||||
<mkdir dir="bin"/>
|
||||
<javac executable="${JAVA_HOME}" target="${JAVA_VERSION}" source="${JAVA_VERSION}" srcdir="src" destdir="bin"
|
||||
includes="com/exem/ext/**"
|
||||
classpath="../lib/jspd-common.jar"
|
||||
debug="on" />
|
||||
<zip destfile="jspd-ext.jar">
|
||||
<fileset dir="bin" />
|
||||
</zip>
|
||||
<delete dir="bin" />
|
||||
</target>
|
||||
</project>
|
||||
5
intermax/23.12.07.02/jspd/build-ext/src/build.bat
Executable file
5
intermax/23.12.07.02/jspd/build-ext/src/build.bat
Executable file
@@ -0,0 +1,5 @@
|
||||
set JAVA_HOME=C:\Program Files (x86)\java\jdk1.6.0_03
|
||||
set ANT_HOME=..\..\ant
|
||||
set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin
|
||||
|
||||
ant %1
|
||||
16
intermax/23.12.07.02/jspd/build-ext/src/build.xml
Executable file
16
intermax/23.12.07.02/jspd/build-ext/src/build.xml
Executable file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="euc-kr"?>
|
||||
<project default="all" basedir=".">
|
||||
<target name="all" depends="jar" />
|
||||
<target name="jar">
|
||||
<delete file="jspd-ext.jar" />
|
||||
<mkdir dir="bin"/>
|
||||
<javac srcdir="src" destdir="bin"
|
||||
includes="com/exem/ext/**,com/exem/qa/**"
|
||||
classpath="../lib/jspd-common.jar"
|
||||
debug="on" />
|
||||
<zip destfile="jspd-ext.jar">
|
||||
<fileset dir="bin" />
|
||||
</zip>
|
||||
<delete dir="bin" />
|
||||
</target>
|
||||
</project>
|
||||
52
intermax/23.12.07.02/jspd/build-ext/src/com/exem/ext/XM_BOUND_HTTP.java
Executable file
52
intermax/23.12.07.02/jspd/build-ext/src/com/exem/ext/XM_BOUND_HTTP.java
Executable file
@@ -0,0 +1,52 @@
|
||||
package com.exem.ext;
|
||||
|
||||
import com.exem.IThread;
|
||||
import com.exem.IXBound;
|
||||
import com.exem.jspd.XmClass;
|
||||
import com.exem.jspd.XmCommon;
|
||||
import com.exem.jspd.state.XmXDesc;
|
||||
import com.exem.jspd.state.XmXInfo;
|
||||
|
||||
public class XM_BOUND_HTTP implements IXBound
|
||||
{
|
||||
public int xCall(int index, IThread thread, XmXInfo info, Object[] obj)
|
||||
{
|
||||
index = thread.regMtdIndex("HTTP", "call");
|
||||
return index;
|
||||
}
|
||||
|
||||
public void xOutbound(IThread thread, XmXInfo info, Object[] obj)
|
||||
{
|
||||
XmCommon.xstart(info);
|
||||
String id = (String) obj[obj.length - 1];
|
||||
XmCommon.x(info, id.getBytes());
|
||||
}
|
||||
|
||||
public void xReply(IThread thread, Object[] obj, XmXDesc desc)
|
||||
{
|
||||
}
|
||||
|
||||
public void xInboundEnter(IThread thread, XmXInfo info, Object[] obj)
|
||||
{
|
||||
if (obj[obj.length - 1] != null)
|
||||
{
|
||||
xInbound(thread, info, obj);
|
||||
}
|
||||
}
|
||||
|
||||
public void xInbound(IThread thread, XmXInfo info, Object[] obj)
|
||||
{
|
||||
|
||||
String id = (String) obj[obj.length - 1];
|
||||
if(id != null)
|
||||
{
|
||||
XmCommon.xstart(info);
|
||||
XmCommon.x(info, id.getBytes());
|
||||
}
|
||||
}
|
||||
|
||||
public void xInboundLeave(IThread thread, XmXInfo info, Object[] obj)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
35
intermax/23.12.07.02/jspd/build-ext/src/com/exem/ext/XM_BOUND_X.java
Executable file
35
intermax/23.12.07.02/jspd/build-ext/src/com/exem/ext/XM_BOUND_X.java
Executable file
@@ -0,0 +1,35 @@
|
||||
package com.exem.ext;
|
||||
|
||||
import com.exem.IThread;
|
||||
import com.exem.IXBound;
|
||||
import com.exem.jspd.state.XmXDesc;
|
||||
import com.exem.jspd.state.XmXInfo;
|
||||
|
||||
public class XM_BOUND_X implements IXBound
|
||||
{
|
||||
public int xCall(int index, IThread thread, XmXInfo info, Object[] obj)
|
||||
{
|
||||
return index;
|
||||
}
|
||||
|
||||
public void xOutbound(IThread thread, XmXInfo info, Object[] obj)
|
||||
{
|
||||
}
|
||||
|
||||
public void xReply(IThread thread, Object[] obj, XmXDesc desc)
|
||||
{
|
||||
}
|
||||
|
||||
public void xInboundEnter(IThread thread, XmXInfo info, Object[] obj)
|
||||
{
|
||||
}
|
||||
|
||||
public void xInbound(IThread thread, XmXInfo info, Object[] obj)
|
||||
{
|
||||
}
|
||||
|
||||
public void xInboundLeave(IThread thread, XmXInfo info, Object[] obj)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
24
intermax/23.12.07.02/jspd/build-ext/src/com/exem/ext/XM_RT.java
Executable file
24
intermax/23.12.07.02/jspd/build-ext/src/com/exem/ext/XM_RT.java
Executable file
@@ -0,0 +1,24 @@
|
||||
package com.exem.ext;
|
||||
|
||||
import com.exem.IThread;
|
||||
import com.exem.IXRt;
|
||||
import com.exem.jspd.state.XmXInfo;
|
||||
|
||||
import java.net.Socket;
|
||||
|
||||
public class XM_RT implements IXRt
|
||||
{
|
||||
public void onSocket(IThread thread, XmXInfo info, int mode, Socket socket)
|
||||
{
|
||||
if(mode == 5)
|
||||
{
|
||||
String remoteAddress = socket.getRemoteSocketAddress() + "";
|
||||
String[] ss = remoteAddress.split("/");
|
||||
info.s00 = ss[1];
|
||||
}
|
||||
}
|
||||
|
||||
public void onFile(IThread thread, XmXInfo info, int mode, String name)
|
||||
{
|
||||
}
|
||||
}
|
||||
46
intermax/23.12.07.02/jspd/build-ext/src/com/exem/ext/XM_TXN.java
Executable file
46
intermax/23.12.07.02/jspd/build-ext/src/com/exem/ext/XM_TXN.java
Executable file
@@ -0,0 +1,46 @@
|
||||
package com.exem.ext;
|
||||
|
||||
import com.exem.IXTxn;
|
||||
import com.exem.IThread;
|
||||
import com.exem.jspd.XmClass;
|
||||
import com.exem.jspd.XmCommon;
|
||||
import com.exem.weave.http.XmHttpRequest;
|
||||
import com.exem.weave.http.XmHttpSession;
|
||||
|
||||
public class XM_TXN implements IXTxn
|
||||
{
|
||||
public String getName(Object svc, XmHttpRequest req)
|
||||
{
|
||||
return req.getRequestURI();
|
||||
}
|
||||
|
||||
public String getName(String txnName, Object[] param)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getName(IThread thread, String txnName, Object[] param)
|
||||
{
|
||||
return txnName;
|
||||
}
|
||||
|
||||
public String getName(XmHttpRequest req, Object obj)
|
||||
{
|
||||
return req.getRequestURI();
|
||||
}
|
||||
|
||||
public String getIpAddr(String txnIp, Object obj)
|
||||
{
|
||||
return txnIp;
|
||||
}
|
||||
|
||||
public String getLoginName(XmHttpRequest req, XmHttpSession session)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public void xHeaderInfo(IThread thread, XmHttpRequest req)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
25
intermax/23.12.07.02/jspd/build-ext/src/com/exem/ext/XM_TXN_CALLBACK.java
Executable file
25
intermax/23.12.07.02/jspd/build-ext/src/com/exem/ext/XM_TXN_CALLBACK.java
Executable file
@@ -0,0 +1,25 @@
|
||||
package com.exem.ext;
|
||||
|
||||
import com.exem.TxnCallbackBase;
|
||||
import com.exem.IThread;
|
||||
|
||||
public class XM_TXN_CALLBACK extends TxnCallbackBase {
|
||||
public boolean isExcludeException(Object err) {
|
||||
return super.isExcludeException(err);
|
||||
}
|
||||
|
||||
public boolean isIncludeException(Object err) {
|
||||
return super.isIncludeException(err);
|
||||
}
|
||||
|
||||
public boolean isExcludeService(String txnName) {
|
||||
return super.isExcludeService(txnName);
|
||||
}
|
||||
|
||||
public void beginTxn(IThread thread, Object[] param) {
|
||||
}
|
||||
|
||||
public void endTxn(IThread thread, Object[] param, Object err) {
|
||||
}
|
||||
|
||||
}
|
||||
52
intermax/23.12.07.02/jspd/build-ext/src/com/exem/sample/XM_BOUND_SAP.java
Executable file
52
intermax/23.12.07.02/jspd/build-ext/src/com/exem/sample/XM_BOUND_SAP.java
Executable file
@@ -0,0 +1,52 @@
|
||||
package com.exem.sample;
|
||||
|
||||
import com.exem.IThread;
|
||||
import com.exem.IXBound;
|
||||
import com.exem.XmUtil;
|
||||
import com.exem.jspd.XmClass;
|
||||
import com.exem.jspd.XmConst;
|
||||
import com.exem.jspd.XmCommon;
|
||||
import com.exem.jspd.state.XmXDesc;
|
||||
import com.exem.jspd.state.XmXInfo;
|
||||
|
||||
public class XM_BOUND_X implements IXBound
|
||||
{
|
||||
public int xCall(int index, IThread thread, XmXInfo info, Object[] obj)
|
||||
{
|
||||
String s = (String)XmClass.getMethod(obj[0], "getName");
|
||||
s = s == null ? "call" : s;
|
||||
index = thread.regMtdIndex("SAP", s);
|
||||
info.s00 = s;
|
||||
return index;
|
||||
}
|
||||
|
||||
public void xOutbound(IThread thread, XmXInfo info, Object[] obj)
|
||||
{
|
||||
//System.out.println("##### SAP xOutbound");
|
||||
byte[] xb = (byte[])obj[1];
|
||||
//XmCommon.print("xOutbound xb:", xb);
|
||||
byte[] conv_id = (byte[])XmClass.getField(obj[0], obj[0].getClass().getSuperclass(), "conv_id", true);
|
||||
XmCommon.xstart(info);
|
||||
XmCommon.x(info, conv_id);
|
||||
XmCommon.x(info, info.s00.getBytes());
|
||||
//XmCommon.print("xOutbound conv_id:", conv_id);
|
||||
//XmCommon.print("xOutbound func:" + info.s00);
|
||||
}
|
||||
|
||||
public void xReply(IThread thread, Object[] obj, XmXDesc desc)
|
||||
{
|
||||
}
|
||||
|
||||
public void xInboundEnter(IThread thread, XmXInfo info, Object[] obj)
|
||||
{
|
||||
}
|
||||
|
||||
public void xInbound(IThread thread, XmXInfo info, Object[] obj)
|
||||
{
|
||||
}
|
||||
|
||||
public void xInboundLeave(IThread thread, XmXInfo info, Object[] obj)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
60
intermax/23.12.07.02/jspd/build-ext/src/com/exem/sample/XM_BOUND_TMAX.java
Executable file
60
intermax/23.12.07.02/jspd/build-ext/src/com/exem/sample/XM_BOUND_TMAX.java
Executable file
@@ -0,0 +1,60 @@
|
||||
package com.exem.sample;
|
||||
|
||||
import com.exem.IThread;
|
||||
import com.exem.IXBound;
|
||||
import com.exem.XmUtil;
|
||||
import com.exem.jspd.XmClass;
|
||||
import com.exem.jspd.XmConst;
|
||||
import com.exem.jspd.XmCommon;
|
||||
import com.exem.jspd.state.XmXDesc;
|
||||
import com.exem.jspd.state.XmXInfo;
|
||||
|
||||
public class XM_BOUND_X implements IXBound
|
||||
{
|
||||
|
||||
public int xCall(int index, IThread thread, XmXInfo info, Object[] obj)
|
||||
{
|
||||
String id = XmUtil.getParamStr(obj, "call");
|
||||
index = thread.regMtdIndex("TP", id);
|
||||
info.s00 = id;
|
||||
return index;
|
||||
}
|
||||
|
||||
public void xOutbound(IThread thread, XmXInfo info, Object[] obj)
|
||||
{
|
||||
//System.out.println("##### tmax xOutbound");
|
||||
|
||||
byte[] xb = (byte[])obj[2];
|
||||
//System.out.println("xOutbound xb:" + new String(xb));
|
||||
XmCommon.xstart(info);
|
||||
info.x40 = new byte[32];
|
||||
System.arraycopy(xb, 124, info.x40, 0, 32);
|
||||
XmCommon.x(info, info.x40);
|
||||
XmCommon.x(info, info.s00.getBytes());
|
||||
|
||||
//thread.udp().xHeaderInfo(thread.tid(), "P", (byte)6, xb, 124, 32);
|
||||
//info.x41 = new byte[10];
|
||||
//long l = System.currentTimeMillis();
|
||||
//String os = OS[((int)(l % 6L))];
|
||||
//String bank = BANK[((int)(l % 3L))];
|
||||
//System.arraycopy(os.getBytes(), 0, info.x41, 0, 2);
|
||||
//System.arraycopy(bank.getBytes(), 0, info.x41, 2, 3);
|
||||
}
|
||||
|
||||
public void xReply(IThread thread, Object[] obj, XmXDesc desc)
|
||||
{
|
||||
}
|
||||
|
||||
public void xInboundEnter(IThread thread, XmXInfo info, Object[] obj)
|
||||
{
|
||||
}
|
||||
|
||||
public void xInbound(IThread thread, XmXInfo info, Object[] obj)
|
||||
{
|
||||
}
|
||||
|
||||
public void xInboundLeave(IThread thread, XmXInfo info, Object[] obj)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
53
intermax/23.12.07.02/jspd/build-ext/src/com/exem/sample/XM_BOUND_TUXEDO.java
Executable file
53
intermax/23.12.07.02/jspd/build-ext/src/com/exem/sample/XM_BOUND_TUXEDO.java
Executable file
@@ -0,0 +1,53 @@
|
||||
package com.exem.sample;
|
||||
|
||||
import com.exem.IThread;
|
||||
import com.exem.IXBound;
|
||||
import com.exem.XmUtil;
|
||||
import com.exem.jspd.XmClass;
|
||||
import com.exem.jspd.XmConst;
|
||||
import com.exem.jspd.XmCommon;
|
||||
import com.exem.jspd.state.XmXDesc;
|
||||
import com.exem.jspd.state.XmXInfo;
|
||||
|
||||
public class XM_BOUND_X implements IXBound
|
||||
{
|
||||
|
||||
public int xCall(int index, IThread thread, XmXInfo info, Object[] obj)
|
||||
{
|
||||
String id = XmUtil.getParamStr(obj, "call");
|
||||
index = thread.regMtdIndex("TP", id);
|
||||
info.s00 = id;
|
||||
return index;
|
||||
}
|
||||
|
||||
public void xOutbound(IThread thread, XmXInfo info, Object[] obj)
|
||||
{
|
||||
//System.out.println("##### tuxedo xOutbound");
|
||||
|
||||
byte[] xb = (byte[])obj[1];
|
||||
//System.out.println("xOutbound xb:" + new String(xb));
|
||||
|
||||
XmCommon.xstart(info);
|
||||
info.x40 = new byte[8];
|
||||
System.arraycopy(xb, 20, info.x40, 0, 8);
|
||||
XmCommon.x(info, info.x40);
|
||||
XmCommon.x(info, info.s00.getBytes());
|
||||
}
|
||||
|
||||
public void xReply(IThread thread, Object[] obj, XmXDesc desc)
|
||||
{
|
||||
}
|
||||
|
||||
public void xInboundEnter(IThread thread, XmXInfo info, Object[] obj)
|
||||
{
|
||||
}
|
||||
|
||||
public void xInbound(IThread thread, XmXInfo info, Object[] obj)
|
||||
{
|
||||
}
|
||||
|
||||
public void xInboundLeave(IThread thread, XmXInfo info, Object[] obj)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.exem.sample;
|
||||
|
||||
import com.exem.IThread;
|
||||
import com.exem.IXBound;
|
||||
import com.exem.XmUtil;
|
||||
import com.exem.jspd.XmClass;
|
||||
import com.exem.jspd.XmConst;
|
||||
import com.exem.jspd.XmCommon;
|
||||
import com.exem.jspd.state.XmXDesc;
|
||||
import com.exem.jspd.state.XmXInfo;
|
||||
|
||||
public class XM_BOUND_X implements IXBound
|
||||
{
|
||||
public int xCall(int index, IThread thread, XmXInfo info, Object[] obj)
|
||||
{
|
||||
String s = thread.txn().getTxnName();
|
||||
if (s.indexOf("/a") > -1)
|
||||
{
|
||||
info.s00 = "async" + s.substring(2);
|
||||
}
|
||||
else if (s.indexOf("/s") > -1)
|
||||
{
|
||||
info.s00 = s.substring(2);
|
||||
}
|
||||
return index;
|
||||
}
|
||||
|
||||
public void xOutbound(IThread thread, XmXInfo info, Object[] obj)
|
||||
{
|
||||
byte[] b = (byte[])obj[1];
|
||||
String s1 = new String( b, 277, 43);
|
||||
XmCommon.xstart(info);
|
||||
XmCommon.x(info, b, 12, 32);
|
||||
if (s1.indexOf("Ext") > -1)
|
||||
thread.udp().xHeaderInfo(thread.tid(), "fep_uid", XmConst.E_HEADER, s1);
|
||||
}
|
||||
|
||||
public void xReply(IThread thread, Object[] obj, XmXDesc desc)
|
||||
{
|
||||
}
|
||||
|
||||
public void xInboundEnter(IThread thread, XmXInfo info, Object[] obj)
|
||||
{
|
||||
}
|
||||
|
||||
public void xInbound(IThread thread, XmXInfo info, Object[] obj)
|
||||
{
|
||||
}
|
||||
|
||||
public void xInboundLeave(IThread thread, XmXInfo info, Object[] obj)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.exem.sample;
|
||||
|
||||
import com.exem.IThread;
|
||||
import com.exem.IXBound;
|
||||
import com.exem.XmUtil;
|
||||
import com.exem.jspd.XmClass;
|
||||
import com.exem.jspd.XmConst;
|
||||
import com.exem.jspd.XmCommon;
|
||||
import com.exem.jspd.state.XmXDesc;
|
||||
import com.exem.jspd.state.XmXInfo;
|
||||
|
||||
public class XM_BOUND_X implements IXBound
|
||||
{
|
||||
public int xCall(int index, IThread thread, XmXInfo info, Object[] obj)
|
||||
{
|
||||
return index;
|
||||
}
|
||||
|
||||
public void xOutbound(IThread thread, XmXInfo info, Object[] obj)
|
||||
{
|
||||
}
|
||||
|
||||
public void xReply(IThread thread, Object[] obj, XmXDesc desc)
|
||||
{
|
||||
}
|
||||
|
||||
public void xInboundEnter(IThread thread, XmXInfo info, Object[] obj)
|
||||
{
|
||||
Object o1 = XmClass.getMethod(obj[3], "getFieldValue","HFD_Standard_System_Header");
|
||||
String s = (String)XmClass.getMethod(o1, "getFieldValue", "rcvSrvcCd");
|
||||
thread.txn().setTxnName(s);
|
||||
String s1 = (String)XmClass.getMethod(o1, "getFieldValue", "tlgrWrtnDt");
|
||||
s1 += (String)XmClass.getMethod(o1, "getFieldValue", "tlgrCrtnSysNm");
|
||||
s1 += (String)XmClass.getMethod(o1, "getFieldValue", "tlgrSrlNo");
|
||||
s1 += (String)XmClass.getMethod(o1, "getFieldValue", "tlgrPrgrsNo");
|
||||
String s2 = (String)XmClass.getMethod(o1, "getFieldValue", "orgnlTx");
|
||||
String s3 = s2.substring(0,30);
|
||||
String s4 = (String)XmClass.getMethod(o1, "getFieldValue","custId");
|
||||
byte[] b = s3.getBytes();
|
||||
XmCommon.xstart(info);
|
||||
XmCommon.x(info, b);
|
||||
thread.udp().xHeaderInfo(thread.tid(),"orgguid",XmConst.E_HEADER, s2);
|
||||
thread.udp().xHeaderInfo(thread.tid(),"guid",XmConst.E_HEADER, s1);
|
||||
thread.txn().setLoginName(s4);
|
||||
}
|
||||
|
||||
public void xInbound(IThread thread, XmXInfo info, Object[] obj)
|
||||
{
|
||||
}
|
||||
|
||||
public void xInboundLeave(IThread thread, XmXInfo info, Object[] obj)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package com.exem.sample;
|
||||
|
||||
import com.exem.IThread;
|
||||
import com.exem.IXBound;
|
||||
import com.exem.XmUtil;
|
||||
import com.exem.jspd.XmClass;
|
||||
import com.exem.jspd.XmConst;
|
||||
import com.exem.jspd.XmCommon;
|
||||
import com.exem.jspd.state.XmXDesc;
|
||||
import com.exem.jspd.state.XmXInfo;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
public class XM_BOUND_X implements IXBound
|
||||
{
|
||||
private final static SimpleDateFormat sdf = new SimpleDateFormat("yyyy");
|
||||
|
||||
public int xCall(int index, IThread thread, XmXInfo info, Object[] obj)
|
||||
{
|
||||
index = thread.regMtdIndex("SVC", "call");
|
||||
return index;
|
||||
}
|
||||
|
||||
public void xOutbound(IThread thread, XmXInfo info, Object[] obj)
|
||||
{
|
||||
byte[] b = (byte[])obj[1];
|
||||
String year = sdf.format(new Date());
|
||||
boolean b1 = XmUtil.compBytes(b, 4, year.getBytes());
|
||||
String s1 = new String((byte[])obj[1], 157, 1);
|
||||
String s2 = obj[0].getClass().getName();
|
||||
if (s2.indexOf("DefaultTransportEntity") > -1)
|
||||
{
|
||||
boolean b3 = XmUtil.compBytes(b, 12, year.getBytes());
|
||||
if (b3)
|
||||
{
|
||||
XmCommon.xstart(info);
|
||||
XmCommon.x(info, b, 12, 30);
|
||||
}
|
||||
}
|
||||
else if (b1 && s1.equals("S"))
|
||||
{
|
||||
XmCommon.xstart(info);
|
||||
XmCommon.x(info, b, 4, 30);
|
||||
long l = info.x20;
|
||||
info.x20 = l - 1;
|
||||
try
|
||||
{
|
||||
thread.udp().xInfo(thread.tid(), thread.txn(), 'C', 1, 1, info, null);
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
XmCommon.print("Outbound Create C", t);
|
||||
}
|
||||
info.x20 = l;
|
||||
}
|
||||
}
|
||||
|
||||
public void xReply(IThread thread, Object[] obj, XmXDesc desc)
|
||||
{
|
||||
}
|
||||
|
||||
public void xInboundEnter(IThread thread, XmXInfo info, Object[] obj)
|
||||
{
|
||||
}
|
||||
|
||||
public void xInbound(IThread thread, XmXInfo info, Object[] obj)
|
||||
{
|
||||
byte[] b = (byte[])obj[1];
|
||||
String year = sdf.format(new Date());
|
||||
boolean b1 = XmUtil.compBytes(b, 12, year.getBytes());
|
||||
String s1 = new String((byte[])obj[1], 165, 1);
|
||||
String s2 = obj[0].getClass().getName();
|
||||
if (s2.indexOf("DefaultTransportEntity") > -1)
|
||||
{
|
||||
if (b1)
|
||||
{
|
||||
XmCommon.xstart(info);
|
||||
XmCommon.x(info, b, 12, 30);
|
||||
}
|
||||
}
|
||||
else if (b1 && s1.equals("S"))
|
||||
{
|
||||
XmCommon.xstart(info);
|
||||
XmCommon.x(info, b, 12, 30);
|
||||
long l = info.x20;
|
||||
info.x20 = l + 1;
|
||||
try
|
||||
{
|
||||
thread.udp().xInfo(thread.tid(), thread.txn(), 'P', 1, 1, info, null);
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
XmCommon.print("Inbound Create P", t);
|
||||
}
|
||||
info.x20 = l;
|
||||
}
|
||||
}
|
||||
|
||||
public void xInboundLeave(IThread thread, XmXInfo info, Object[] obj)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.exem.ext;
|
||||
|
||||
import com.exem.IXTxn;
|
||||
import com.exem.IThread;
|
||||
import com.exem.jspd.XmClass;
|
||||
import com.exem.jspd.XmConst;
|
||||
import com.exem.jspd.XmCommon;
|
||||
import com.exem.weave.http.XmHttpRequest;
|
||||
import com.exem.weave.http.XmHttpSession;
|
||||
|
||||
public class XM_TXN implements IXTxn
|
||||
{
|
||||
public String getName(Object svc, XmHttpRequest req)
|
||||
{
|
||||
return req.getRequestURI();
|
||||
}
|
||||
|
||||
public String getName(String txnName, Object[] param)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getName(IThread thread, String txnName, Object[] param)
|
||||
{
|
||||
return txnName;
|
||||
}
|
||||
|
||||
public String getName(XmHttpRequest req, Object obj)
|
||||
{
|
||||
byte[] b = (byte[])obj;
|
||||
String s= new String(b, 277, 43);
|
||||
IThread thread = com.exem.jspd.agent.XmMain.current();
|
||||
|
||||
if (s.indexOf("Ext") > -1)
|
||||
{
|
||||
thread.udp().xHeaderInfo(thread.tid(), "fep_uid", XmConst.E_HEADER, s);
|
||||
}
|
||||
if (b[500] == 0x30 && b[501] == 0x30);
|
||||
else
|
||||
{
|
||||
String s1 = new String(b, 122, 13);
|
||||
String s2 = "|";
|
||||
s1 += s2;
|
||||
s1 += new String(b, 12, 32);
|
||||
s1 += s2;
|
||||
s1 += new String(b, 321, 20);
|
||||
s1 += s2;
|
||||
s1 += new String(b, 507, 10);
|
||||
s1 += s2;
|
||||
s1 += new String(b, 517, 200);
|
||||
thread.udp().xHeaderInfo(thread.tid(), "retmsg", XmConst.E_HEADER, s1);
|
||||
}
|
||||
return req.getRequestURI();
|
||||
}
|
||||
|
||||
public String getIpAddr(String txnIp, Object obj)
|
||||
{
|
||||
return txnIp;
|
||||
}
|
||||
|
||||
public String getLoginName(XmHttpRequest req, XmHttpSession session)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public void xHeaderInfo(IThread thread, XmHttpRequest req)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
package com.exem.ext;
|
||||
|
||||
import com.exem.IXTxn;
|
||||
import com.exem.IThread;
|
||||
import com.exem.jspd.XmClass;
|
||||
import com.exem.jspd.XmConst;
|
||||
import com.exem.jspd.XmCommon;
|
||||
import com.exem.weave.http.XmHttpRequest;
|
||||
import com.exem.weave.http.XmHttpSession;
|
||||
|
||||
public class XM_TXN implements IXTxn
|
||||
{
|
||||
public String getName(Object svc, XmHttpRequest req)
|
||||
{
|
||||
return req.getRequestURI();
|
||||
}
|
||||
|
||||
public String getName(String txnName, Object[] param)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getName(IThread thread, String txnName, Object[] param)
|
||||
{
|
||||
return txnName;
|
||||
}
|
||||
|
||||
public String getName(XmHttpRequest req, Object obj)
|
||||
{
|
||||
Object o1 = XmClass.getField(obj, "header");
|
||||
String s1 = (String)XmClass.getMethod(o1, "getScrnId");
|
||||
String s2 = (String)XmClass.getMethod(o1, "getSrvcCd");
|
||||
String s3 = (String)XmClass.getMethod(o1, "getOrgGuid");
|
||||
String s4 = (String)XmClass.getMethod(o1, "getGuid");
|
||||
String s5 = (String)XmClass.getMethod(o1, "getCustId");
|
||||
IThread thread = com.exem.jspd.agent.XmMain.current();
|
||||
thread.udp().xHeaderInfo(thread.tid(), "orgguid", XmConst.E_HEADER, s3);
|
||||
thread.udp().xHeaderInfo(thread.tid(), "guid", XmConst.E_HEADER, s4);
|
||||
thread.udp().xHeaderInfo(thread.tid(), "custid", XmConst.E_HEADER, s5);
|
||||
thread.txn().setLoginName(s5);
|
||||
if (s1 == null)
|
||||
return "+" + s2;
|
||||
else
|
||||
return s1 + "+" + s2;
|
||||
}
|
||||
|
||||
public String getIpAddr(String txnIp, Object obj)
|
||||
{
|
||||
return txnIp;
|
||||
}
|
||||
|
||||
public String getLoginName(XmHttpRequest req, XmHttpSession session)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public void xHeaderInfo(IThread thread, XmHttpRequest req)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
54
intermax/23.12.07.02/jspd/build-ext/src/com/exem/sample/XM_TXN.java.kepco
Executable file
54
intermax/23.12.07.02/jspd/build-ext/src/com/exem/sample/XM_TXN.java.kepco
Executable file
@@ -0,0 +1,54 @@
|
||||
package com.exem.kepco;
|
||||
|
||||
import com.exem.IXTxn;
|
||||
import com.exem.IThread;
|
||||
import com.exem.jspd.XmClass;
|
||||
import com.exem.jspd.XmCommon;
|
||||
import com.exem.weave.http.XmHttpRequest;
|
||||
import com.exem.weave.http.XmHttpSession;
|
||||
|
||||
public class XM_TXN implements IXTxn
|
||||
{
|
||||
public String getName(Object svc, XmHttpRequest req)
|
||||
{
|
||||
return req.getRequestURI();
|
||||
}
|
||||
|
||||
public String getName(String txnName, Object[] param)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getName(IThread thread, String txnName, Object[] param)
|
||||
{
|
||||
XmCommon.print("11111");
|
||||
String s = txnName;
|
||||
Object o1 = param[1];
|
||||
txnName = (String)o1 + "+" + s;
|
||||
XmCommon.print("txnName:" + txnName);
|
||||
String txnIp = "127.127.127.1";
|
||||
thread.txn().setTxnIp(txnIp);
|
||||
XmCommon.print("Ip:" + txnIp);
|
||||
return txnName;
|
||||
}
|
||||
|
||||
public String getName(XmHttpRequest req, Object obj)
|
||||
{
|
||||
return req.getRequestURI();
|
||||
}
|
||||
|
||||
public String getIpAddr(String txnIp, Object obj)
|
||||
{
|
||||
return txnIp;
|
||||
}
|
||||
|
||||
public String getLoginName(XmHttpRequest req, XmHttpSession session)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public void xHeaderInfo(IThread thread, XmHttpRequest req)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
202
intermax/23.12.07.02/jspd/build-ext/src/com/exem/sample/XM_TXN_EXT.java
Executable file
202
intermax/23.12.07.02/jspd/build-ext/src/com/exem/sample/XM_TXN_EXT.java
Executable file
@@ -0,0 +1,202 @@
|
||||
package com.exem.sample;
|
||||
|
||||
import com.exem.IXTxn;
|
||||
import com.exem.XmUtil;
|
||||
import com.exem.IThread;
|
||||
import com.exem.IUdpThread;
|
||||
import com.exem.IXTxn;
|
||||
import com.exem.jspd.XmClass;
|
||||
import com.exem.jspd.XmCommon;
|
||||
import com.exem.weave.http.XmHttpRequest;
|
||||
import com.exem.weave.http.XmHttpSession;
|
||||
|
||||
public class XM_TXN_EXT implements IXTxn
|
||||
{
|
||||
private static final byte TRX_PARAMETER = 1;
|
||||
private static final byte TRX_PARAM_NOURI = 2;
|
||||
private static final byte TRX_ATTRIBUTRE = 3;
|
||||
|
||||
private static final byte APP_ATTRIBUTRE = 1;
|
||||
private static final byte APP_COOKIE = 2;
|
||||
|
||||
public String getName(Object svc, XmHttpRequest req)
|
||||
{
|
||||
if (XmCommon.TRX_NAME_KEY.length == 0)
|
||||
return req.getRequestURI();
|
||||
|
||||
String name = null;
|
||||
switch (XmCommon.TRX_NAME_TYPE)
|
||||
{
|
||||
case TRX_PARAMETER:
|
||||
case TRX_PARAM_NOURI:
|
||||
String param = null;
|
||||
for (int i = 0; i < XmCommon.TRX_NAME_KEY.length; i++)
|
||||
{
|
||||
String key = XmCommon.TRX_NAME_KEY[i];
|
||||
String value = req.getParameter(key);
|
||||
if (value != null)
|
||||
{
|
||||
if (param == null)
|
||||
param = key + "=" + value;
|
||||
else
|
||||
param = param + "&" + key + "=" + value;
|
||||
}
|
||||
}
|
||||
if (param != null)
|
||||
{
|
||||
if (XmCommon.TRX_NAME_TYPE == TRX_PARAM_NOURI)
|
||||
name = param;
|
||||
else
|
||||
name = req.getRequestURI() + "?" + param;
|
||||
}
|
||||
break;
|
||||
case TRX_ATTRIBUTRE:
|
||||
name = (String) req.getAttribute(XmCommon.TRX_NAME_KEY[0]);
|
||||
break;
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getName(XmHttpRequest req, Object obj)
|
||||
{
|
||||
return req.getRequestURI();
|
||||
}
|
||||
|
||||
public String getName(String txnName, Object[] obj)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getName(IThread thread, String txnName, Object[] obj)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getIpAddr(String ip, Object obj)
|
||||
{
|
||||
return ip;
|
||||
}
|
||||
|
||||
public String getLoginName(XmHttpRequest req, XmHttpSession session)
|
||||
{
|
||||
String name = null;
|
||||
switch (XmCommon.TRX_LOGIN_TYPE)
|
||||
{
|
||||
case APP_ATTRIBUTRE:
|
||||
Object o1 = session.getAttribute(XmCommon.TRX_LOGIN_KEY);
|
||||
if (o1 instanceof java.lang.String)
|
||||
name = (String) o1;
|
||||
break;
|
||||
case APP_COOKIE:
|
||||
name = XmCommon.Cookie_getValue(req, XmCommon.TRX_LOGIN_KEY);
|
||||
break;
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
/* getName **************************************************** */
|
||||
public String getServletName(Object svc, XmHttpRequest req)
|
||||
{
|
||||
Object o1;
|
||||
if ((o1 = XmClass.getMethod(svc, "getServletName")) != null)
|
||||
return (String) o1;
|
||||
else if ((o1 = XmClass.getMethod(svc, "getServletConfig")) != null)
|
||||
{
|
||||
Object o2;
|
||||
if ((o2 = XmClass.getMethod(svc, "getServletName")) != null)
|
||||
return (String) o2;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getLastUri(Object svc, XmHttpRequest req)
|
||||
{
|
||||
String name = req.getRequestURI();
|
||||
if (name.indexOf(XmCommon.TRX_NAME_KEY[0]) > -1)
|
||||
{
|
||||
int i = name.lastIndexOf('/');
|
||||
if (i > -1)
|
||||
return name.substring(i + 1);
|
||||
else
|
||||
return name;
|
||||
}
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getXFrame(String value)
|
||||
{
|
||||
try
|
||||
{
|
||||
String s = value.substring(12);
|
||||
String src = new String(new sun.misc.BASE64Decoder().decodeBuffer(s));
|
||||
|
||||
int ix = 0;
|
||||
String item[] = new String[6];
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
ix++;
|
||||
int len = XmUtil.byteArrayToInt(src.substring(ix, ix + 4).getBytes());
|
||||
ix = ix + 4 + len;
|
||||
|
||||
len = XmUtil.byteArrayToInt(src.substring(ix, ix + 4).getBytes());
|
||||
item[i] = src.substring(ix + 4, ix + 4 + len);
|
||||
ix = ix + 4 + len;
|
||||
}
|
||||
return item[0] + "/" + item[1];
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/* getName **************************************************** */
|
||||
public String getProFrameV1(XmHttpRequest req, Object obj)
|
||||
{
|
||||
return (String) XmClass.getMethod(obj, "getPfmTxCode");
|
||||
}
|
||||
|
||||
public String getProFrameV2(XmHttpRequest req, Object obj)
|
||||
{
|
||||
String name = req.getRequestURI();
|
||||
name = name + "+" + XmClass.getMethod(obj, "getPfmFnCd") + "+" + XmClass.getMethod(obj, "getPfmTxCode");
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getProFrameV3(XmHttpRequest req, Object obj)
|
||||
{
|
||||
return XmClass.getMethod(obj, "getPfmAppName") + "+" + XmClass.getMethod(obj, "getPfmSvcName") + "+" + XmClass.getMethod(obj, "getPfmFnName");
|
||||
}
|
||||
|
||||
public String getNICSV1(XmHttpRequest req, Object obj)
|
||||
{
|
||||
return (String) obj;
|
||||
}
|
||||
|
||||
public String getTITV1(XmHttpRequest req, Object obj)
|
||||
{
|
||||
int count = ((Integer) XmClass.getMethod(obj, "getRowCount")).intValue();
|
||||
String[] values = new String[count];
|
||||
Class[] acls = new Class[] { Integer.TYPE, String.class };
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
Object[] aobj = new Object[] { new Integer(i), "SQL_ID" };
|
||||
values[i] = (String) XmClass.getMethod(obj, "getColumnAsString", acls, aobj);
|
||||
}
|
||||
return XmUtil.toString(values, ",");
|
||||
}
|
||||
|
||||
/* getIpAddr ************************************************** */
|
||||
public String getPfmClntIp(Object obj, String ip)
|
||||
{
|
||||
return (String) XmClass.getMethod(obj, "getPfmClntIp");
|
||||
}
|
||||
|
||||
/* getLoginName *********************************************** */
|
||||
public void xHeaderInfo(IThread thread, XmHttpRequest req);
|
||||
{
|
||||
String query = req.getQueryString();
|
||||
String url = req.getRequestURL() + (query == null ? "" : new StringBuilder().append("?").append(query).toString());
|
||||
thread.udp().xHeaderInfo(thread.tid(), "qa.url", (byte)1, url);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user