How to Setup WmEJBAdapter 6.0 with webMethods 6.5

How to Setup WmEJBAdapter 6.0 with webMethods 6.5

Note, these instructions assume that the following base installation folders were employed
for WebSphere 6.0 and webMethods 6.5:

WebSphere 6.0 installation folder:	C:\WebSphere60
webMethods 6.5 installation folder:	C:\webMethods6
  1. Install WmEJBAdapter package under webMethods Integration Server

a) With IS administrator, install WmEJBAdapter.zip
b) With IS administrator, install EJB_6-0_Fix3.zip

  1. Copy 19 JAR files from WebSphere to webMethods folder

Copy the following files from WebSphere to webMethods folders.

Source folder : C:\WebSphere60\AppServer\lib
Target folder : C:\webMethods6\packages\WmEJBAdapter\code\jars

1 admin.jar
2 bootstrap.jar
3 ecutils.jar
4 ejbportable.jar
5 emf.jar
6 ffdc.jar
7 idl.jar
8 iwsorb.jar
9 j2ee.jar
10 management.jar
11 naming.jar
12 namingclient.jar
13 ras.jar
14 runtimefw.jar
15 runtime.jar
16 txClient.jar
17 txClientPrivate.jar
18 utils.jar
19 wsexception.jar

  1. Edit SERVER.BAT file to add WebSphere jars to IS classpath

(…preceding contents unchanged)
set PREPENDCLASSES=
set APPENDCLASSES=
rem ++++++++++++++++++++++++++++++++++
set FILE_LOCATION=C:\webMethods6\IntegrationServer\packages\WmEJBAdapter\code\jars
set APPENDCLASSES=%FILE_LOCATION%\admin.jar
set APPENDCLASSES=%APPENDCLASSES%;%FILE_LOCATION%\ecutils.jar
set APPENDCLASSES=%APPENDCLASSES%;%FILE_LOCATION%\ejbportable.jar
set APPENDCLASSES=%APPENDCLASSES%;%FILE_LOCATION%\emf.jar
set APPENDCLASSES=%APPENDCLASSES%;%FILE_LOCATION%\ffdc.jar
set APPENDCLASSES=%APPENDCLASSES%;%FILE_LOCATION%\idl.jar
set APPENDCLASSES=%APPENDCLASSES%;%FILE_LOCATION%\iwsorb.jar
set APPENDCLASSES=%APPENDCLASSES%;%FILE_LOCATION%\j2ee.jar
set APPENDCLASSES=%APPENDCLASSES%;%FILE_LOCATION%\management.jar
set APPENDCLASSES=%APPENDCLASSES%;%FILE_LOCATION%\naming.jar
set APPENDCLASSES=%APPENDCLASSES%;%FILE_LOCATION%\namingclient.jar
set APPENDCLASSES=%APPENDCLASSES%;%FILE_LOCATION%\ras.jar
set APPENDCLASSES=%APPENDCLASSES%;%FILE_LOCATION%\runtime.jar
set APPENDCLASSES=%APPENDCLASSES%;%FILE_LOCATION%\runtimefw.jar
set APPENDCLASSES=%APPENDCLASSES%;%FILE_LOCATION%\txClient.jar
set APPENDCLASSES=%APPENDCLASSES%;%FILE_LOCATION%\txClientPrivate.jar
set APPENDCLASSES=%APPENDCLASSES%;%FILE_LOCATION%\utils.jar
set APPENDCLASSES=%APPENDCLASSES%;%FILE_LOCATION%\wsexception.jar

rem ############################################################################
rem Items in PREPEND_SYSTEM_CLASSPATH will be added to the classpath before proxy.jar
rem Items in APPEND_SYSTEM_CLASSPATH will be added to the absolute end of the CLASSPATH
rem ############################################################################

set PREPEND_SYSTEM_CLASSPATH=
set APPEND_SYSTEM_CLASSPATH=%FILE_LOCATION%\bootstrap.jar

rem … Be careful with changes below this line

SET IS_DIR=C:\webMethods6\IntegrationServer
rem SET JAVA_DIR=C:\webMethods6\jvm\win142\jre
SET JAVA_DIR=C:\WebSphere60\AppServer\java

rem Globalization support
set WM_HOME=%IS_DIR%..

rem comment out the following line if not using IBM JVM 1.4.2
SET JITC_COMPILEOPT=SKIP{com/wm/util/coder/RPCBinCoder2}{_encode}{java/lang/Thread}{sleep}

set JAVA_MEMSET=-ms%JAVA_MIN_MEM% -mx%JAVA_MAX_MEM%
set JAVA2_MEMSET=-Xms%JAVA_MIN_MEM% -Xmx%JAVA_MAX_MEM% -Xrs -DWM_HOME=“%WM_HOME%”

set CP_SWITCH=-cp
if exist “%JAVA_DIR%\bin\jre.exe” (
set JAVA_EXE=“%JAVA_DIR%\bin\jre.exe”
set JAVA_CP=“%IS_DIR%\lib\jdk11x_update.jar;%JAVA_DIR%\lib\classes.zip;%JAVA_DIR%\lib\i18n.jar”
) else (
set JAVA_EXE=“%JAVA_DIR%\bin\java.exe”
set JAVA_CP=“%JAVA_DIR%\lib\rt.jar;%JAVA_DIR%\lib\i18n.jar”
)

rem set JVM_TYPE=sun
set JVM_TYPE=ibm
(following contents unchanged…)

  1. Create JNDI properties file

Create the following file anywhere on the file system, such as:

C:\WebSphereTesting\jndi.properties

java.naming.factory.initial=com.ibm.websphere.naming.WsnInitialContextFactory
java.naming.provider.url=iiop://localhost:2809

  1. Deploy EAR file under WebSphere

Deploy to WebSphere the EJB EAR file for the bean that will be used by the adapter:
Use the WebSphere Administrator to perform this deployment.

Source file:	MyEAR.ear 
  1. Deploy Client JAR file under webMethods

Deploy the EJB client jar file for the bean that will be used in the adapter
(note, the client jar file is contained in the MyEAR.ear file):

Source file:	MyClient.jar

Target folder:	webmethods6\packages\WmEJBAdapter\code\jars 
  1. Create webMethods Packages and Folders

With wm Developer, create packages and folders to hold the connection and adapter services.

Package: WebmethodsDemoConnection
Folder: webmethodsDemoConnection

Package: WebmethodsDemoAdapterService
Folder: webmethodsDemoAdapterService

Define package dependencies.

Top Level Package: WebmethodsDemoAdapterService
Requires WebmethodsDemoConnection
Requires WmART

  1. Create an EJB adapter connection (With IS Administrator)

Adapters
EJB Adapter
Connections
Configure New Connection
Connection Type
EJB Non-Transactional Connection
(Note: This must match the transaction type that is associated with the bean itself)

Configure Connection Type

Package: WebSphereDemoConnection
Folder Name: webSphereDemoConnection
Connection Name: EJB_NonTransactionalConnection
Connection Properties:
EJB Server Type: WebSphere60Connection
Properties File Name: C:\WebSphereTesting\jndi.properties
JNDI Username: (none)
JNDI Password: (none)
Retype JNDI Password: (none)

EJB Caching Level: none
Connection Management Properties:
Enable Connection Pooling: True
Minimum Pool Size: 1
Maximum Pool Size: 10
Pool Increment Size: 1
Block Timeout (msec): 1000
Expire Timeout (msec): 1000
Startup Retry Count: 0
Startup Backoff Timeout (sec): 100

Save Connection

  1. Create EJB adapter Service

With wm Developer:

File
New
Adapter Service
Select An Adapter Type
EJB Adapter

		Select an Adapter Connection Alias
			webSphereDemoConnection:
			  EJB_NonTransactionalConnection

		Select a Template
			Create EJB
		Enter a Name and Select a Folder
			Name: EJBDemoAdapterService
			Package:	WebmethodsDemoAdapterService
			Folder: 	webmethodsDemoAdapterService