Previous Topic: Data Type Mappings


Code to Invoke the EJB Server

The following shows a section of code that would be used to invoke the EJB server.

...
<Instantiate the importView object>
<EJB name>Import importView = new <EJB name>Import();
<define the importView properties as desired>
...
<Create the InitialContext to resolve the EJB JNDI lookup.>
...
<Using JNDI lookup, resolve “EJB name” and obtain the remote object>
<EJB name>_Remote server = (<EJB name>_Remote) context.lookup("<EJB name>");
...
<Invoke the call method on the EJB>
<EJB name>Export exportView = server.<EJB name>call(importView);
...
<retrieve exportView data>
...