Tuesday 21 April 2009

10 - Writing JAVA Clients for Calling BEA WebLogic EJBs


X- Deployment, Client adaptation and output

I have used a calculator stateless EJB of Rose India’s Deepak Kumar’s webClient to produce my JAVA Client and WebLOGIC EJBs. This is also an example of the conversion of a WEB Client EJB application to a JAVA Client EJB application. One must change the EJB definitions in order to convert them from JBOSS to WebLOGIC based on my few experiences on this matter. Please, note that I have removed transaction related entries from Kumar’s WebClient ejb.jar

What’s the result? It follows:
C:\EJBstateless>ant
Buildfile: build.xml

clean:
[delete] Deleting directory C:\EJBstateless\build
[mkdir] Created dir: C:\EJBstateless\build

copy-resources:
[copy] Copying 3 files to C:\EJBstateless\build
[copy] Copied 2 empty directories to 1 empty directory under C:\EJBstateles
s\build

compile:
[javac] Compiling 9 source files to C:\EJBstateless\build

deploy:
[jar] Building jar: C:\EJBstateless\deploy\java2s.jar

BUILD SUCCESSFUL
Total time: 15 seconds
---------------------------------------------------------------
wls:/DefaultDomain/serverConfig> deploy("java2s","C:/EJBstateless/deploy/java2s.
jar" ,"DefaultServer",securityModel="Advanced", block="true")
Deploying application from C:\EJBstateless\deploy\java2s.jar to targets DefaultS
erver (upload=false) ...
<20.nis.2009>
.Completed the deployment of Application with status completed
Current Status of your Deployment:
Deployment command type: deploy
Deployment State : completed
Deployment Message : no message
wls:/DefaultDomain/serverConfig>
-----------------------------------------------------------------
C:\EJBstateless>ant run
Buildfile: build.xml
copy-resources:
compile:
run:
[java] JVM args ignored when same JVM is used.
[java] ARSSSsssssssss try getting ctx
[java] 7000
[java] 7000
[java] Got Context1: WLContext ()
[java] Multiply 3 and 2
[java] Multiply result= 6
BUILD SUCCESSFUL
Total time: 9 seconds
C:\EJBstateless>


( prev )