24.4. Client Interfaces

In the previous configuration section, the stub for our component is imported into our page with either seam/resource/remoting/interface.js, or with the s:remote tag:
<script type="text/javascript" 
        src="seam/resource/remoting/interface.js?customerAction">
</script>
<s:remote include="customerAction"/>
Including this script generates the interface definitions for our component, plus any other components or types required to execute the methods of our component, and makes them available for the remoting framework's use.
Two types of stub can be generated: executable stubs, and type stubs. Executable stubs are behavioral, and execute methods against your session bean components. Type stubs contain state, and represent the types that can be passed in as parameters or returned as results.
The type of stub that is generated depends upon the type of your Seam component. If the component is a session bean, an executable stub will be generated. If it is an entity or JavaBean, a type stub will be generated. However, if your component is a JavaBean and any of its methods are annotated with @WebRemote, an executable stub will be generated. This lets you call your JavaBean component's methods in a non-EJB environment, where you do not have access to session beans.