User Guide

Table Of Contents
134 Chapter 7: Using Flash Remoting for Java
}
public String getServletInfo()
{
return "A test servlet.";
}
public ServletConfig getServletConfig()
{
return null;
}
public void destroy()
{
message = null;
}
}
To handle the function results in ActionScript, you use a result handler function like this one:
function MyServlet_Result (result:mx.rpc.ResultEvent):Void
{
ResultBox.text = result.result;
}
For more information, see “Handling function results in ActionScript” on page 137.
Calling JMX MBeans from Flash (JRun only)
You can call Macromedia JRun application functionality through JMX using Flash Remoting.
You connect to a JMX MBean object using the MBean object name in the ActionScript
Service() constructor. Service functions are methods defined in the MBeans manageable
interface. The following sections describe how to get a reference to a JMX MBean object and call
its methods.
To grant clients access to JMX MBeans, you must provide permissions that specify the exposed
MBean object names in the jrun_root/lib/jrun.policy file. For example, the following line of text,
which is currently uncommented in the jrun.policy file, exposes
DeployerService for the JRun
Flash samples:
permission jrun.security.JMXPermission
"accessMBean.DefaultDomain:service=DeployerService";
You can also use wildcards to grant access to JMX MBeans. For example, to grant access to all
MBeans under the default domain using a wildcard, you would uncomment the following line in
the jrun.policy file:
// permission jrun.security.JMXPermission "accessMBean.DefaultDomain:*";