import weblogic.wtc.gwt.TuxedoConnection;
import weblogic.wtc.gwt.TuxedoConnectionFactory;
import weblogic.wtc.jatmi.Ferror;
import weblogic.wtc.jatmi.CallDescriptor;
import weblogic.wtc.jatmi.ApplicationToMonitorInterface;
private TuxedoConnection tuxConn = null;
函数setUpConnection
public TuxedoConnection setUpConnection() throws TPException
{
Context ctx = null;
TuxedoConnectionFactory tcf = null;
try
{
ctx = new InitialContext();
tcf= (TuxedoConnectionFactory)ctx.lookup(TUXEDOCONN_JNDI_NAME);
}
catch (NamingException ne)
{
throw new TPException(TPException.TPENOENT, \
}
try
{
tuxConn = tcf.getTuxedoConnection();
}
catch (TPException e)
{
throw new TPException(TPException.TPENOENT, \
}
return tuxConn;
}
函数Tpcall
public TypedFML32 Tpcall(String service_name, TypedFML32 in_params) throws TPException, TPReplyException
{
Reply tuxReply = null;
TypedFML32 tuxRtn = null;
try
{
if (tuxConn == null) tuxConn = this.setUpConnection();
}
catch (TPException e)
{
System.out.println(\
throw e;
}
try
{
tuxReply = tuxConn.tpcall(service_name, in_params, 0);
}
catch (TPReplyException tre)
{
System.out.println(\
throw tre;
}
catch (TPException te)
{
System.out.println(\
throw te;
}
catch (Exception ee)
{
System.out.println(\
throw new TPException(TPException.TPESYSTEM, \
}
tuxRtn = (TypedFML32)tuxReply.getReplyBuffer();
return tuxRtn;
}
函数Tpacall
public CallDescriptor Tpacall(String service_name, TypedFML32 in_params) throws TPException, TPReplyException
{
CallDescriptor tuxRtn = null;
相关推荐: