Linuxworld
Search Linuxworld

 Feature

An introduction to WebLogic Server 6.0 for Linux

Discover the features new to 6.0, plus much more

Summary
If you develop Java on Linux, there is a good chance that you use WebLogic. Discover the new features in version 6.0 and find tips on installing, configuring and deploying that widely used server. (2,200 words)
By Shari Jones

BEA Systems' release of WebLogic Server 6.0 for the Microsoft Windows, Sun Solaris, and HP-UX operating systems in December 2000 added a host of new capabilities to the Java2 Enterprise Edition (J2EE) application server. WebLogic Server is one of the most widely used J2EE application servers in the enterprise application development market. In February the Linux version quickly followed the release of WebLogic Server 6.0 for other platforms.

This article provides a brief overview of the new features in version 6.0 and examines what these changes mean for developers and administrators. It also details some installation and configuration guidelines under Linux.

To cover the complete functionality of WebLogic Server 6.0 is beyond the scope of this article, so refer to the BEA WebLogic Server documentation site for detailed procedures (see Resources for a link).

New and improved features
BEA is targeting the e-business marketplace with the new functionality of WebLogic Server 6.0, touting it as the foundation for e-business architecture with its scalability, flexibility, and reliability. BEA not only sells WebLogic Server, but also uses it as the main engine in several of its other e-business products, including WebLogic Process Integrator and WebLogic Collaborate.

WebLogic Server 6.0 contains the following new features:

  • Enterprise messaging platform providing high-volume messaging based on Java Messaging Service (JMS)
  • Integrated XML support for business-to-business, enterprise application integration (EAI), and presentation services
  • Support for the Enterprise JavaBeans (EJB) 2.0 specifications with message-driven Beans and advanced Container Managed Persistence (CMP)
  • Distributed transaction management, giving developers the ability to do complex, distributed transactions from Java-based applications
  • Improved Web-based system management console, improving installation, configuration, development, deployment, and server management
  • Updated J2EE Certification, assuring that APIs and development features work according to the latest specifications
  • Web and object clustering enhancements, improving scalability and availability
  • Web server enhancements, providing a tightly integrated Web and application server architecture and eliminating the need for a separate Web server
  • Security enhancements, including improved administration and denial-of-service protection
  • Internationalization, supporting most languages, including double-byte character-set languages like Japanese kanji

Both WebLogic Server Version 5.1 and the previous version (4.5) ran on a Win32 platform and any non-Win32 platforms, provided that a fully compliant Java Virtual Machine (JVM) was available for that platform. With the new WebLogic Server 6.0, BEA has chosen to bundle the JVM for each supported platform with the server software. Therefore, instead of offering the previous Win32 and non-Win32 versions, BEA now has separate Win32, Solaris, HP-UX, and Linux versions.

Installing WebLogic Server 6.0
In the remainder of this article we look at how the new features benefit both the J2EE developer and the application-server administrator. But before using them, you'll need to download and install the software.

Downloading WebLogic Server 6.0 is straightforward and much the same as doing so with previous versions, except that you specify the operating system to which you are downloading. To download WebLogic Server 6.0 from the BEA Website, click the Download link on the main BEA homepage (see Resources for a link) to take you to BEA's Download Center. Click BEA WebLogic Server and then select from the Linux list. A page displays details of the download. You will need to scroll to the bottom of the page and click Proceed to Download. You will then need to login (registration is free), and accept the license agreement.

After downloading WebLogic Server, at the Linux command prompt, change to the directory to which you downloaded the WebLogic Server software for Linux. You can perform either a console installation (text only) or a GUI installation (if running X Window System). To perform a console installation type sh filename.bin -i console where "filename.bin" is the name of the file you downloaded. By default, the Linux version is called Weblogic600_linux.bin. To perform a GUI installation, type sh filename.bin, again where "filename.bin" is the name of the file you downloaded.

When installing WebLogic Server 6.0, the software prompts you to specify a BEA home directory. The BEA home directory is a repository of common files used by multiple BEA products that are installed on the same machine. It is different than the download directory, which can be whatever the user wants it to be. The following components are installed in the BEA home directory as part of the download:

  • license.bea file
  • registry.xml file
  • UpdateLicense.sh file
  • jdk130 directory (contains the Java Runtime Environment)
  • wlserver6.0 directory
  • utils directory

Deploying the server
To start the default server under Linux, you will need to change to the beahome/wlserver6.0/config/mydomain directory.

In that path, "beahome" is the BEA home directory in which the WebLogic Server software was installed, and "mydomain" is the domain name specified during installation.

Type the following command at the prompt to start the default server: sh ./startWebLogic.sh.

The startWebLogic.sh script ensures that the CLASSPATH variable is set correctly and that the server is started using the config.xml file. You are then required to enter the password you specified during installation, and press Enter to start the server.

Deploying the console
To start the console, ensure that WebLogic Server is running and type the following URL in a supported Web browser: http://host:port/console. Supported browsers include Microsoft Internet Explorer 5.x and Netscape Navigator 4.7x and 4.6.

The variable parts of the URL include the host and the port. The host is the machine on which the WebLogic Server software runs. Note that you can use localhost if WebLogic Server is running on the same machine as the browser. The port is the address of the Listen Port entered during installation. The default port is 7001.

When starting the console, a username and password to login to the server are required. Type system as the username, and type the password created during installation.

Developing under WebLogic Server 6.0
WebLogic Server 6.0 adheres to standards required for J2EE Certification. As such, WebLogic Server 6.0 supports Java Servlet Specification 2.2, created by the Java Community Process (JCP). The JCP defines what a "Web application" is and what it means to be a Web application container. Using the latest Java Servlet specifications, developers can develop Web applications or Web application archives (WARs), and deploy them on any compliant servlet container without modification. For example, a developer can deploy a Web application on the reference implementation for Java Servlet 2.2 and JavaServer Pages 1.1, Apache's Tomcat. Or developers can deploy the same Web application on WebLogic Server 6.0 or any other compliant servlet container. That brings the portability of Java and XML to Web applications. WebLogic Server 6.0 also supports the current Enterprise Java Beans (EJB) specifications (2.0).

Developers will like the improved deployment features of WebLogic Server 6.0 during their application design, development, and testing. WebLogic Server's implementation of Web applications makes it very easy to deploy and test, then redeploy and retest components during development.

Users of earlier versions of WebLogic Server will be familiar with the extensive server message output at startup. WebLogic Server, by default, now hides those messages so the server will start up faster. Version 6.0 still outputs the messages to the log file as before. Additionally, with the new console and the latest developments in the server, there is less need to restart the server during development.

For an overview of development with J2EE and WebLogic Server, refer to Steven Gould's article in December's JavaWorld (see Resources for a link).

Configuring the server
After developing the Web applications -- which can include HTML pages, images, graphics, JSPs, servlets, and EJBs -- you can configure WebLogic Server and deploy your application.

First, start the default server, then the console. You must start the server before starting the console. The default server is a standalone server that uses settings configured during installation. Administrators can use the console to configure and customize the server with a browser-based GUI.

Creating a server
Use the Servers section in the left side of the administration console to display a list of servers currently in the network and to add a new server. Clicking the Create a New Server text link displays the tabs required for configuring a new server and displays the Configuration settings. First complete the General tab under Configuration. The Configuration settings must be completed and the attribute fields either changed or the default values accepted before clicking on the Create button to actually create a new server. When finished you will have access to the other configuration tabs, which include: Monitoring, Logging, Deployment, Services, and Notes. Under Configuration, and after creating the new server, you also can create clusters, set HTTP settings, enable SSL, test execution settings, and set protocols and name compilers.

Deploying EJBs
You must install and then configure an EJB before deploying it. Configure a new EJB under the Deployments, EJB section of the administration console (left panel).

In the right panel, click the Install a New EJB link to install a new EJB. After installing an EJB, in the right panel, click the link for Configure a New EJB. You then have the options to configure, set targets, and create notes during deployment. Use the Configuration tab to name the EJB, assign the URL and assign the path. Before proceeding, click the Create button to create the new EJB. You will not have access to the other configuration tabs until the EJB is created. Next, deploy the EJB.

To deploy an EJB, select from the list the server on which you want to deploy the EJB. Click the Deployments tab, and select the EJB you want to deploy from the Available column. Use the right arrow to move one or more EJBs to the Chosen column, and apply the changes.

Deploying servlets
As with EJBs, Web applications and servlets must be installed, configured, and then deployed. When installing, configuring, and deploying servlets using WebLogic Server, all three processes are similar to those same processes used with deploying EJBs.

Configure a new servlet under the Deployments section of the administration console, and select Web Applications. The right panel displays a link for Configure a New Web Application. You then have the options to configure, set targets, and create notes during servlet deployment.

After you have created and configured a servlet and want to deploy it, bundle the servlet inside the Web application. Next, select from the list the server on which you want to deploy the Web application. Select the Web application you want to deploy and use the right arrow to move the application to the Chosen column, and apply the changes.

Deploying JDBC
Two important aspects of implementing Java Database Connectivity (JDBC) are defining data sources and deploying JDBC connection pools.

To define JDBC data sources, use the Services option in the left panel of the administration console. Under JDBC, you can select Data Sources to access the Create a New JDBC Data Source link. You can then define a new JDBC data source by completing the Configuration tab and clicking the Create button. You must also define the targets for the data source.

Creating, configuring, and deploying JDBC connection pools are also an important part of deploying JDBC. In the same part of the administration console, you can select Connection Pools to access the Create a New JDBC Connection Pool link. You then can create and configure a new JDBC connection pool.

After creating and configuring the JDBC connection pool, you can assign it to a Web server by selecting the server in the left panel of the console. From the Available column, you can select one or more JDBC connection pools that you want to assign to the server and move the JDBC connection pools you selected to the Chosen column. You must click Apply to save the assignments.

Under JDBC Services in the administration console, you also can assign Multi-Pools (new in Version 6.0) and Tx Data Sources.

Administering the server
A significant improvement in WebLogic Server 6.0 allows administrators to create, configure, analyze, and monitor a server, or cluster of servers, from any machine via a Web browser. The console software need no longer reside on the computer being used; all the administrator requires is an administrator user name and password, the IP address of the server, and the port on which the server is listening.

Use the administration console in WebLogic Server 6.0 to monitor and change configurations. You access the monitoring views from Servers on the left side of the administration console. After selecting the server you want to monitor, you can select the Monitoring tab and choose a number of ways to monitor servers. WebLogic Server 6.0 provides numerous ways to monitor servers, services, and Web applications, including:

  • Server security
  • Server Execute Queues (to monitor thread usage in the JVM)
  • Server Log
  • Server Sockets
  • Server Connections
  • EJBs
  • Servlets and JSPs
  • Java Naming and Directory Interface (JNDI)
  • JDBC connection pools

Conclusion
BEA clearly has positioned BEA WebLogic Server as a solid foundation for e-business architectures. WebLogic adheres to standards required for J2EE Certification, supports the latest servlet specifications, integrates XML, uses JMS, includes Web server security enhancements, uses EJBs, and has multiple other improvements. The new functionality of WebLogic Server 6.0 offers developers an easier way to design, develop, and test applications. The new features also offer administrators a Web-based interface to quickly and easily configure, analyze, and monitor servers and clusters of servers.

Special thanks to Steven Gould for his expertise and contributions to this article.

About the author
Shari Jones is a freelance journalist and technical writer. She has more than 10 years of experience writing technical articles and documentation covering all areas of the high-tech industry, and is a former consultant.


Resources

Home | Mail this Story | Resources and Related Links

Feedback: lweditors@linuxworld.com
Technical difficulties: webmaster@linuxworld.com
URL: http://www.linuxworld.com/lw-2001-03/lw-03-weblogic.html
Last modified: