|
|
YOUR FEEDBACK
Did you read today's front page stories & breaking news?
SYS-CON.TV |
TOP THREE LINKS YOU MUST CLICK ON Administration
Administrative Tasks Using the weblogic.Admin Command-Line Utility
By: Kumar Allamraju
Digg This!
WebLogic Server (WLS) provides several ways to configure servers, clusters, machines, JDBC connection pools, JMS servers, and so on, using the following:
In this section we'll focus on doing admin tasks using the weblogic.Admin command-line utility. I've assumed that you're using WLS 7.0, although the same syntax should work fine in the 6.x release. Before invoking the weblogic.Admin utility, set the WLS development environment. In Windows it's setWLSEnv.cmd; in Unix platforms it's setWLSEnv.sh. These files are located under $WL_HOME/user_projects/your-domain folder.Let's try some basic MBean commands using WebLogic. Admin utility. 1. To create a server named "WLDJServer", use the following example:
<<Note: for the blue text, set apart and use different font but not code font>>
where object_name is in the form of "domain-name:Name={server name}:Name,Type={type of Mbean}" Example:
java weblogic. Admin -url {admin-serverl url} -username {admin-user} -password where "WLDJDomain" is your domain name. After executing the above command, write the entries shown in Listing 1 into config.xml. 2. To create a cluster named "WLDJCluster", use the following example:
java weblogic. Admin -url {admin-serverl url} -username {admin-user} -password where object_name is in the form of "domain-name:Name={cluster name}:Name,Type={type of Mbean}" Example:
java weblogic.Admin -url {admin-serverl url} -username {admin-user} -password After executing the above command, write the following into config.xml: <Cluster Name="WLDJCluster"/> 3. To set/change the configuration attributes of this Mbean, use the weblogic.Admin SET option:
java weblogic.Admin -url {admin-serverl url} -username {admin user} -password where property_name can be one of the Mbean attributes, such as MulticastAddress, ClusterAddress, and InterfaceAddress, and so on. Example:
java weblogic. Admin -url {admin-server url} -username {admin user} -password After executing the above command, write the following entries into config.xml: <Cluster MulticastAddress="224.0.0.1" Name="WLDJCluster"/> 4. To assign the managed server created in step 1 to a cluster, use weblogic.Admin SET:
java weblogic. Admin -url {admin-serverl url} -username {admin user} -password Example:
java weblogic. Admin -url {admin-server url} -username {admin-user} -password The above command will update the config.xml with the following entries:
<Server Cluster="WLDJCluster" Name="WLDJServer"> 5. To view configuration attributes of a particular Mbean, use weblogic.Admin GET:
java weblogic.Admin -url {admin-server url} -username {admin-user} -password where ConfigMBean could be ServerConfig, ExecuteQueueConfig, DomainConfig, and so on. Example:
java weblogic.Admin -url {admin-server url} -username {admin-user} -password 6. To view runtime statistics of a particular Mbean, use weblogic.Admin GET:
java weblogic.Admin -url {admin-server url} -username {admin-user} -password where ConfigMBean could be ServerConfig, ExecuteQueueConfig, DomainConfig, and so on. Example:
java weblogic. Admin -url {admin-server url} -username {admin-user} -password 7. To create a connection pool, use weblogic.Admin CREATE_POOL:
java weblogic. Admin -url {admin-server url} -username Example:
java weblogic. Admin -url {admin-server url} -username
Summary
References
BEA WEBLOGIC LATEST STORIES
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
|
SYS-CON FEATURED WHITEPAPERS MOST READ THIS WEEK BREAKING NEWS FROM THE WIRES
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||