This topic describes how to install and access the Samples Gallery,
which offers a set of Samples that demonstrate common Web application tasks.
The Gallery also contains descriptions of where to find additional Samples
and coding examples.
Quick start
Quick start - Accessing the Samples Gallery |
Your application server must be running. The Samples
must be installed. On Windows systems, you can click Start > Programs >
IBM WebSphere > Application Server Network Deployment v6.0 > Profiles > profile_name
> Samples Gallery.
In the following examples, hostname is
a variable.
Windows: http://hostname:9080/WSsamples
Linux: http://hostname:9080/WSsamples
Unix: http://hostname:9080/WSsamples
Client
Samples: install_root/samples/index.html (local file
system)
|
To determine which Samples pertain to a specific WebSphere application
type, see the directory in Learn about WebSphere applications.
The Samples are for demonstration purposes only. See the following limitations
for details.
First time here? Read the following information.
A little setup is involved.
Samples Gallery contents
The Samples
Gallery includes the following materials:
- Plants by WebSphere application
- This application demonstrates several Java 2 Platform, Enterprise Edition
(J2EE) functions, using an online store that specializes in plant and garden
tool sales. The Greenhouse by WebSphere application can be used with this
application to process its backorders.
- WebSphere Bank application
- This application demonstrates multiple J2EE 1.4 technologies in a banking
scenario.
- Greenhouse by WebSphere application
- This application demonstrates multiple J2EE 1.4 technologies in a business-to-business
(B2B) supplier scenario. It can process backorders from the Plants by WebSphere
application.
- Technology Samples
- These Samples demonstrate enterprise beans, servlets, JavaServer Pages
technology, J2EE application client, security, and message-driven beans.
- Web Services Samples
- These Samples demonstrate J2EE beans and JavaBeans components that are
available as Web services.
- Service Data Objects (SDO) Sample
- This Sample demonstrates data access to a relational database through
Service Data Objects (SDO) and Java DataBase Connectivity (JDBC) Mediator
technologies.
- BeenThere workload management Sample
- This Sample demonstrates the workload management and
clustering capabilities of the product, and is the only Sample that is supported
in a multi-server, clustered environment.
- Java Adventure Builder application
- This application demonstrates J2EE 1.4 technology using an online travel
shopping store.
- JACL scripts
- These scripts enable you to configure resources and install the Sample
applications.
- Programming model extensions Samples in the Samples Gallery
- These Samples demonstrate WebSphere programming model extension features
such as dynamic query service, work area service, internationalization service,
ActivitySessions service, application profiling, Java Transaction API (JTA)
extensions, asynchronous beans, and scheduler.
Installing and configuring the Samples Gallery
The
Samples Gallery and the Plants by WebSphere application are installed and
configured by default on the application server. To view the WebSphere Application
Server Samples Gallery, perform the following steps.
- Install the product. The Application Server Samples package is selected
by default.
The Samples are installed in the install_root/samples
directory.
- Create a standalone Application Server profile.
See Using the Profile creation wizard for more information.
By
default, only the Samples Gallery and Plants by WebSphere application are
installed on the application server. They are installed in the directory:
install_root/profiles/profile_name/installedApps/cell_name
The Sample source code is placed in the directory:
install_root/profiles/profile_name/samples
You
can build or modify the Samples source code to support your project.
To
run the Samples with the WebSphere Application Server Network Deployment edition
in a distributed environment, install and configure the Samples in a standalone
application server profile installation, and then federate the node into the
deployment manager cell using the
addNode command. When running the
addNode command,
use the dmgr_host argument, and -includeapps and -includebuses options. For
example:
addNode.sh/bat dmgr_hostname -includeapps -includebuses
For
a complete list of the
addNode parameters and their usage, see
addNode command.
Start the application server.
- 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. Try it out! See the quick
start instructions on this page.
If you have difficulty accessing
the Samples Gallery, check the port number.
- Install additional Samples.
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 install_root/samples/bin directory.
See the Samples Gallery for more detailed instructions.
Changing the Samples Gallery port number and troubleshooting
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. Also verify that the Samples are installed, and that
the application server is running.
On Windows systems, you can change
the port number in the Properties window by clicking Start > Programs >
IBM WebSphere > Application Server Network Deployment v6.0 > profiles > profile_name
> Samples Gallery.
Client Samples Gallery contents
The
Client Samples Gallery demonstrates the following clients.
- J2EE application client
- Java thin client
- Applet client
- ActiveX to EJB Bridge client
Installing and viewing the Client Samples Gallery
To
view the Client Samples Gallery, install the WebSphere Application Server
client on a distributed machine.
See Installing Application Client for WebSphere Application Server for more
information.
Access the Client Samples Gallery on your local file system:
install_root/samples/index.html
Limitations of the Samples
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.
Additional Samples and examples
- Samples on developerWorks
- Additional WebSphere Application Server Samples are available on WebSphere developerWorks
- Samples for Technology for Developers Version 6
- The tutorials on developerWorks for WebSphere Application
Server Technology for Developers Version 6 include Sample code.
- Samples in tutorials
- Many WebSphere Application Server tutorials rely on Sample code. To find
tutorials that demonstrate specific technologies, browse the links in Learn about WebSphere applications.
- Examples in the product documentation
- The product documentation contains many code snippets and examples. To
locate these examples easily, see the developer examples in the Reference section
of the information center navigation for the product edition that you are
using.
- Java Samples on the Sun Microsystems Web site
- Although they do not showcase the capabilities added by purchasing WebSphere
Application Server, the Samples on the java.sun.com Web
site demonstrate the basic functionality of various technologies.