Vous êtes sur la page 1sur 16

Table of Contents

Chapter 24. Manually Install WebSphere Bank....................................................................... 1


Verify the Existence of the J2C Resource Adapter......................................................................................................................................................................... 2
Create the J2C Authentication Alias............................................................................................................................................................................................... 2
Create the JDBC Provider............................................................................................................................................................................................................... 3
Create the Data Source.................................................................................................................................................................................................................... 4
Create the SIBus.............................................................................................................................................................................................................................. 7
Create an SIBus Member for the SIBus.......................................................................................................................................................................................... 7
Create the SIB JMS Connection Factory........................................................................................................................................................................................ 8
Create the SIB JMS Queue............................................................................................................................................................................................................ 10
Create the SIB Queue..................................................................................................................................................................................................................... 11
Create the SIB JMS Activation Specification................................................................................................................................................................................ 13
Verify That the SIB Service for the Application Server Is Enabled.............................................................................................................................................. 14

Chapter 24. Manually Install WebSphere Bank. WebSphere Application Server: Step by Step, ISBN: 9781583470619
Prepared for hussain.mahaboob@tcs.com, Mahaboob Hussain
Copyright 2006 MC Press Online, LP.. This download file is made available for personal use only and is subject to the Terms of Service. Any other use requires prior written consent
from the copyright owner. Unauthorized use, reproduction and/or distribution are strictly prohibited and violate applicable laws. All rights reserved.
24
Manually Install
WebSphere Bank

I n Chapter 4, you saw how to use a WebSphere samples script from the command
line to install the WebSphere SamplesGallery application, one element of which is the
WebSphere Bank sample you learned about in Chapter 24. What you didnt see are all
the resources that were created for you at that time. In this chapter, we review the
resources created for the WebSphere Bank application and explain how you can create
them yourself using the WebSphere administrative console.

Installing resources manually is a common requirement to successfully deploy any J2EE


application because the J2EE specification doesnt define how to package this informa-
tion in the Enterprise Archive (EAR) file. As you learned in Chapter 23, IBM has solved
this issue in a proprietary way with Enhanced EARs. In that chapter, you used the
WebSphere Application Server Toolkit (AST) to create an enhanced WebSphere Bank
EAR. In most cases, however, the J2EE developer/packager will tell you which
resources the application requires, and, as the system administrator, youll need to create
these resources using either WebSpheres admin console or the wsadmin command-line
tool.

As it turns out, WebSphere Bank needs the following resources to run:


a J2C resource adapter called WebSphere Relational Resource Adapter that,
luckily, is created automatically when you install WebSphere
a J2C authentication alias named IBM-79D6XZF0P9FNode01Cell/samples (note
that the first part of this name contains the name of the node/cell where the alias
is created and so will vary from node to node)
a JDBC provider named Samples Cloudscape JDBC Provider (XA)

717

Chapter 24. Manually Install WebSphere Bank. WebSphere Application Server: Step by Step, ISBN: 9781583470619
Prepared for hussain.mahaboob@tcs.com, Mahaboob Hussain
Copyright 2006 MC Press Online, LP.. This download file is made available for personal use only and is subject to the Terms of Service. Any other use requires prior written consent
from the copyright owner. Unauthorized use, reproduction and/or distribution are strictly prohibited and violate applicable laws. All rights reserved.
CHAPTER 24: Manually Install WebSphere Bank

a data source named BANKDS


a connection factory named BANKDS_CF (which, as youll see, is also created
automatically)
a service integration bus (SIBus) named IBM-79D6XZF0P9FNode01SamplesBus
(again, the first part of the name is the node name where the bus is created and
so will vary from node to node)
an SIBus member for the SIBus named IBM-79D6XZF0P9FNode01SamplesBus

Licensed by
an SIB Java Message Service (JMS) connection factory named
BankJMSConnFactory
an SIB JMS queue named BankJMSQueue


Mahaboob Hussain
an SIB queue named BankJSQueue
an SIB JMS activation specification named BankActivationSpec

3845101
Last, but not least, youll need to enable the SIB service for the application server
(server1). Lets walk through the steps to set up each required resource.

Verify the Existence of the J2C Resource Adapter


First, take the following steps to make sure the required J2C resource adapter,
WebSphere Relational Resource Adapter, has been created.
1. In the WebSphere admin consoles navigation tree, expand Resources, and click
Resource Adapters.
2. Verify that WebSphere Relational Resource Adapter appears in the list of
installed resource adapters.

Create the J2C Authentication Alias


Next, create the required J2C authentication alias, IBM-79D6XZF0P9FNode01Cell/
samples:
1. In the console, navigate to Security|Global Security to display the Global
Security panel.
2. Under the Authentication heading, select JAAS configuration|J2C authenti-
cation data to display the J2C Authentication Data Entries panel.
3. Click New.

718

Chapter 24. Manually Install WebSphere Bank. WebSphere Application Server: Step by Step, ISBN: 9781583470619
Prepared for hussain.mahaboob@tcs.com, Mahaboob Hussain
Copyright 2006 MC Press Online, LP.. This download file is made available for personal use only and is subject to the Terms of Service. Any other use requires prior written consent
from the copyright owner. Unauthorized use, reproduction and/or distribution are strictly prohibited and violate applicable laws. All rights reserved.
Create the JDBC Provider

4. On the resulting configuration panel (shown in Figure 24-1), enter the required
values: a unique alias name (IBM-79D6XZF0P9FNode01Cell/samples), a valid
user ID (samples), a valid password (samples), and a short description (JAAS
Alias for WebSphere Samples).
5. Click Apply or OK.

Figure 24-1: Creating a J2C authentication alias

Create the JDBC Provider


Next, create the JDBC provider resource, Samples Cloudscape JDBC Provider (XA):
1. Navigate to Resources|JDBC Providers.
2. On the resulting panel, make sure the scope is set to Server.
3. Click New.
4. Enter the values as shown in Figure 24-2 to create the JDBC provider.

719

Chapter 24. Manually Install WebSphere Bank. WebSphere Application Server: Step by Step, ISBN: 9781583470619
Prepared for hussain.mahaboob@tcs.com, Mahaboob Hussain
Copyright 2006 MC Press Online, LP.. This download file is made available for personal use only and is subject to the Terms of Service. Any other use requires prior written consent
from the copyright owner. Unauthorized use, reproduction and/or distribution are strictly prohibited and violate applicable laws. All rights reserved.
CHAPTER 24: Manually Install WebSphere Bank

Figure 24-2: Creating a JDBC provider

Create the Data Source


Next, create the BANKDS data source:
1. Again, navigate to Resources|JDBC Providers.
2. Select theJDBC provider you just created, Samples Cloudscape JDBC
Provider (XA).
3. Click Data Sources.
4. Click New.
5. Enter the data shown in Figure 24-3 to create the data source.

720

Chapter 24. Manually Install WebSphere Bank. WebSphere Application Server: Step by Step, ISBN: 9781583470619
Prepared for hussain.mahaboob@tcs.com, Mahaboob Hussain
Copyright 2006 MC Press Online, LP.. This download file is made available for personal use only and is subject to the Terms of Service. Any other use requires prior written consent
from the copyright owner. Unauthorized use, reproduction and/or distribution are strictly prohibited and violate applicable laws. All rights reserved.
Create the Data Source

Figure 24-3: Creating a data source

721

Chapter 24. Manually Install WebSphere Bank. WebSphere Application Server: Step by Step, ISBN: 9781583470619
Prepared for hussain.mahaboob@tcs.com, Mahaboob Hussain
Copyright 2006 MC Press Online, LP.. This download file is made available for personal use only and is subject to the Terms of Service. Any other use requires prior written consent
from the copyright owner. Unauthorized use, reproduction and/or distribution are strictly prohibited and violate applicable laws. All rights reserved.
CHAPTER 24: Manually Install WebSphere Bank

Verify That the Connection Factory Has Been Created


When you select the option to Use this Data Source in container managed persistence
(CMP) when creating the BANKDS data source, the required connection factory,
BANKDS_CF, is created for you automatically. To verify the creation of this connection
factory:

1. Navigate to Resources|Resource Adapters to display the Resource Adapters


panel.
2. Make sure the scope is set to Server.
3. Click WebSphere Relational Resource Adapter.
4. Click CMP connection factories.
5. Verify that BANKDS_CF is created. Figure 24-4 shows the connection factorys
general properties.

Figure 24-4: Verifying that the connection factory has been created

722

Chapter 24. Manually Install WebSphere Bank. WebSphere Application Server: Step by Step, ISBN: 9781583470619
Prepared for hussain.mahaboob@tcs.com, Mahaboob Hussain
Copyright 2006 MC Press Online, LP.. This download file is made available for personal use only and is subject to the Terms of Service. Any other use requires prior written consent
from the copyright owner. Unauthorized use, reproduction and/or distribution are strictly prohibited and violate applicable laws. All rights reserved.
Create an SIBus Member for the SIBus

Create the SIBus


Next, create the service integration bus, IBM-79D6XZF0P9FNode01SamplesBus:
1. Navigate to Service Integration|Buses.
2. Click New.
3. Enter the values shown in Figure 24-5 to create the required SIBus.
4. Click Apply or OK.

Figure 24-5: Creating an SIBus

Create an SIBus Member for the SIBus


To create the SIBus member:
1. Again navigate to Service Integration|Buses.
2. Click IBM-79D6XZF0P9FNode01SamplesBus.

723

Chapter 24. Manually Install WebSphere Bank. WebSphere Application Server: Step by Step, ISBN: 9781583470619
Prepared for hussain.mahaboob@tcs.com, Mahaboob Hussain
Copyright 2006 MC Press Online, LP.. This download file is made available for personal use only and is subject to the Terms of Service. Any other use requires prior written consent
from the copyright owner. Unauthorized use, reproduction and/or distribution are strictly prohibited and violate applicable laws. All rights reserved.
CHAPTER 24: Manually Install WebSphere Bank

3. Under Additional Properties, click Bus members.


4. Click Add.
5. Select Server or Cluster, accept the default values, and click Next.
6. Confirm the addition of a new bus member as shown in Figure 24-6, and then
click Finish.

Figure 24-6: Adding an SIBus member

Create the SIB JMS Connection Factory


Take these steps to create the JMS connection factory named BankJMSConnFactory:
1. Navigate to Resources|JMS Providers.
2. Click Default messaging.
3. Under Connection Factories, click JMS connection factory.
4. Click New.
5. Enter the parameters as shown in Figure 24-7.
6. Click OK.

724

Chapter 24. Manually Install WebSphere Bank. WebSphere Application Server: Step by Step, ISBN: 9781583470619
Prepared for hussain.mahaboob@tcs.com, Mahaboob Hussain
Copyright 2006 MC Press Online, LP.. This download file is made available for personal use only and is subject to the Terms of Service. Any other use requires prior written consent
from the copyright owner. Unauthorized use, reproduction and/or distribution are strictly prohibited and violate applicable laws. All rights reserved.
Create the SIB JMS Connection Factory

Figure 24-7: Creating a JMS connection factory

725

Chapter 24. Manually Install WebSphere Bank. WebSphere Application Server: Step by Step, ISBN: 9781583470619
Prepared for hussain.mahaboob@tcs.com, Mahaboob Hussain
Copyright 2006 MC Press Online, LP.. This download file is made available for personal use only and is subject to the Terms of Service. Any other use requires prior written consent
from the copyright owner. Unauthorized use, reproduction and/or distribution are strictly prohibited and violate applicable laws. All rights reserved.
CHAPTER 24: Manually Install WebSphere Bank

Create the SIB JMS Queue


Next, create the JMS queue BankJMSQueue:
1. Navigate again to Resources|JMS Providers.
2. Click Default messaging.
3. Under Destinations, click JMS Queue.
4. Click New.
5. Enter the parameters as shown in Figure 24-8.
6. Click OK.

Figure 24-8: Creating a JMS queue

726

Chapter 24. Manually Install WebSphere Bank. WebSphere Application Server: Step by Step, ISBN: 9781583470619
Prepared for hussain.mahaboob@tcs.com, Mahaboob Hussain
Copyright 2006 MC Press Online, LP.. This download file is made available for personal use only and is subject to the Terms of Service. Any other use requires prior written consent
from the copyright owner. Unauthorized use, reproduction and/or distribution are strictly prohibited and violate applicable laws. All rights reserved.
Create the SIB Queue

Create the SIB Queue


Create the BankJSQueue SIB queue:
1. Navigate to Service Integration|Buses.
2. Select IBM-79D6XZF0P9FNode01SamplesBus.
3. Under Additional Properties, click Destinations.
4. Click New.
5. On the Create new destination panel, select Queue and click Next.
6. For the identifier, enter BankJSQueue. Leave the description field blank, and
click Next.
7. On the Assign the queue to a bus member panel, accept server1 as the bus
member, and click Next.
8. On the Confirm queue creation panel, click Finish.
9. Verify that the BankJSQueue looks as shown in Figure 24-9.

727

Chapter 24. Manually Install WebSphere Bank. WebSphere Application Server: Step by Step, ISBN: 9781583470619
Prepared for hussain.mahaboob@tcs.com, Mahaboob Hussain
Copyright 2006 MC Press Online, LP.. This download file is made available for personal use only and is subject to the Terms of Service. Any other use requires prior written consent
from the copyright owner. Unauthorized use, reproduction and/or distribution are strictly prohibited and violate applicable laws. All rights reserved.
CHAPTER 24: Manually Install WebSphere Bank

Figure 24-9: Creating an SIB queue

728

Chapter 24. Manually Install WebSphere Bank. WebSphere Application Server: Step by Step, ISBN: 9781583470619
Prepared for hussain.mahaboob@tcs.com, Mahaboob Hussain
Copyright 2006 MC Press Online, LP.. This download file is made available for personal use only and is subject to the Terms of Service. Any other use requires prior written consent
from the copyright owner. Unauthorized use, reproduction and/or distribution are strictly prohibited and violate applicable laws. All rights reserved.
Create the SIB JMS Activation Specification

Create the SIB JMS Activation Specification


To create the SIB JMS activation specification BankActivationSpec:
1. Navigate to Resources|JMS Providers.
2. Click Default messaging.
3. Under Activation specifications, click JMS Activation specification.
4. Click New.
5. Enter the parameters shown in Figure 24-10.

Figure 24-10: Creating an SIB JMS activation specification

729

Chapter 24. Manually Install WebSphere Bank. WebSphere Application Server: Step by Step, ISBN: 9781583470619
Prepared for hussain.mahaboob@tcs.com, Mahaboob Hussain
Copyright 2006 MC Press Online, LP.. This download file is made available for personal use only and is subject to the Terms of Service. Any other use requires prior written consent
from the copyright owner. Unauthorized use, reproduction and/or distribution are strictly prohibited and violate applicable laws. All rights reserved.
CHAPTER 24: Manually Install WebSphere Bank

Verify That the SIB Service for the Application Server Is Enabled
Your final task is to verify that the SIB service for the application server, server1, is
enabled. To do so:
1. Navigate to Servers|Application Servers.
2. Select server1.
3. Click SIB service.
4. Verify that the service is enabled. If its not, enable it.

730

Chapter 24. Manually Install WebSphere Bank. WebSphere Application Server: Step by Step, ISBN: 9781583470619
Prepared for hussain.mahaboob@tcs.com, Mahaboob Hussain
Copyright 2006 MC Press Online, LP.. This download file is made available for personal use only and is subject to the Terms of Service. Any other use requires prior written consent
from the copyright owner. Unauthorized use, reproduction and/or distribution are strictly prohibited and violate applicable laws. All rights reserved.

Vous aimerez peut-être aussi