119
CHAPTER 7
Using Flash Remoting for Java
This chapter describes how to use Macromedia Flash Remoting for Flash MX 2004
ActionScript 2.0 with services running in Java application servers.
You can use Flash Remoting from ActionScript in a Flash application to call public methods on
Java objects running in Java application servers. Flash Remoting supports the following types of
Java objects:
•
JavaBeans (stateful)
•
Java classes (stateless)
•
Enterprise JavaBeans (stateless session, stateful session, and entity beans)
•
Java servlets and Java Server Pages (JSPs)
•
Java Management Extensions (JMX) MBeans; available in Macromedia JRun 4 only
Macromedia JRun 4 also lets you call functions on server-side ActionScript, which can in turn call
methods on server-side Java objects.
This chapter has the following sections:
•
“About Flash Remoting for Java” on page 120
•
“Calling Java classes or JavaBeans from ActionScript” on page 121
•
“Calling Enterprise JavaBeans (EJBs) from Flash” on page 128
•
“Calling servlets and JSPs from Flash” on page 132
•
“Calling JMX MBeans from Flash (JRun only)” on page 134
•
“Calling server-side ActionScript from Flash (JRun only)” on page 135
•
“Handling function results in ActionScript” on page 137
•
“Using Flash Remoting with JRun security” on page 139
•
“Passing XML objects between Flash and Java” on page 140
•
“Viewing Flash Remoting log entries” on page 141