| By Sandy Minocha | Article Rating: |
|
| August 15, 2003 03:39 PM EDT | Reads: |
10,621 |
Since the release of IBM VisualAge for Java Enterprise Edition v3.53, the Enterprise Access Builder (EAB) tools have been able to generate code that conforms to the J2EE Connector Architecture (JCA) specification, which allows Java programs to access Enterprise Information Systems (EIS), such as SAP, CICS, IMS, and other back-end systems, using a standard interface.
IBM WebSphere Studio Application Developer Integration Edition (hereafter called Integration Edition) provides the next-generation tooling for enterprise connectivity. It features a WebSphere Test Environment that targets the powerful WebSphere Application Server Enterprise Edition.
A fix pack is now available that enables you to run JCA applications developed in Integration Edition on the WebSphere Application Server Advanced Edition (hereafter called Advanced Edition). This article describes best practices for migrating your Integration Edition JCA applications to Advanced Edition.
Flow-Based JCA Applications
Business Process Flow technology is an important piece of the
middleware stack that has recently been offered as part of the
WebSphere platform. IBM has been offering flow technology in a number
of products (most notably WebSphere MQ Workflow for people-based
workflows, WebSphere MQ Integrator for message flows, WebSphere MQ
Adapter Offering for MQ-based adapters, and Enterprise Access Builder
for Java-based adapters), but no tight integration of flow technology
has been available in the WebSphere platform until now. The pure-Java
flow engine, written as a WebSphere enterprise service, allows you to
tightly integrate flow technology with all the other services offered
by J2EE.
Integration Edition provides visual flow-based tools in order to visually define the sequence and flow of information between application artifacts such as application adapters, JavaBean and enterprise bean components, Web services, or other flows. In Integration Edition v4.11, only noninterruptible, short-running, and synchronous flows are supported. This type of flow is referred to as a microflow or a service flow. Interruptible, long-running, and asynchronous flows are being planned for future releases of Integration Edition.
Flows can only be run in the WebSphere Application Server Enterprise Edition. Therefore, it is important to note that this article is only relevant to non-flow-based JCA applications.
Overview
Create, Deploy, and Test the Application in Integration Edition
Integration Edition v4.11 contains a local copy of the
complete runtime environment of the WebSphere Application Server
Advanced Single Server Edition (hereafter called Advanced Single
Server Edition) v4.02 with enhancements to support JCA and some
features of the WebSphere Enterprise Extensions. This environment is
called the WebSphere Test Environment. The JCA tooling combined with
the Test Environment provides you with a complete environment to
develop and test your JCA applications. The high-level steps to
creating, deploying, and testing the JCA application in Integration
Edition are depicted in Figure 1.
Deploy and Test the Application in Advanced Single Server Edition
The release of Fix Pack 4 makes it possible to take JCA
applications developed in Integration Edition and deploy and execute
them in Advanced Edition. You simply export the JCA application from
Integration Edition as an Enterprise Archive EAR file and then use
the Administrative Console to deploy it into Advanced Edition.
However, before moving your JCA application directly to an Advanced
Edition application server, it is recommended that you test the JCA
application in the steps outlined in this article in order to make
the porting process as smooth as possible.
In addition to testing JCA applications in the Test Environment's local copy of the WebSphere Application Server, Integration Edition provides the capability to test your JCA applications on a remote copy of the WebSphere Application Server product. Consequently, by configuring an Advanced Single Server Edition with Fix Pack 4, you can use Integration Edition to remotely deploy and run your JCA application. WebSphere Application Server Advanced Single Server Edition is required since the Test Environment does not support it. The high-level steps to deploying and testing the JCA application in Advanced Single Server Edition are depicted in Figure 2.
Deploy and Run the Application in Advanced Edition
Once you have verified that the JCA application executes
successfully in Advanced Single Server Edition, it is ready to be
deployed in Advanced Edition. The high-level steps to deploying and
running the JCA application in Advanced Edition are depicted in
Figure 3.
The rest of this article takes you through a real example, the Phone Book IMS application included in Integration Edition.
Getting Started
The following software is required. Follow the installation
instructions included with the software.
To apply Fix Pack 4, go to the WebSphere Application Server Support link, www.ibm.com/software/webservers/appserv/support.html. In the Search this product field, type "Version 4.0.4" and click Submit. This will bring up a link to the Fix Pack 4 download site.
When installing the Fix Pack for Advanced Edition, ensure that you run the install -connectors command if you have not already installed the J2C (J2EE Connector) runtime support in the application server.
To install the J2C runtime support in Advanced
Single Server Edition, copy the following JAR files
from the
Create, Deploy and Test the Application in Integration Edition
Install the Phone Book IMS Application
Test the Application
Configure Connection Information in the Phone Book IMS Application
Run the Java Client Application
Add a Local WebSphere Test Server
Create a Server Instance and Server Configuration
Install and Configure the Resource Adapter
To add a connection factory:
Deploy the Application
Test the JCA Application
Run the Java Client Application
At this point, you have completed building your JCA
application and verified that it executes successfully
with your EIS. The next step is to test the same JCA
application in a different WebSphere Test Environment.
Deploy and Test the JCA Application in Advanced Single Server Edition
Create a Server Instance and Server Configuration
Install and Configure a Resource Adapter
If the remote test server is not on the same physical machine
as the Integration Edition, then additional steps are needed to
configure the resource adapter. If this is the case, then see the
"Additional Steps to Configure a Resource Adapter in a Remote Test
Server" section in the "Hints and Tips" section of this article.
Deploy the JCA Application
Test the JCA Application
Run a Java Client Application
At this point, you have verified that your JCA application
executes successfully with your EIS in an environment similar to
Advanced Edition. The final step is to move the JCA application over
to the Advanced Edition.
Deploy and Run a JCA Application in Advanced Edition
In the case of the Phone Book IMS sample, you can obtain the
IMS RAR file from the IMS Connector for Java link,
www.ibm.com/software/data/ims/
about/imsico/downloads.htm.
The WebSphere Application Server InfoCenter contains
extensive documentation on the application server, including how to
install resource adapters, how to create JCA connection factories and
how to install EAR files. Consequently, some of the instructions
below are not detailed. See
www.ibm.com/software/webservers/appserv/infocenter.html for more details on these tasks.
Install and Configure a Resource Adapter
Start the Administrative Console
Install a Resource Adapter
Add a Connection Factory
Deploy the JCA Application
Install EAR File
Run the JCA Application
Run the Java Client Application
Congratulations! You have now successfully deployed and
executed a JCA application in Advanced Edition.
Hints and Tips
path="%WAS_HOME%"
within the tag to
path="AdvancedSingleServerEdition_Installdir"
3. Save your changes and close the file.
It is also possible that Agent Controller is not running.
Agent Controller is a daemon process that provides the mechanism by
which client applications either launch new host processes or attach
to agents that coexist within existing host processes. Agent
Controller is automatically installed with Integration Edition as a
Windows service. You do not have to provide any information (such as
the installation path and JAVA_HOME environment) when you install
Agent Controller with Integration Edition. Integration Edition will
provide all necessary information to Agent Controller. Check your
list of Windows services and ensure that the Agent Controller service
is running.
Additional Steps to Configure a Resource Adapter in a Remote Test Server
Note: The Integration Edition v4.11 licensing agreement
permits you to copy the resource adapter files to Advanced Single
Server Edition and use them in conjunction with the Integration
Edition product for development and testing purposes only. For
additional information, see the licensing agreement located in the
Conclusion
References
Create the Application
Integration Edition includes a sample that documents how to
build, deploy, and run the Phone Book IMS application in the Test
Environment. Since the intent of this article is to show how JCA
applications can be deployed and executed in Advanced Edition, this
sample is not built but loaded into the workbench instead. To install
the Phone Book IMS application in the workbench, complete the
following steps:
1. Start Integration Edition. The workbench launches the
Enterprise Services perspective (see Figure 4).
2. Select File -> New -> Other.
3. Expand Examples from the left frame and select Enterprise
Services Samples.
4. From the right frame, select Phone Book.
5. Click Next.
6. Click Finish. This will load the Phone Book IMS sample in the
workbench. It may take several minutes. Once the sample has been
loaded, the Help perspective opens and you will see four errors in
the task list, which can be ignored.
7. Go back to the Enterprise Services perspective.
8. To remove the list of referenced libraries from this view, go
to the top right-hand corner of the Packages view, click the Menu
icon and ensure that Show Referenced Libraries is unchecked.
Before the Phone Book IMS application is deployed and
executed, it is a good idea to verify that the Phone Book IMS
application was installed correctly, and to verify connectivity to
IMS.
1. From the Enterprise Services perspective, click the Packages
tab. Expand the IMSSample project, sample.ims package, and
double-click PhoneBookIMS.wsdl. PhoneBookIMS.wsdl will open in the
WSDL editor.
2. In the Services section, click PhoneBookIMSService.
3. In the Ports section, click imsPort.
4. Click Extensibility Elements.
5. Select IMSAddress. The Extensibility Element Properties
appear (see Figure 5).
6. Type the appropriate connection information for your IMS system.
7. Close the editor and click Yes to save your changes.
The Phone Book IMS application includes a fat Java client
application that communicates directly with the IMS system.
1. In the same sample.ims package, select TestPhoneBookIMS.java
class and expand the Run icon on the toolbar by selecting the arrow
beside it. From the pop-up menu, select Run -> Java Application.
2. Verify that the output is similar to that shown in Figure 6.
The Test Environment uses server instances and server
configurations to test J2EE applications. Server instances identify
servers that can test J2EE applications, whereas server
configurations contain setup information. Server instances and server
configurations are created using the Create a New Server Instance and
Configuration wizard.
1. From the Enterprise Service perspective, click the Server
Configuration tab to open the Server Configuration view. Right-click
Server Configurations. Select New -> Server Instance and
Configuration. The Create a New Server Instance and Configuration
wizard opens.
2. In the Server name field, type ServicesServer.
3. In the Folder field, type ServicesServer.
4. Expand WebSphere Servers from the Server instance type list.
5. Select WebSphere v4.0 Test Environment. Leave the template
set to None. Click Next.
6. Click Yes to create a ServicesServer server project.
7. Click Finish. The new server instance appears in the Server
Configuration view and in the Servers view. The server configuration
appears in the Server Configuration view.
Integration Edition comes with four resource adapters: CICS
ECI, CICS EPI, IMS, and HOD 3270. In order for a WebSphere Test
Server to use these resource adapters, they must be installed and
configured appropriately:
1. Expand Server Configurations in the Server Configuration view.
2. Double-click the server configuration ServicesServer. The
server configuration editor opens.
3. Click the J2C tab.
4. Click Add beside the J2C Resource Adapters pane. The Create
Resource Adapter window opens.
5. In the Resource Adapter Name dropdown list, select IMS.
6. Click OK.
1. Click Add beside the J2C Connection Factories pane.
2. In the Create Connection Factory window, click Name in the
Name column, and then click in the Value column beside Name. Type
ims_cf.
3. Click JNDI name in the Name column, and then click in the
Value column beside JNDI name. Type "myIMS".
4. Click on another field to set the new values, and then click OK.
5. In the Resource Properties pane, complete the necessary resource
properties for your IMS system (see Figure 7).
6. Close the editor and click Yes to save the changes.
Add the JCA Application to the Local WebSphere Test Server
Deploying a JCA application involves the simple step of
adding the EAR project to the server configuration:
1. In the Server Configuration view, expand Server
Configurations and right-click ServicesServer.
2. Select Add Project -> IMSClient.
Start the Local WebSphere Test Server
1. Click the Servers tab to open the Servers view.
2. Under Server Instance in the Servers view, right-click
ServicesServer, and then select Start from the pop-up menu. The
server status should change to "Started". (If it doesn't, click the
Console tab and look for exceptions or load module errors.)
The Phone Book IMS application includes a Java client
application that invokes the application's session bean.
1. From the Enterprise Services perspective, click on the
Packages tab. Expand the Services_CLIENT project, appClientModule
folder, and sample.ims.client package.
2. Select TestPhoneBookEJB.java and expand the Run icon on the
toolbar by selecting the arrow beside it. From the pop-up menu,
select Run -> Java Application.
3. Verify that the output is similar to that shown in Figure 8.
4. Under Server Instance in the Servers view, right-
click ServicesServer, and then from the pop-up
menu, select Stop. The server status should change
to "Stopped". (If it doesn't, click the Console tab and look for exceptions.)
Add a Remote WebSphere Test Server
The process of adding a remote WebSphere Test Server to your
Test Environment is quite similar to adding a local test server.
1. From the Enterprise Service perspective, click the
Server Configuration tab to open the Server
Configuration view. Right-click Server Configurations.
Select New -> Server Instance and Configuration.
The Create a New Server Instance and
Configuration wizard will open.
2. In the Server name field, type AEs.
3. In the Folder field, select ServicesServer.
4. Expand WebSphere Servers from the Server instance
type list.
5. Select WebSphere v4.0 Remote Server. Leave the tem-
plate set to None.
6. Click Next (see Figure 9).
7. In the WebSphere installation directory field, type
the path where Advanced Single Server Edition is
installed.
8. Click Next twice.
9. In the Remote target directory field, type the path
of the Advanced Single Server Edition seen on
the local machine. Most likely, the Single Server
Edition is installed on the same physical
machine as the Integration Edition. This means the
remote target- directory will be same as the
WebSphere installation directory.
10. Click Finish. The new server instance appears in the
Server Configuration view and in the Servers view.
The server configuration appears in the Server Configuration view.
Installing and configuring resource adapters in a remote test
server is identical to installing and configuring resource adapters
in a local test server. Consequently, follow the steps as outlined
above to install and configure a resource adapter in a local test
server.
Add the JCA Application to a Remote WebSphere Test Server
Deploying a JCA application to a remote WebSphere Test Server
involves adding the EAR project to the server configuration, which is
done as follows:
1. In the Server Configuration view, expand Server
Configurations and right-click AEs.
2. Select Add Project -> IMSClient.
Start the Remote WebSphere Test Server
1. Click the Servers tab to open the Servers view.
2. Under Server Instance in the Servers view, right-click AEs, and
then from the pop-up menu, select Start. The server status should
change to "Started". (If it doesn't, click the Console tab and look
for exceptions or load module errors.) In the Console window, you
will notice that the Advanced Single Server Edition with the applied
Fix Pack 4 will start up (see Figure 10).
The same Java client application used earlier with the local
test server is invoked here.
1. From the Enterprise Services perspective, click on the
Packages tab. Expand the Services_CLIENT project, appClientModule
folder, and sample.ims.client package.
2. Select TestPhoneBookEJB.java and expand the Run icon on the
toolbar by selecting the arrow beside it. From the pop-up menu,
select Run -> Java Application.
3. Verify that the output is similar to that running in the
local test server.
The Advanced Edition does not come with the resource adapters
that a JCA application requires to access enterprise information
systems using SAP, CICS, IMS, and other back-end systems. You must
obtain the appropriate Resource Adapter Archive (RAR) file for your
EIS before you can execute your JCA application in Advanced Edition.
Start the Administrative Server
1. From a command window, type the command adminserver to start
the Administrative server. Once the message "Server __adminServer
open for e-business" appears in the command window, the server is up
Click Start -> Programs -> IBM WebSphere -> Application
Server V4.0 AE -> Administrator's Console to open the Administrative
Console.
1. In the Administrative Console, select New -> J2C Resource
Adapter. The J2C Resource Adapter Properties window comes up.
2. In the Name field, type ims_ra.
3. Beside the Archive file name field, click the small square
button to open the Install Driver page.
4. Select the node that you want to use to install the resource adapter.
5. Beside the RAR file field, click Browse, and then navigate
the file system and select the IMS RAR file.
6. Click Install.
7. Click OK.
1. From the Console menu, select New -> J2C Connection Factory.
The J2C Connection Factory wizard appears.
2. In the J2C resource adapter dropdown list, select ims_ra.
3. In the Name field, type "ims_cf".
4. In the JNDI binding path field, type "myIMS".
5. Click the Connections tab and type the property values
appropriate to your environment.
6. Click OK.
Export an EAR File
The Integration Edition includes an Export EAR wizard that
conveniently packages a JCA application into an EAR file. This EAR
file can then be installed in Advanced Edition using the
Administrative Console.
1. From Integration Edition, select File -> Export. The Export
wizard opens.
2. In the left frame, select EAR file.
3. Click Next.
4. Click Finish.
Use the Administrative Console to install the EAR file in
Advanced Edition. Since the EAR file was packaged with all the
deployment information in Integration Edition, installing it into the
application server is very simple.
1. From the Administrative Console menu, select Wizards ->
Install Enterprise Application. The Install Enterprise Application
wizard opens.
2. In the Path field, click Browse, navigate to your EAR file,
and select it. Click Open.
3. Click Next 10 times to accept the defaults.
4. Click Finish. When a message appears that asks you if you
want to regenerate code, click No.
Start the Default Application Server
1. In the left frame of the Administrative console,
expand WebSphere Administrative Domain, Nodes, your_node_name, and
Application Servers.
2. Right-click Default Server and select Start.
The same Java client application used with the local
and remote test servers in earlier is invoked here.
1. From a command window, type "launchclient< Advanced
Edition_Installdir>/installed Apps/ServicesEAR.ear".
2. Verify that the output is similar to that shown in Figure 11.
Problems with Launching the Remote Test Server
The most likely scenario is that you already had Agent
Controller installed on a machine and then you installed Advanced
Single Server Edition on the same machine. In this case, you must
edit the settings in the server configuration file after you install
Advanced Single Server Edition:
1. Open the serviceconfig.xml file, which is located in the
2. In the file, search for the Application executable="wte
Remote.exe" tag. Change all occurrences of
Additional steps to configure a resource adapter in a remote
test server are necessary when the remote test server is on a
different physical machine from the Integration Edition. This is due
to a limitation of Integration Edition's Test Environment for
publishing resource adapters to the remote test server. When the
remote test server is on the same physical machine as Integration
Edition, this limitation is transparent because the Test Environment
configures the remote test server to point to the pre-installed
resource adapters. If the remote test server is on a different
machine, then the configuration settings for the resource adapters
become invalid because the directory structure will be different on
the two machines. In order to configure a resource adapter in the
remote test server that is on a different physical machine from
Integration Edition, follow these steps:
1. Navigate to the directory
2. Copy the appropriate group of JAR files to the machine where
Advanced Single Server Edition is installed.
3. Open the server-cfg.xml file, which is located in the
4. In that file, search for the installedResourceProviders tag.
Modify its classpath attribute to point to the location where the JAR
files were moved to in Step 2.
The target platform for applications developed with
Integration Edition v4.11 is Enterprise Edition. However, the release
of the WebSphere Application Server v4 Fix Pack 4 makes it possible
to deploy and run JCA applications in Advanced Edition. This article
provides best practices for moving your non-flow-based JCA
applications to Advanced Edition.
Published August 15, 2003 Reads 10,621
Copyright © 2003 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
More Stories By Sandy Minocha
Sandy Minocha works for the WebSphere Studio Jumpstart ISV Enablement team at the IBM Toronto Software Lab. The team engages with key WebSphere Studio tools partners, providing technical guidance and support as they integrate into the WebSphere Studio set of products. The team also performs technical validations of partner plug-ins for the Ready for WebSphere Studio partner program. Sandy holds a bachelor’s in electrical engineering from the University of Waterloo and a master’s in Telecommunications from the University of Toronto, and is a PEng.
- Is the PR Business Extinct? Yes
- Government IT & Cloud Computing: Themes for Discussion
- GovIT Expo Highlights Cloud Computing
- Cloud Computing Best Practices
- VIP Invitation For the GovIT Panel October 6, Washington DC
- Forget Defining Cloud Computing
- Why SOA Needs Cloud Computing - Part 1
- The Cloud Transition: What Does It Mean For You?
- IBM Puts Systems Chief on Leave of Absence
- Cloud Expo and the End of Tech Recession
- Oracle Fined for Sun Ad
- IBM Exec Out on Bail as Galleon Sinks Below the Waves
- Is the PR Business Extinct? Yes
- The Difference Between Web Hosting and Cloud Computing
- Government IT & Cloud Computing: Themes for Discussion
- GovIT Expo Highlights Cloud Computing
- Cloud Computing Best Practices
- The End of IT 1.0 As We Know It Has Begun
- VIP Invitation For the GovIT Panel October 6, Washington DC
- The Case for Single-Purpose Services
- Product Evaluation: JBoss TCO Calculator
- Forget Defining Cloud Computing
- Why SOA Needs Cloud Computing - Part 1
- Cloud Expo Power Panel on SYS-CON.TV
- Java vs C++ "Shootout" Revisited
- Where Are RIA Technologies Headed in 2008?
- WebSphere Application Server Java Dumps
- Breaking News: New Internal IBM Report Says "Another Flawed Study"
- Last Exclusive JDJ Interview With "IBM's" John A. Swainson, Now CA's Newly Appointed CEO
- How To Deploy Scalable WebSphere Applications Using "Maven" Build Tool
- Your Guide to Portal Clustering in WebSphere Portal Server 5.1
- Developing Java and Web Services Applications on Rational Application Developer V6
- The Top 250 Players in the Cloud Computing Ecosystem
- Automated Deployment of Enterprise Application Updates
- Putting IBM's WAS On Unix - WebSphere Application Server
- Profiles for WebSphere Application Server 6.0































