These tips assume that the Gen 8.5 EJB has already been deployed to JBoss.
Before generating and installing the proxy, edit the %GEN85%\Gen\commcfg.properties file to use the EJBRMI communications type required for the Java proxy to connect to the EJB.
For JBoss the JNDI Naming Provider service normally uses org.jnp.interfaces.NamingContextFactory for the InitialContext factory and runs on port 1099, so for example the commcfg.properties entry should look like this:
*=EJBRMI org.jnp.interfaces.NamingContextFactory <hostname>:1099
Sample APP
In folder “<path_to_model.ief> \proxy\java\deploy\<server>\samples\APP “ create a simple command file to set the CLASSPATH environment variable to include the following jar files and then run the sample application using the java executable:
- - the sample proxy app jar file
- - the dpy jar file from the EJB build
- - the JBoss client jar file jbossall-client.jar
- - setting CMIDEBUG from command line is optional
- e.g.
@echo on
set CMIDEBUG=0xffffffff
set classpath=.\S1AppTest.JAR;<path_to_model.ief> \java\classes\ EJBPSTEP_dpy.jar;C:\jboss-5.1.0.GA\client\jbossall-client.jar
java S1AppTest
Sample JSP
Deploying and using the JSP is much simpler as JBoss handles everything. The only step needed is to manually add the EJB dpy file (<path_to_model.ief> \java\classes) to the file:
<path_to_model.ief> \proxy\java\deploy\<server>\samples\JSP\<server>.ear
Inside the <server>.ear the dpy jar file needs to be added to the <server>.war file in its “WEB-INF/lib" folder & this is best done using WinZip or similar utility of your choice
- - Open the <server>.ear file with WinZip and then the <server>.war file inside it with WinZip.
- - Drill down to WEB-INF/lib folder and add the dpy file.
- - Accept all WinZip prompts to update both .war & .ear files.
Then deploy the Proxy .ear file to JBoss and execute the jsp e.g.
http://hostname:port/<server>/<PStep_name>.jsp