Example Calling EJB's using UD5.
Enterprise Java Bean's are similar to Uniface Services. They are functions written in Java that are deployed on a J2EE compliant server, such as the BEA Weblogics Server.
This example takes you through the steps necessary to use UD5 to activate an EJB on a BEA Weblogic Server.
Evaluation versions of BEA Weblogic Server may be downloaded from:
These examples require UD5 1.00.02 or higher. In the directory where you installed UD5, the sub-directory MrchHre
contains a modified version of the BEA Weblogic Server sample class examples.ejb20.basic.beanManaged.Client
named ClientTst
.
Perform these steps to try this example (example assumes that BEA Weblogic Server has been installed on the local machine in the BEA_HOME of e:\bea
and UD5 has been installed in d:\winnt4\usys72
):
set Path=g:\ora805\bin;g:\frmdev\bin;e:\bea\wlserver6.1\bin\oci816_7
e:
cd \bea\wlserver6.1\config\examples
e:
cd \bea\wlserver_10.0\samples\domains\wl_server
startExamplesServer
bin\startWebLogic.cmd
d:
cd d:\winnt4\usys72\MrchHre
E:\bea\wlserver6.1\config\examples\setExamplesEnv
set CLASSPATH=.;%CLASSPATH%;d:\winnt4\usys72\MrchHre
E:\bea\wlserver_10.0\samples\domains\wl_server\setExamplesEnv.cmd
set CLASSPATH=.;MrchHre.jar;E:\bea\wlserver_10.0\samples\server\examples\build\ejb20BeanMgedEar\ejb20BeanMgedEjb;%CLASSPATH%;d:\winnt4\usys72\MrchHre
javac -d . ClientTst.java
jar cvf MrchHre.jar examples
del examples\ejb20\basic\beanManaged\ClientTst.class
javac -d . ClientTst.java
jar cvf MrchHre.jar examples
del examples\ejb\ejb20\basic\beanManaged\ClientTstb.class
java examples.ejb20.basic.beanManaged.ClientTst "t3://localhost:7001"
java examples.ejb.ejb20.basic.beanManaged.ClientTstb "t3://localhost:7001"
usys.asn
) to include this line, e.g:[SERVICES_EXEC]
CLIENTTST $MW1:ClientTst
CLIENTTSTB $MW1:ClientTstb
clienttst.trx
.examples.ejb20.basic.beanManaged.ClientTst
.Define Signature: CLIENTTST or CLIENTTSTB | |||||||
Operation Name | Communication Default | Stateless | Literal Name | Implementation | Return Value | Context | |
MAINTST | Synchronous | N | C | maintst | In First Parameter |
Define Parameter: MAINTST | |||||||
Parameter Name | In | Out | Data Type | Literal Name | Interface | Length | |
OUTSTR | N | Y | Basic | String | outstr | char * (length 2 - 10240) | 10000 |
ARGS | N | Y | Basic | String | args | char * (length 2 - 10240) | 4000 |
activate "CLIENTTST".MAINTST(result,args)
if ($procerror < 0)
putmess $procerrorcontext
message "UD5 returned an error - please see message frame."
endif
$Revision: 1.8 $ $Date: 2011/02/28 02:56:32 $ | [go to top] |