The product provides sample applications and coding examples. Use the sample applications to test your product installation and for guidance on deploying and testing applications. Use coding examples for help on programming.
Samples are for demonstration purposes only. See Limitations of Samples for details.
You can upgrade the Samples Gallery and Client Samples. For detailed information, refer to app_server_root/samples/readme.html.
The Samples Gallery offers a set of Samples that demonstrate common enterprise application tasks. The Gallery also contains descriptions of where to find additional Samples and coding examples.
Quick start - Accessing the Samples Gallery |
---|
The Application Server Samples must be installed. Samples are installed by default during a typical product installation. During a custom installation, you can chose to install the Samples feature. Your application server and the SamplesGallery and PlantsByWebSphere applications must be running. To view the Samples Gallery, open
a browser at http://host_name:server_port/WSsamples where host_name is
the name of your server and server_port is the
port number for the application server internal HTTP transport. The
default URL is:
http://localhost:9080/WSsamples |
The Greenhouse by WebSphere application can be used with this application to process its back orders.
To view the Samples Gallery, perform the following steps.
Application Server Samples are selected by default with a typical installation. During a custom installation, you can chose to install the Samples feature.
To see if the Samples are already deployed, click
in the console navigation tree to access the Enterprise Applications page. When the Samples are deployed, SamplesGallery and PlantsByWebSphere are in the list of applications.For information on creating an application server profile, see Configuring the WebSphere Application Server for z/OS product after installation.
By default, only the Samples Gallery and Plants by WebSphere applications are installed on the application server.
The Samples are installed in the directory profile_root/installedApps/cell_name. The Sample source code is placed in the directory profile_root/installedApps/cell_name/samples.
You can build or modify the Samples source code to support your project.
addNode.sh/bat dmgr_host_name -includeapps -includebuses
In a console navigation tree, click Started status (green arrow).
to access the Enterprise Applications page. When the Samples are running, the SamplesGallery and PlantsByWebSphere applications have aTry it out! See the quick start instructions on this page.
If you have difficulty accessing the Samples Gallery, check the port number.
The Plants by WebSphere application is installed on the application server by default. That is, you need not deploy the PlantsByWebSphere.ear file onto the application server. This application is listed as an installed Sample in the Samples Gallery.
Additional Samples are initially listed as installable Samples in the Samples Gallery.
To deploy them to the application server, use the install script in the app_server_root/samples/bin directory. See the Samples Gallery for more detailed instructions.
For information about configuring security for Samples, see the Samples Gallery.
The default port is 9080, which is the default value of the HTTP transport of the application server. If the Samples Web address fails, confirm the port number.
A line mode client is used for the Calculator Client Sample and the MDBSamples client.
The Samples are for demonstration purposes only.
The code that is provided is not intended to run in a secured production environment. The Samples support Java 2 Security, therefore the Samples implement policy-based access control that checks for permissions on protected system resources, such as file I/O.
The Samples also support global security.
The BeenThere workload management Sample is the only Sample that is supported in a multi-server, clustered environment. For information on the BeenThere Sample, see the readme_BeenThere.html file in the Samples directory.
Many of the WebSphere Application Server Samples connect to a Cloudscape database using the Cloudscape-embedded framework. The Cloudscape-embedded framework has a limitation that only one Java virtual machine (JVM) can access a given database instance. As a result, in a clustered WebSphere environment, the second server in the node fails to start the Sample applications, because the first server (JVM) already holds a connection to that database instance.
For applications that require multiple Java virtual machines to access the same Cloudscape instance, use the Cloudscape networkServer framework.
When adding new customers to the WebSphereBank sample using the CreateCustomerServlet, input the information with all capital letters. Using mixed case or lower case spelling could cause unexpected behavior later, when you search for the customers using the FindAccounts mechanism.
Existing customer accounts, even if added using mixed case or lower case spelling, can be found only by using a search string containing all capital letters. The CreateCustomerServlet changes input information to all capital letters before storing the information in the database. Because the FindAccounts mechanism is case sensitive, only a query with all capital letters will yield the expected results.