Calling Java Classes Or Javabeans From Actionscript; Making A Java Class Or Javabean Available To Flash Remoting - MACROMEDIA FLASH REMOTING MX-USING FLASH REMOTING FOR FLASH MX 2004 ACTIONSCRIPT 2.0 Use Manual

Using flash remoting for flash mx 2004 actionscript 2.0
Table of Contents

Advertisement

You can use a value object to send a coarse-grained view of data to the server and get back
fine-grained data. For example, you can call a single method on a value object that aggregates
several method calls on an entity bean. The method result is returned to the Flash application as
an ActionScript result object from which you can access data locally. This pattern can help to
reduce network traffic and response time, and to reduce the load on EJBs. For more information
about the value object pattern, go to
value_object/index.html.
You can use a session facade to provide a single point of contact to a set of EJBs. For example, you
can call methods on a session bean (the session facade) that is capable of calling various methods
on several other EJBs, depending on the user's current context in the application. This pattern
reduces network traffic and makes it easier to support different types of clients, change the
enterprise data model, or change the server implementation. For more information about the
session facade pattern, go to
index.html.

Calling Java classes or JavaBeans from ActionScript

This section describes how to call a JavaBean or Java class from Flash using Flash Remoting.
There is only one significant difference in how Flash Remoting handles standard Java classes and
JavaBeans. A Java class is stateless, and a new object instance is created whenever a method is
invoked. A JavaBean is stateful in the user's HTTP session. Using a JavaBean with Flash
Remoting is similar to using the
parameter to the Flash application, and the Service appends the session ID value to all subsequent
HTTP requests.
Note: The Flash Remoting session is independent of HTTPSession objects available to JSPs and
servlets. A stateful JavaBean instantiated through Flash Remoting cannot access an object stored in
a session by a JSP or servlet. Conversely, a JSP or servlet cannot use its session to access a
JavaBean instantiated through Flash Remoting.

Making a Java class or JavaBean available to Flash Remoting

To call a standard Java class or JavaBean with Flash Remoting, you must make the class or bean
available in the classpath of the Flash Remoting gateway. Unless the class or bean is in the same
web application as the gateway, you typically add it to the system classpath.
www.java.sun.com/blueprints/patterns/j2ee_patterns/
www.java.sun.com/blueprints/patterns/j2ee_patterns/session_facade/
tag in a JSP. Flash Remoting sends a
jsp:useBean

Calling Java classes or JavaBeans from ActionScript

JSESSIONID
121

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH REMOTING MX-USING FLASH REMOTING FOR FLASH MX 2004 ACTIONSCRIPT 2.0 and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash remoting mx

Table of Contents