Ping a connection cache(this howto is deprecated)Tag(s): DEPRECATED


<%@ 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>

blog comments powered by Disqus