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
    SYS-CON Events announced today that CAST Software 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. CAST was founded more than 25 years ago to make the invisible visible. Built around the idea that even the best analytics on the market still leave blind spots for technical teams looking to deliver better software and prevent outages, CAST provides the software intelligence that matter ...
    SYS-CON Events announced today that Daiya Industry will exhibit at the Japanese Pavilion 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. Ruby Development Inc. builds new services in short period of time and provides a continuous support of those services based on Ruby on Rails. For more information, please visit https://github.com/RubyDevInc.
    As businesses evolve, they need technology that is simple to help them succeed today and flexible enough to help them build for tomorrow. Chrome is fit for the workplace of the future — providing a secure, consistent user experience across a range of devices that can be used anywhere. In her session at 21st Cloud Expo, Vidya Nagarajan, a Senior Product Manager at Google, will take a look at various options as to how ChromeOS can be leveraged to interact with people on the devices, and formats th...
    SYS-CON Events announced today that Yuasa System will exhibit at the Japan External Trade Organization (JETRO) Pavilion 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. Yuasa System is introducing a multi-purpose endurance testing system for flexible displays, OLED devices, flexible substrates, flat cables, and films in smartphones, wearables, automobiles, and healthcare.
    SYS-CON Events announced today that Taica will exhibit at the Japan External Trade Organization (JETRO) Pavilion 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. Taica manufacturers Alpha-GEL brand silicone components and materials, which maintain outstanding performance over a wide temperature range -40C to +200C. For more information, visit http://www.taica.co.jp/english/.
    SYS-CON Events announced today that SourceForge has been named “Media Sponsor” of 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. SourceForge is the largest, most trusted destination for Open Source Software development, collaboration, discovery and download on the web serving over 32 million viewers, 150 million downloads and over 460,000 active development projects each and every month.
    SYS-CON Events announced today that Nihon Micron will exhibit at the Japan External Trade Organization (JETRO) Pavilion 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. Nihon Micron Co., Ltd. strives for technological innovation to establish high-density, high-precision processing technology for providing printed circuit board and metal mount RFID tags used for communication devices. For more inf...
    Enterprises have taken advantage of IoT to achieve important revenue and cost advantages. What is less apparent is how incumbent enterprises operating at scale have, following success with IoT, built analytic, operations management and software development capabilities – ranging from autonomous vehicles to manageable robotics installations. They have embraced these capabilities as if they were Silicon Valley startups. As a result, many firms employ new business models that place enormous impor...
    SYS-CON Events announced today that MIRAI Inc. will exhibit at the Japan External Trade Organization (JETRO) Pavilion 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. MIRAI Inc. are IT consultants from the public sector whose mission is to solve social issues by technology and innovation and to create a meaningful future for people.
    Widespread fragmentation is stalling the growth of the IIoT and making it difficult for partners to work together. The number of software platforms, apps, hardware and connectivity standards is creating paralysis among businesses that are afraid of being locked into a solution. EdgeX Foundry is unifying the community around a common IoT edge framework and an ecosystem of interoperable components.
    SYS-CON Events announced today that Dasher Technologies 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. Dasher Technologies, Inc. ® is a premier IT solution provider that delivers expert technical resources along with trusted account executives to architect and deliver complete IT solutions and services to help our clients execute their goals, plans and objectives. Since 1999, we'v...
    SYS-CON Events announced today that TidalScale, a leading provider of systems and services, 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. TidalScale has been involved in shaping the computing landscape. They've designed, developed and deployed some of the most important and successful systems and services in the history of the computing industry - internet, Ethernet, operating s...
    SYS-CON Events announced today that Massive Networks, that helps your business operate seamlessly with fast, reliable, and secure internet and network solutions, has been named "Exhibitor" of 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. As a premier telecommunications provider, Massive Networks is headquartered out of Louisville, Colorado. With years of experience under their belt, their team of...
    SYS-CON Events announced today that IBM has been named “Diamond Sponsor” of SYS-CON's 21st Cloud Expo, which will take place on October 31 through November 2nd 2017 at the Santa Clara Convention Center in Santa Clara, California.
    Infoblox delivers Actionable Network Intelligence to enterprise, government, and service provider customers around the world. They are the industry leader in DNS, DHCP, and IP address management, the category known as DDI. We empower thousands of organizations to control and secure their networks from the core-enabling them to increase efficiency and visibility, improve customer service, and meet compliance requirements.
    SYS-CON Events announced today that TidalScale 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. TidalScale is the leading provider of Software-Defined Servers that bring flexibility to modern data centers by right-sizing servers on the fly to fit any data set or workload. TidalScale’s award-winning inverse hypervisor technology combines multiple commodity servers (including their ass...
    As hybrid cloud becomes the de-facto standard mode of operation for most enterprises, new challenges arise on how to efficiently and economically share data across environments. In his session at 21st Cloud Expo, Dr. Allon Cohen, VP of Product at Elastifile, will explore new techniques and best practices that help enterprise IT benefit from the advantages of hybrid cloud environments by enabling data availability for both legacy enterprise and cloud-native mission critical applications. By rev...
    Join IBM November 1 at 21st Cloud Expo at the Santa Clara Convention Center in Santa Clara, CA, and learn how IBM Watson can bring cognitive services and AI to intelligent, unmanned systems. Cognitive analysis impacts today’s systems with unparalleled ability that were previously available only to manned, back-end operations. Thanks to cloud processing, IBM Watson can bring cognitive services and AI to intelligent, unmanned systems. Imagine a robot vacuum that becomes your personal assistant tha...
    As popularity of the smart home is growing and continues to go mainstream, technological factors play a greater role. The IoT protocol houses the interoperability battery consumption, security, and configuration of a smart home device, and it can be difficult for companies to choose the right kind for their product. For both DIY and professionally installed smart homes, developers need to consider each of these elements for their product to be successful in the market and current smart homes.
    In his Opening Keynote at 21st Cloud Expo, John Considine, General Manager of IBM Cloud Infrastructure, will lead you through the exciting evolution of the cloud. He'll look at this major disruption from the perspective of technology, business models, and what this means for enterprises of all sizes. John Considine is General Manager of Cloud Infrastructure Services at IBM. In that role he is responsible for leading IBM’s public cloud infrastructure including strategy, development, and offering ...