Ping a connection cache(this howto is deprecated)Tag(s): DEPRECATED
About cookies on this site
We use cookies to collect and analyze information on site performance and usage,
to provide social media features and to enhance and customize content and advertisements.
Got it
<%@ page import="java.util.*" %>
<%@ page import="com.sybase.jaguar.jcm.*" %>
<html><body><h1>Ping </h1>
<%
JCMCache cache = null;
org.omg.CORBA.IntHolder retval = new org.omg.CORBA.IntHolder();
org.omg.CORBA.StringHolder outmsg = new org.omg.CORBA.StringHolder();
try {
cache = JCM.getCacheByName("EASDemo_JdbcOdbc");
out.println("Ok");
Properties props = new Properties();
props.put("org.omg.CORBA.ORBClass","com.sybase.CORBA.ORB");
org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init
((String[])null,props);
// you may need to generated stub
Jaguar1.JCMPing ping =
Jaguar1.JCMPingHelper.narrow(orb.string_to_object
("Jaguar1/JCMPing"));
ping.ping(cache.getUserName(), cache.getPassword(),
cache.getRemoteServerName(), retval, outmsg);
out.print( outmsg.value );
}
catch (Exception e) {
out.println("Not Ok<br>" + e.getMessage());
}
%></body></html>
comment Comments ( )