Wizard API updated!
Tim Boudreau has released a new version of the Swing Wizard library (version 0.997) that fixes the WizardException bug reported in JavaWorld's recent Open Source Java Project profile. The article's examples have been reworked to test out the new, improved WizardException. Thanks, Tim, for this helpful fix!
Open Source Java Projects: The Wizard API

Newsletter sign-up

Sign up for our technology specific newsletters.

Enterprise Java
View all newsletters

Email Address:

Automate resource configuration on WebLogic Server

Resource configuration using WLST and Ant on WebLogic Server

Every deployable J2EE component must be specifically configured on the application server to function. For WebLogic Server, developers generally complete this configuration manually by using the console, by using WebLogic Ant tasks wlconfig and wldeploy, or by using the command line tool weblogic.deployer. The Ant tasks and the command line tools need much environment-specific information for correct configuration, and WebLogic 9.0 recommends limited use of these tools.

Applications don't have a uniform way for maintaining and communicating configuration information to application deployers, which can result in custom scripts or manual configuration. As custom scripts are difficult to maintain and manual configuration may lead to errors, achieving a smooth propagation and release mechanism for J2EE artifacts proves difficult. This complexity increases when the application must be deployed on multiple environments (development, test, and production) as it is difficult to achieve complete environment independence. Also, when the information is not maintained uniformly across applications, changing application targets on the fly becomes tedious. Hence, every application should consistently maintain its configuration information in a way that is environment-independent. In addition, a tool that can automatically read and perform configuration on the required servers—which should be part of application deployment—would add convenience. Such a tool can also be leveraged to enforce standards and guidelines.

This article provides a sample format in which configuration information should be maintained by the application. It also provides tools in the form of Ant tasks that can read the configuration and deploy it on WebLogic Server. The code samples featured with this article have been compiled and tested on J2SE 1.4.2_03 and WebLogic 8.1., and are valid for WebLogic 7.0, 8.1, and 9.0.

Types of WebLogic Server configuration

J2EE applications generally use connection pools, datasources, Java Message Service (JMS) stores (file store or Java Database Connectivity store), JMS servers, JMS destinations (queues and topics), and distributed JMS destinations. Some of these resources are created on the domain level. Sometimes applications share configuration, sometimes not. The shared configuration should not be deleted when the application is undeployed. This article's sample Ant task and configuration take care to ensure that shared configuration is not deleted. They also do not overwrite the configuration that already exists.

Resource configuration and WLST

WebLogic creates management beans (MBeans) for every configuration. It uses Java Management Extensions (JMX) to manage and manipulate the MBeans. So, for every configuration, an MBean must be created and deployed. The parameters required for creating the MBean are its name, type, and a set of attributes.

WLST (WebLogic Scripting Tool) is a scripting tool that allows its users to access and manipulate MBeans similar to how they would navigate files on a filesystem. It is a scripting interface that developers can use to configure and interact with WebLogic Server. WLST, which has been incorporated with WebLogic 9.0, can work online as well as offline. When working online, WLST can work in three modes:

1 | 2 | 3 |  Next >

Discuss

Start a new discussion or jump into one of the threads below:

Subject Replies Last post
. Automate resource configuration
By JavaWorldAdministrator
( Pages 1 2 all )
40 05/09/08 05:16 PM
by Anonymous
. wlconfig to create Weblogic Authenticators
By faisalfaizan
( Pages 1 2 3 all )
41 05/09/08 02:27 PM
by Anonymous


Resources