云题海 - 专业文章范例文档资料分享平台

当前位置:首页 > 通过wtc使tuxedo与weblogic通信开发

通过wtc使tuxedo与weblogic通信开发

  • 62 次阅读
  • 3 次下载
  • 2025/6/4 21:59:01

关键函数介绍:

Public int selectService ();

连接weblogic server,调用具体的函数调用tuxedo service.

Public int callTestService(String service_name);

根据输入参数学号,调用tuxedo service,获得返回结果学生姓名和年龄.

关键函数代码

函数selectService

import weblogic.wtc.jatmi.Ferror;

import weblogic.wtc.jatmi.TypedFML32;

import weblogic.wtc.jatmi.CallDescriptor;

Public int selectService ()

{

try

{

…连接weblogic server…………

obj = ctx.lookup(ejb的jndiname);

}

catch (Exception e)

{

…………………

}

wtcHome=(WtcInstanceHome)javax.rmi.PortableRemoteObject.narrow(obj, WtcInstanceHome.class);

try

{

wtcRemote = wtcHome.create();

}

catch (Exception e)

{

………….

}

callTestService(service_name);

try

{

wtcRemote.remove();

}

catch (Exception e)

{

………………

}

}

函数callTestService

public String callTestService (String service_name)

{

CallDescriptor tuxRtn = null;

TypedFML32 inParams = null, tuxResult = null;

try

{

//创建fml32缓冲区java描述类的实例

inParams = new TypedFML32(new student_fld());

//填写输入参数:学号

inParams.Fchg(student_fld.student_id , 0, getStudentId());

}

catch (Ferror e)

{

……

}

try

{ //异步调用tuxedo service.

tuxRtn = wtcRemote.Tpacall(service_name, inParams);

}

catch (Exception e)

{

………

}

try

{ //等待异步调用的service返回结果.

tuxResult = wtcRemote.Tpgetrply(tuxRtn);

}

catch (Exception e)

{

………

}

try

{

//得到学生的姓名和年龄…

stuName = (String)tuxResult.Fget(student_fld.student_name, 0);

stuAge = (Integer) tuxResult.Fget(student_fld.student_age, 0);

}

catch (Ferror e)

{

………

}

………

}

搜索更多关于: 通过wtc使tuxedo与weblogic通信开发 的文档
  • 收藏
  • 违规举报
  • 版权认领
下载文档10.00 元 加入VIP免费下载
推荐下载
本文作者:...

共分享92篇相关文档

文档简介:

关键函数介绍: Public int selectService (); 连接weblogic server,调用具体的函数调用tuxedo service. Public int callTestService(String service_name); 根据输入参数学号,调用tuxedo service,获得返回结果学生姓名和年龄. 关键函数代码 函数selectService import weblogic.wtc.jatmi.Ferror; import weblogic.wtc.jatmi.TypedFML32; import weblogic.wtc.jatmi.CallDescriptor; Publi

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:10 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219
Copyright © 云题海 All Rights Reserved. 苏ICP备16052595号-3 网站地图 客服QQ:370150219 邮箱:370150219@qq.com