IBM Rational Application Developer 8.0.3 for WebSphere software is based on the Eclipse integrated development environment (IDE). It extends Eclipse functions with visual development tools and IBM WebSphere support. It is a platform for building Java Platform, Standard Edition (Java SE) and Java Platform, Enterprise Edition (Java EE) 6 applications. Beyond these functions, Rational Application Developer provides development tools for technologies, such as OSGi, Service Component Architecture (SCA), Web 2.0, and XML. Rational Application Developer integrates with three types of WebSphere Application Server adaptor so that you can deploy web applications to WebSphere Application Server and WebSphere Portal Server. Beyond application development, you can integrate your development environment with Rational Team Concert and Rational ClearCase® to enable a wide range of change management operations, increasing both collaboration and team productivity.
IBM WebSphere Application Server Community Edition is a lightweight application server that is based onApache Geronimo. The community edition server includes many defect fixes, and is supported by IBM. It is a Java EE 6 compliant application server with an 80-100MB footprint, and you can download and use it for free. It also supports the OSGi application programming model and has a straightforward administrative console for Java asset management.
IBM WebSphere Application Server delivers significant improvements in performance, usability, and security that reduce risk, total cost of ownership (TCO), and time-to-value. It also supports Java EE 6 compliant applications development and deployment as well as OSGi, Web 2.0, and Mobile applications program models. Furthermore, it provides web tier clustering and failover across no more than five application server instances, and a variety of pricing alternatives, including socket-based pricing.
In this article
This article shows you how to use the community edition server adapter in Rational Application Developer and fast debug of Java applications. As we go through the development of a web application, we use the Rational Application Developer IDE with the WebSphere Application Server Community Edition plug-in for Eclipse (also called the WEP), to develop, deploy, and run the application.
To do the tasks in this article, you must have the following applications installed:
- IBM Rational Application Developer 8.0.3, or higher
- IBM WebSphere Application Server Community Edition 3.0: To get this server, see the Resources section later in this article.
- Community edition server 3.0 Eclipse plug-in (WEP): In order to work with the community edition server in Rational Application Developer, you must install the community edition Eclipse plugin(WEP). This plugin is the adapter that facilitates web application development in IDE with the community edition server. For a link to this plugin, see the Resources section later in this article. Extract the plugin to the IDE directory (where you installed Rational Application Developer) and restart the IDE.
Or you can install WEP from the internet directly:
- Start Rational Application Developer.
- Go to Help > Software Updates.
- Select the Available Software tab and click Add Site. Enter the following URL:http://public.dhe.ibm.com/software/websphere/wasce/updates/
- Restart Rational Application Developer.
Set up the community edition server environment
To create a community edition server instance in Rational Application Developer:
- Launch Rational Application Developer and go to Window > Open Perspective > Other. Select Java EE as shown in Figure 1 and click OK.
Figure 1. Java EE perspective
- Look for the Servers tab at the bottom of the screen (see Figure 2). In this tab, right-click on a blank space and choose New > Server. Add a new server to the tab. If you do not see the Servers tab, go to Window > Show View, and then select the Servers view.
Figure 2. Create a server environment
- Select IBM WASCE v3.0 Server and click Next.
Figure 3. Choose the community edition v3.0 server
- Click Browse and specify the JRE and the location where you have installed the community edition server (see Figure 4), then click Next.
Figure 4. Edit the server runtime environment
- Set the administrator ID (The default is
system) and password (The default is
manager) for the community edition server (Figure 5). Click Next.
Figure 5. Default user name and password for the server
- In the Add and Remove Projects window, click Finish. The community edition server is now configured to work in Eclipse.
Your server should be visible in the Servers tab (Figure 6). To start and stop your server, use the appropriate buttons. After you start the server, the value in the State column changes to Started.
Figure 6. The community edition server status
Tune arguments of the community edition server plugin on Eclipse
There are several ways to tune the server environment and improve performance when developing or debugging the applications on the server. Use the following program arguments by editing launch configuration properties of the server.
You might encounter some out-of-memory exceptions during application development and debug. You
can pump up permanent generation of objects in the JVM by specifying a
PermGen argument for IDE.
Figure 7. Configure a PermGen argument
All bundles that are installed into the server are stored in the
/var/cache directory. Each bundle is assigned an ID. You can use
the –clean argument to clean the bundle cache for next server start, or
select the Clean OSGi bundle cache check box on the Overview page. This
feature is especially useful when you develop OSGi bundles and frequently modify the code.
Figure 8. OSGi cache cleaning
To get debugging information from the server log, you can use the
–veryverbose argument to generate this information for the
application, or select DEBUG on the Console Output tab of the Overview
Figure 9. Console output of the WEP setting
When working on a web module, it is likely that you only updated some resource files. To avoid the whole web application being deployed again, you can choose to publish those modified files by specifying certain patterns with the Copy modified files instead of re-deploying web module feature. For example, included files pattern means that files with those prefixes will only be copied to the server and refreshed upon invocation. You can do the same to the modified OSGi bundles by selecting the Copy modified OSGi bundle check box.
Figure 10. Publish the modified files only
Develop and debug a simple web application
We will use a simple HelloWorld web application to demonstrate how to develop and debug applications on the community edition server.
- Select IBM WASCE v3.0 server from Servers view and start the server in debug mode.
Figure 11. Starting the server in debug mode
- Create a dynamic web project HelloWorld and select IBM WASCE v3.0 as its target runtime.
Figure 12. Create a web project
- Open the
Geronimo-web.xmlfile in the Geronimo Deployment Plan Editor. The
<context-root>element represents the entry to access the web application.
Figure 13. Specify the <context-root> element
- Create an
index.jspfile the following code snippet and place a breakpoint in the file.
Figure 14. Complete the code
- Select the project and choose Debug on server.
Figure 15. Debug on server view
- Select IBM WASCE v3.0 server as the target server and click Finish.
Figure 16. Choose the community edition server
- On the keyboard, press F5 or F6 to debug the application.
Figure 17. Debug the application
Deploy the application to the community edition server
The community edition server has a console for server administration and resource management. We will use the Deployer portlet to deploy HelloWorld.war on the server.
- Start the community edition server and go to http://localhost:8080. Log in to the administrative console with the default ID
- Click Deployer on the navigation panel.
Figure 18. Deployer portlet
- Browse to the HelloWorld.war application and then click Install. The deployment plan file is included in WAR file, so we leave the other field blank.
Figure 19. A completed deployment
- After successfully installing the application, select Web Apps(WAR).
Figure 20. Access the web application
- In the URL column, click /HelloWorld to access the newly deployed application.
Figure 21. HelloWorld
Migrate the application to WebSphere Application Server
Both WebSphere Application Server 8.0 and its community edition server version 3.0 support the Java EE specification. Therefore, you can seamlessly migrate Java EE 6 applications that you develop on the community edition server to WebSphere Application Server.
Thanks to Elson Yue, Xiao Yi and Han Hong Fang for their thoughts and thorough review of the paper.
- Find out more about Rational Application Developer:
- Browse the Rational Application Developer for WebSphere Software page on developerWorks for links to technical articles and many related resources.
- Explore the Information Center.
- Visit the Rational software area on developerWorks for technical resources and best practices
for Rational Software Delivery Platform products.
- Stay current with developerWorks technical events and webcasts focused on a variety of IBM products and IT industry topics.
- Attend a free developerWorks Live! briefing to get up-to-speed quickly on IBM products and tools, as well as IT industry trends.
- Watch developerWorks on-demand demos, ranging from product installation and setup demos for beginners to advanced functionality for experienced developers.
- Improve your skills. Check the Rational training and certification catalog, which includes many types of courses on a wide range of topics. You can take some of them anywhere, any time, and many of the "Getting Started" ones are free.
Get products and technologies
- Try Rational Application Developer for WebSphere Software, free.
- Get WebSphere Application Server Community Edition 3.0.
- Get the Eclipse plugin (WEP) for the community edition server.
- Learn about WebSphere Application Server Community Edition v3.0. Go to http://www.ibm.com/developerworks/spaces/wasce.
- Evaluate IBM software in the way that suits you best: Download it for a trial, try it online, use it in a cloud environment, or spend a few hours in the SOA Sandbox learning how to implement service-oriented architecture efficiently.
- Go to the WebSphere Application Server forum to ask questions about applications on WebSphere Application Server v8.0.
- Go to the community edition server forum to ask questions about applications on WebSphere Application Server Community Edition v3.0.
- Join the Development Tools forum to ask questions and participate in discussions.
- Check Rational Application Developer wiki to keep up with news and to contribute.
- Share your knowledge and help others who use Rational software by writing a developerWorks article. You'll get worldwide exposure, RSS syndication, a byline and a bio, and the benefit of professional editing and production on the developerWorks Rational website. Find out what makes a good developerWorks article and how to proceed.
- Follow Rational software on Facebook and Twitter (@ibmrational), and add your comments and requests.
- Ask and answer questions and increase your expertise when you get involved in the Rational forums, cafés, and wikis.
- Connect with others who share your interests by joining the developerWorks community and responding to the developer-driven blogs.
Dig deeper into Rational software on developerWorks
Get samples, articles, product docs, and community resources to help build, deploy, and manage your cloud apps.
Keep up with the best and latest technical info to help you tackle your development challenges.
Software development in the cloud. Register today to create a project.
Evaluate IBM software and solutions, and transform challenges into opportunities.