Welcome!

Weblogic Authors: Yeshim Deniz, Elizabeth White, Michael Meiner, Michael Bushong, Avi Rosenthal

Related Topics: Weblogic

Weblogic: Article

Application Management with Weblogic Server for Developers Part 2

Application Management with Weblogic Server for Developers Part 2

  • For the first part of this 6-part series, and the final four, please use the links at foot of the article

    Once your BEA WebLogic Server domain is configured, you need to deploy your application.

    This is the second in a series of articles on BEA WebLogic Server administration and management for developers. The first article (WLDJ, Vol. 2, issue 10) introduced the major concepts and terminology for a WebLogic Server domain. Then, we showed you the most commonly used graphical tools for setting up WebLogic Server, and packaging and configuring applications to be deployed on it: the Administration Console, the Configuration Wizard, and WebLogic Builder.

    In this article, we'll discuss application deployment, runtime management, and the monitoring facilities available with WebLogic Server - both graphical and command-line based.

    Application Deployment with the Administration Console
    In the deployment area of the Admin Console, you deploy new applications and modules - J2EE Enterprise applications, EJBs, Web applications, J2EE CA Connectors, and WebLogic Server Startup or Shutdown classes - to servers and clusters in the domain.

    WebLogic Server enables you to deploy an application or module as either an archive file or an exploded archive file that contains the same files and maintains the same directory structure as the archive itself. Archived applications and modules must use the correct file extension for the module type:

  • EJBs are packaged as .jar files.
  • Web applications are packaged as .war files.
  • Resource adapters are packaged as .rar files.
  • Enterprise applications are packaged as .ear files.
  • Web services are packaged as either .war or .ear files.

    Exploded archives are frequently used in a development environment because they allow you to easily change parts of the application, recompile, and redeploy without regenerating the J2EE archive. To target an exploded archive, you select the top-level directory of the application or module, rather than the archive file.

    After you have initially set up and deployed an application or module to one or more servers, you can stop, deploy, or redeploy the application or module without reconfiguring or re-copying its files, and without restarting the server. This is commonly referred to as hot deployment. Figure 1 shows an example of the Admin Console deployment screen.

     

    When the server runs in development mode, it also supports something known as auto-deployment. With auto-deployment, the server watches the server's applications directory for new or updated files and automatically deploys or redeploys the new or updated archives.

    Application and System Monitoring with the Admin Console
    The BEA WebLogic Server Admin Console provides features for monitoring J2EE application components. The first and most obvious way to make sure all components have deployed correctly and are available to the application is to find them in the JNDI tree. Figure 2 shows the JNDI tree displayed by the Admin Console.

     

    Next, you can monitor the individual component usage as your application runs to confirm that the application is using the server facilities in the most efficient way. There are multiple places in the Admin Console that allow you to do this. For EJBs, the Admin Console provides extensive statistics about the EJB runtime usage that can help you determine how efficiently the server is able to process requests for each EJB. While the Admin Console provides a default view of a subset of these statistics, it also allows you to customize the view in real time to meet your demands for specific information. An example of a view into the EJB statistics is shown in Figure 3.

     

    Similar to the EJB statistics, there is also a customizable display of servlets and JSP statistics, as shown in Figure 4.

     

    You can also monitor many other J2EE and server-specific resources. Figure 5 shows an example of monitoring a JDBC connection pool while Figure 6 shows you how to monitor the general health of the server through the Admin Console.

     

    Using the statistical and graphical information provided by the Admin Console, you can come up with initial estimates of your application's performance, see potential bottlenecks, and identify possible areas for optimization. While the Admin Console provides valuable application and server monitoring features, it may not provide enough information for all situations. In these cases, you have the following options:

  • Leverage BEA WebLogic Server's open and extensible management framework to add new monitoring features to the Admin Console, or access specific monitoring functionality from your custom applications.
  • Leverage the extensive BEA partner ecosystem, which has numerous administration and management vendors who offer products that plug into WebLogic Server and provide more comprehensive administration, management, and monitoring functionality, in many cases covering the entire enterprise environment, not just applications deployed on WebLogic Server.

     

    Command-Line Tools: weblogic.Admin and weblogic.Deployer
    Graphical administration and management tools available with BEA WebLogic Server provide a powerful, intuitive, and visual way to administer your WebLogic Server applications. However, in some cases simpler, more focused utilities are more convenient. In a development environment, a command-line interface provides a highly flexible way to automate administrative tasks into your build, deploy, and test process. In a production environment, the command-line interface provides a repeatable process for accomplishing tasks to reduce the opportunities to introduce human error.

    While not as visual and intuitive, the command-line interface does give you access to all of the functions available through the Admin Console, and even provides more flexible ways to access some features that are either hidden by the console or not that easy to use. Most of this access to administrative functionality is through the weblogic.Admin Java program's commands, which give you the ability to manipulate the underlying JMX infrastructure directly. To use these particular commands (GET, SET, CREATE, INVOKE, DELETE, and QUERY), you need to understand both JMX and BEA WebLogic Server's JMX MBeans. We will cover JMX in detail in a later article. The rest of this article will focus on the subset of commands that don't require an understanding of JMX, even though they are accessing the server's JMX infrastructure to accomplish their work.

    The weblogic.Admin utility is a command- line interface that you can use to administer, configure, and monitor WebLogic Server. Like the Admin Console, this utility assumes the role of client that invokes administrative operations on the Admin Server, which is the central management point for all servers in a domain. While the Admin Console does everything through the Admin Server, the weblogic.Admin utility can access the individual managed server directly, as well as access the Admin Server. If the Admin Server is down, you can still use the weblogic.Admin utility to retrieve runtime information from managed servers and invoke some administrative commands. However, BEA WebLogic Server can only save configuration changes to the domain when the Admin Server is available.

    Since weblogic.Admin is a Java program, you need to set up your environment before you can run it. Once it's done, you can run it following this syntax:

    java weblogic.Admin [ [-url | -adminurl] [protocol://]
    listen-address:port]
    -username username [-password password]
    COMMAND-NAME arguments

    If you want weblogic.Admin to use SSL to communicate with your WebLogic Servers, then you'll need to define some additional Java system properties to tell weblogic.Admin certain information. For example, the weblogic.security.SSL.trustedCAKeyStore property tells weblogic.Admin (and any other WebLogic SSL client or server) where to find the trust key store. Setting weblogic.security.- SSL.ignoreHostnameVerification to true disables the normal process of veriying that the hostname in the server's certificate matches the server's IP address.

    There is really no way for us to explain all of the commands available through the WebLogic Server command-line interface - there are just too many of them to fit here. For a comprehensive list of the available commands, see the WebLogic Server documentation at http://edocs.bea.com/wls/docs81/admin_ref/cli.html. We provide just a few examples here for you to get a feel for what you can do.

    The FORCESHUTDOWN command instructs the Admin Server to shut down a managed server:

    java weblogic.Admin -url t3://AdminHost:7001
    -username weblogic -password weblogic
    FORCESHUTDOWN MedRecManagedServer

    After issuing this command, the BEA WebLogic Server instance named MedRecManagedServer will shut itself down without waiting for in-flight requests to complete. When it receives this command, the server will print messages to its log file and to standard out, indicating that the server state is changing and that the shutdown sequence is starting. If the command succeeds, the final message that the target server prints is as follows:

    <Jul 12, 2003 11:28:59 AM EDT> <Alert>
    <WebLogicServer> <000219> <The shutdown sequence
    has been initiated.>

    In addition, if the command succeeds, the weblogic.Admin utility returns the following:

    Server "MedRecManagedServer" was force shutdown successfully ...

    If the Admin Server is not available, you can send the FORCESHUTDOWN command directly to the managed server to have it shut itself down:

    java weblogic.Admin -url t3://ManagedHost:7001
    -username weblogic -password weblogic
    FORCESHUTDOWN

    If you want to write scripts that don't require the user to know an administrative username or password, you can tell weblogic.Admin to use the information stored in your boot identity file, also known as the boot.properties file. To do this, you need to tell weblogic.Admin where to find the boot identity file and where the root directory of your server is so that it can find the information it needs to decrypt the boot identity file (the default value is the current directory). The following example provides user credentials by referring to a boot identity file and specifies the server's root directory so that it can be invoked from any directory:

    java Dweblogic.system.BootIdentityFile=c:mydomainoot.properties
    -Dweblogic.RootDirectory=c:mydomain
    weblogic.Admin -url t3://AdminHost:7001
    FORCESHUTDOWN

    BEA WebLogic Server also provides a command-line utility for deploying applications called weblogic.Deployer. As with weblogic.Admin, this utility is a Java program that requires certain arguments. The general syntax for weblogic.Deployer is: java weblogic.Deployer [options] [actions] [file(s)]

    The most important options include the URL of the Admin Server, the username and password of a user with deployment privileges, the name of the application or component being deployed, and the list of targets to which to deploy the application or component. As you would expect, the most important actions are deploy, redeploy, and undeploy. For a full list of the supported options and actions, please see the WebLogic Server documentation at http://edocs.bea.com/wls/docs81/deployment/tools.html.

    To deploy the MedRec enterprise application archive to our managed server, you would use the command shown in Listing 1.

    Just like weblogic.Admin, you can use Java system properties to specify SSL and/or boot identity file information (see Listing 2).

    For a full list of BEA WebLogic Server command-line administration tools and their associated commands, please refer to WebLogic Server online documentation at http://edocs.bea.com.

    Summary
    This article showed you how to use the WebLogic Server Administration Console for managing BEA WebLogic Server and deploying and monitoring applications deployed on it. Then we introduced you to the command-line tools weblogic.Admin and weblogic.Deployer that provide the full scope of management functionality from the command-line interface.

    In our next article we'll talk about JMX and how to use the tools and scripting facilities provided by BEA WebLogic Server for configuring, managing, and monitoring a WebLogic Server application. In the last installment of this series, we will dive into the Java APIs for building custom JMX programs, creating custom MBeans, and extending the Admin Console.

  • More Stories By Vadim Rosenberg

    Vadim Rosenberg is the product marketing manager for BEA WebLogic Server. Before joining BEA two years ago, Vadim had spent 13 years in business software engineering, most recently at Compaq Computers (Tandem Division) developing a fault-tolerant and highly scalable J2EE framework.

    More Stories By Robert Patrick

    Robert Patrick is a director of technology in BEA's CTO Office and coauthor of the book Mastering BEA WebLogic Server: Best Practices for Building and Deploying J2EE Applications.  Robert has spent his career helping customers design, build, and deploy high performance, fault-tolerant, mission-critical distributed systems using BEA Tuxedo and BEA WebLogic Server.

    Comments (0)

    Share your thoughts on this story.

    Add your comment
    You must be signed in to add a comment. Sign-in | Register

    In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


    @ThingsExpo Stories
    Large industrial manufacturing organizations are adopting the agile principles of cloud software companies. The industrial manufacturing development process has not scaled over time. Now that design CAD teams are geographically distributed, centralizing their work is key. With large multi-gigabyte projects, outdated tools have stifled industrial team agility, time-to-market milestones, and impacted P&L stakeholders.
    "Cloud Academy is an enterprise training platform for the cloud, specifically public clouds. We offer guided learning experiences on AWS, Azure, Google Cloud and all the surrounding methodologies and technologies that you need to know and your teams need to know in order to leverage the full benefits of the cloud," explained Alex Brower, VP of Marketing at Cloud Academy, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clar...
    Gemini is Yahoo’s native and search advertising platform. To ensure the quality of a complex distributed system that spans multiple products and components and across various desktop websites and mobile app and web experiences – both Yahoo owned and operated and third-party syndication (supply), with complex interaction with more than a billion users and numerous advertisers globally (demand) – it becomes imperative to automate a set of end-to-end tests 24x7 to detect bugs and regression. In th...
    "Akvelon is a software development company and we also provide consultancy services to folks who are looking to scale or accelerate their engineering roadmaps," explained Jeremiah Mothersell, Marketing Manager at Akvelon, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
    "MobiDev is a software development company and we do complex, custom software development for everybody from entrepreneurs to large enterprises," explained Alan Winters, U.S. Head of Business Development at MobiDev, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
    SYS-CON Events announced today that CrowdReviews.com has been named “Media Sponsor” of SYS-CON's 22nd International Cloud Expo, which will take place on June 5–7, 2018, at the Javits Center in New York City, NY. CrowdReviews.com is a transparent online platform for determining which products and services are the best based on the opinion of the crowd. The crowd consists of Internet users that have experienced products and services first-hand and have an interest in letting other potential buye...
    "IBM is really all in on blockchain. We take a look at sort of the history of blockchain ledger technologies. It started out with bitcoin, Ethereum, and IBM evaluated these particular blockchain technologies and found they were anonymous and permissionless and that many companies were looking for permissioned blockchain," stated René Bostic, Technical VP of the IBM Cloud Unit in North America, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Conventi...
    SYS-CON Events announced today that Telecom Reseller has been named “Media Sponsor” of SYS-CON's 22nd International Cloud Expo, which will take place on June 5-7, 2018, at the Javits Center in New York, NY. Telecom Reseller reports on Unified Communications, UCaaS, BPaaS for enterprise and SMBs. They report extensively on both customer premises based solutions such as IP-PBX as well as cloud based and hosted platforms.
    "Space Monkey by Vivent Smart Home is a product that is a distributed cloud-based edge storage network. Vivent Smart Home, our parent company, is a smart home provider that places a lot of hard drives across homes in North America," explained JT Olds, Director of Engineering, and Brandon Crowfeather, Product Manager, at Vivint Smart Home, in this SYS-CON.tv interview at @ThingsExpo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
    Coca-Cola’s Google powered digital signage system lays the groundwork for a more valuable connection between Coke and its customers. Digital signs pair software with high-resolution displays so that a message can be changed instantly based on what the operator wants to communicate or sell. In their Day 3 Keynote at 21st Cloud Expo, Greg Chambers, Global Group Director, Digital Innovation, Coca-Cola, and Vidya Nagarajan, a Senior Product Manager at Google, discussed how from store operations and ...
    In his session at 21st Cloud Expo, Carl J. Levine, Senior Technical Evangelist for NS1, will objectively discuss how DNS is used to solve Digital Transformation challenges in large SaaS applications, CDNs, AdTech platforms, and other demanding use cases. Carl J. Levine is the Senior Technical Evangelist for NS1. A veteran of the Internet Infrastructure space, he has over a decade of experience with startups, networking protocols and Internet infrastructure, combined with the unique ability to it...
    It is of utmost importance for the future success of WebRTC to ensure that interoperability is operational between web browsers and any WebRTC-compliant client. To be guaranteed as operational and effective, interoperability must be tested extensively by establishing WebRTC data and media connections between different web browsers running on different devices and operating systems. In his session at WebRTC Summit at @ThingsExpo, Dr. Alex Gouaillard, CEO and Founder of CoSMo Software, presented ...
    "There's plenty of bandwidth out there but it's never in the right place. So what Cedexis does is uses data to work out the best pathways to get data from the origin to the person who wants to get it," explained Simon Jones, Evangelist and Head of Marketing at Cedexis, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
    WebRTC is great technology to build your own communication tools. It will be even more exciting experience it with advanced devices, such as a 360 Camera, 360 microphone, and a depth sensor camera. In his session at @ThingsExpo, Masashi Ganeko, a manager at INFOCOM Corporation, introduced two experimental projects from his team and what they learned from them. "Shotoku Tamago" uses the robot audition software HARK to track speakers in 360 video of a remote party. "Virtual Teleport" uses a multip...
    A strange thing is happening along the way to the Internet of Things, namely far too many devices to work with and manage. It has become clear that we'll need much higher efficiency user experiences that can allow us to more easily and scalably work with the thousands of devices that will soon be in each of our lives. Enter the conversational interface revolution, combining bots we can literally talk with, gesture to, and even direct with our thoughts, with embedded artificial intelligence, whic...
    SYS-CON Events announced today that Evatronix will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Evatronix SA offers comprehensive solutions in the design and implementation of electronic systems, in CAD / CAM deployment, and also is a designer and manufacturer of advanced 3D scanners for professional applications.
    Leading companies, from the Global Fortune 500 to the smallest companies, are adopting hybrid cloud as the path to business advantage. Hybrid cloud depends on cloud services and on-premises infrastructure working in unison. Successful implementations require new levels of data mobility, enabled by an automated and seamless flow across on-premises and cloud resources. In his general session at 21st Cloud Expo, Greg Tevis, an IBM Storage Software Technical Strategist and Customer Solution Architec...
    To get the most out of their data, successful companies are not focusing on queries and data lakes, they are actively integrating analytics into their operations with a data-first application development approach. Real-time adjustments to improve revenues, reduce costs, or mitigate risk rely on applications that minimize latency on a variety of data sources. In his session at @BigDataExpo, Jack Norris, Senior Vice President, Data and Applications at MapR Technologies, reviewed best practices to ...
    An increasing number of companies are creating products that combine data with analytical capabilities. Running interactive queries on Big Data requires complex architectures to store and query data effectively, typically involving data streams, an choosing efficient file format/database and multiple independent systems that are tied together through custom-engineered pipelines. In his session at @BigDataExpo at @ThingsExpo, Tomer Levi, a senior software engineer at Intel’s Advanced Analytics gr...
    When talking IoT we often focus on the devices, the sensors, the hardware itself. The new smart appliances, the new smart or self-driving cars (which are amalgamations of many ‘things’). When we are looking at the world of IoT, we should take a step back, look at the big picture. What value are these devices providing? IoT is not about the devices, it’s about the data consumed and generated. The devices are tools, mechanisms, conduits. In his session at Internet of Things at Cloud Expo | DXWor...