| Join wMUsers | Blog at wMUsers | User Control Panel | Site Map | webMethods Jobs |For Employers |
![]() | ![]() |
![]() |
How to Install and Configure the webMethods EJB Adapter v1.2If you don't have the file WmEJBAdapter_en_US.exe from the webMethods Advantage web site, find it. You may need to ask your company's designated webMethods contact for help with accessing the webMethods Software Download Center. If you have the file, double-click it to launch the installation. Follow the installation process and when prompted, choose to install the Adapter Development Kit (ADK) v1.5. The installer will also prompt you to install EJB examples. This article will not use the examples, but you can install them for digging deeper at a later date. After the installation exits, copy the following JARs from the JBoss \client directory to the webMethods JAR directory:
Next, use WinZip to open the webMethods file "jnet.jar" and delete the following files:
Restart your webMethod server, launch the Adminstrator GUI (http://serverhost:serverport/) and confirm the EJB adapter's installation. If you see the "Enterprise Java Beans" in the Adapters menu, consider it a success. Select the link to launch the EJB Administration Main Menu. To create a new alias, choose "Alias Settings" and then select the "Add Alias" button. Enter the following values:
The Alias Settings page should resemble the following:
![]() Save your Alias Setting and confirm its operation by clicking the ![]() Using the Server Browser to locate the EJBsClick the Server Browser link and select the appropriate alias from the Server Alias drop-down list. Leave the "JNDI Lookup Name" field blank and click "Continue". From the list of deployed EJBs, click the EJB that you want to browse. The server will return a Web page showing the selected EJB's details including its JNDI Lookup Name, Home Bean Name and Remote Bean Name. Note that the WmUsersEJB contains these five public methods:
![]() Generating Flow from the BrowserUsing the webMethods Developer, create a new package and add one sub-folder to it. Name both the package and the folder "JBossEJB". Next, using the Adminstrator's EJB Menu, click "Service Generation" and then select the JBoss Server alias built earlier. Set the following parameters:
Then, select the create method for your EJB. This is the method that the IS server will invoke to instantiate your EJB. ![]() After selecting a create method, build the Flow's order of execution for one or more public methods available in the EJB. In this example, we choose the addInts() method. Note that the Public Methods page lists each public method, its return type, and the number and type of its input parameters. Select "Continue". ![]() To confirm your settings, click "Generate". ![]() Returning to webMethods Developer, select "Refresh" to view the generated invokeAddInts service. ![]() Testing the Flow serviceTo test the Flow, create a new Flow in the JBossEJB package called
Add an invoke step to the Flow and select Next, map the invokeAddInts output AddIntsReturnValMethod0 to the output variable result. Save and run your flow service. ![]() Exposing EJB methods as Enterprise Web servicesBecause all webMethods Flow and Java services are inherently available as Enterprise Web services, there is nothing to much to do here. To confirm this idea, use the WmEWS package's Web services browser or use the Web Services Tools "adapter" that ships with webMethods 6 and navigate to Click "Test" to run the Flow as a Web service and browse the generated SOAP request and response documents or, if you’re a glutton for punishment, peruse the generated WSDL file. You can also use an external SOAP client such as Apache AXIS or the test client shipped with the WmEWS bonus pack to invoke one of the EJB's public methods. Resources
Go Deeper on the Subject: The wMUsers Discussion Forums Mark Carlson is the president and principal solutions architect of Conneva, Inc. which specializes in the design and development of webMethods-based integration architectures. Mark has over 18 years of experience in the IT industry and has worked with webMethods products for the past 3 years. Mark and his family live in Evergreen, Colorado at 8,000 feet above sea level.
Mark can be reached via email at |
| © All Rights Reserved, 2001-2008. |