- Samples Gallery contents
- Install and configure the Samples Gallery
- Change the Samples Gallery port number troubleshooting
- Client Samples Gallery contents
- Install and view the Client Samples Gallery
- Other Samples and examples
To access the Samples Gallery, click throughStart | Programs | IBM WebSphere | Application Server Network Deployment v6.0 | Profiles | profile | Samples Gallery
In the following examples, hostname is a variable.
To pull up the samples home page, go to:http://hostname:9080/WSsamples
...which represents...$WAS_HOME/samples/index.html (local file system)
Samples Gallery contents
- Plants by WebSphere application
- Demonstrates several 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
- Demonstrates multiple J2EE 1.4 technologies in a banking scenario.
- Greenhouse by WebSphere 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
- Demonstrate enterprise beans, servlets, JavaServer Pages technology, J2EE application client, security, and message-driven beans.
- Web Services Samples
- Demonstrate J2EE beans and JavaBeans components that are available as Web services.
- Service Data Objects (SDO) 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
- Demonstrates J2EE 1.4 technology using an online travel shopping store.
- JACL scripts
- 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 WAS 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.
By default, only the Samples Gallery and Plants by WebSphere application are installed on the application server. They are installed in the directoryinstall_root/profiles/profile/installedApps/cell
The Sample source code is placed in the directoryinstall_root/profiles/profile/samples
You can build or modify the Samples source code to support your project.
To run the Samples with the WAS 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
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!
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, one can change the port number in the Properties window by clicking Start > Programs > IBM WebSphere > Application Server Network Deployment v6.0 > profiles > profile > 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 systeminstall_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 WAS 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 WAS Samples are available on WebSphere developerWorks
- Samples for Technology for Developers V6
- The tutorials on developerWorks for WebSphere Application Server Technology for Developers V6 include Sample code.
- Samples in tutorials
- Many WAS tutorials rely on Sample code. To find tutorials that demonstrate specific technologies, browse the links in 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.
WebSphere is a trademark of the IBM Corporation in the United States, other countries, or both.
IBM is a trademark of the IBM Corporation in the United States, other countries, or both.