Restart or Refresh Jaguar from JSP(this howto is deprecated)Tag(s): DEPRECATED


Thanks to A. Maddox
<%-- JSP Page Directives --%>
<%@ page import="java.util.*" %>
<%@ page import="com.sybase.jaguar.system.Management" %>
<%@ page import="com.sybase.jaguar.system.ManagementHelper" %>
<%@ page import="com.sybase.jaguar.system.ManagementHolder" %>
<%@ page import="com.sybase.jaguar.system.ManagementOperations" %>
<%
 String result = new String();
 //Do CORBA lookup
 Properties props = new Properties();
 props.put("org.omg.CORBA.ORBClass", "com.sybase.CORBA.ORB");
 org.omg.CORBA.ORB orb = com.sybase.CORBA.ORB.init
     ((java.lang.String[]) null, props);
 Management iJagComponent =
   ManagementHelper.narrow
      (orb.string_to_object("Jaguar/Management"));
 try{
   iJagComponent.restart();
   // for a refresh
   //   iJagComponent.refresh("Server", "Jaguar");
   // for a refresh of a particuliar WebApp
   //   iJagComponent.refresh("WebApplication", "MyWebApp");

   }
 catch(Exception e) {}
%>

blog comments powered by Disqus