Getting Started with Oracle WebLogic Server 12c: Developer's Guide

Book description

If you’ve dipped a toe into Java EE development and would now like to dive right in, this is the book for you. Introduces the key components of WebLogic Server and all that’s great about Java EE 6.

  • Create a complete Java EE 6 application leveraging WebLogic features like JMS, SOAP and RESTful Web Services
  • Learn how to use Oracle WebLogic Server's key components and features
  • Step-by-step instructions with screenshots and code samples to help understand and apply concepts

In Detail

Oracle WebLogic server has long been the most important, and most innovative, application server on the market. The updates in the 12c release have seen changes to the Java EE runtime and JDK version, providing developers and administrators more powerful and feature-packed functionalities.

Getting Started with Oracle WebLogic Server 12c: Developer’s Guide provides a practical, hands-on, introduction to the application server, helping beginners and intermediate users alike get up to speed with Java EE development, using the Oracle application server.

Starting with an overview of the new features of JDK 7 and Java EE 6, Getting Started with Oracle WebLogic Server 12c quickly moves on to showing you how to set up a WebLogic development environment, by creating a domain and setting it up to deploy the application.

Once set up, we then explain how to use the key components of WebLogic Server, showing you how to apply them using a sample application that is continually developed throughout the chapters. On the way, we’ll also be exploring Java EE 6 features such as context injection, persistence layer and transactions.

After the application has been built, you will then learn how to tune its performance with some expert WebLogic Server tips.

Table of contents

  1. Getting Started with Oracle WebLogic Server 12c: Developer's Guide
    1. Table of Contents
    2. Getting Started with Oracle WebLogic Server 12c: Developer's Guide
    3. Credits
    4. About the Authors
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers and more
        1. Why Subscribe?
        2. Free Access for Packt account holders
        3. Instant Updates on New Packt Books
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    8. 1. Overview of WebLogic Server 12c and Related Technologies
      1. Introducing Oracle WebLogic Server 12c
        1. WebLogic Server @ Oracle
        2. Most relevant features
      2. Overview of JDK 7
        1. The Project Coin
          1. The diamond operator
          2. The try-with-resources statement
          3. Strings in switch statements
          4. Manipulating binary integral literals
          5. Exception handling with multicatch statements
      3. Delving into Java EE 6
      4. Other technologies in the book
        1. Oracle Enterprise Pack for Eclipse
        2. Oracle Coherence
        3. PrimeFaces
        4. MySQL
      5. The Cloud Application Foundation (CAF)
        1. Oracle Traffic Director
        2. Oracle Tuxedo
        3. Oracle Virtual Assembly Builder
        4. Oracle Exalogic and WebLogic 12c
      6. Web resources
        1. Java and Java EE 6
        2. WebLogic 12c
        3. Coherence
        4. Other tools
      7. Summary
    9. 2. Setting Up the Environment
      1. About the directory structure
      2. Installing JDK 1.7
      3. Installing Oracle WebLogic Server
      4. Installing Oracle Enterprise Pack for Eclipse (OEPE)
      5. Installing MySQL
        1. Installing on Linux using a package manager
        2. Downloading and installing manually
        3. Disabling case sensitivity for tables on Unix/Linux
        4. Some Windows specifics
        5. Configuring MySQL databases
      6. Preparing PrimeFaces
        1. Downloading the binaries
        2. Creating a shared library
      7. Setting up a WebLogic domain
      8. Configuring Eclipse and OEPE
        1. Linking WebLogic's runtime environment
        2. Adding a reference to the PrimeFaces' shared library
        3. Linking WebLogic Server's instance
      9. Referencing MySQL databases
        1. Creating WebLogic data sources
        2. Adding database connections to Eclipse
      10. Using OpenLDAP
        1. Installing OpenLDAP
        2. Configuring an OpenLDAP server
        3. Loading sample entries and testing
      11. Web resources
      12. Summary
    10. 3. Java EE Basics – Persistence, Query, and Presentation
      1. The business scenario – movie ticket system
        1. Business entities of the system
      2. Organizing projects in Eclipse
      3. Creating the StoreBO project
        1. Generating classes from database tables
        2. Creating named queries
        3. Tweaking the persistence.xml file
        4. Packing the project
      4. The Store web project
        1. Adding references to PrimeFaces' shared library
        2. Adding references to StoreBO
        3. Referencing the persistence configuration file
        4. Creating a named bean
        5. Configuring the Web descriptor
        6. Defining the test page
        7. Deploying and testing the application
      5. Web resources
      6. Summary
    11. 4. Creating RESTful Services with JAX-RS
      1. Creating Theater entities
        1. Customizing the generated entities
          1. Creating named queries
          2. Preventing cyclic references
          3. Formatting exhibitions' date and time
        2. Completing the persistence.xml file
        3. Packaging the library
      2. Creating the Theater web application
        1. Setting up the project
        2. Enabling JAX-RS
      3. Exposing RESTful Services through JAX-RS
        1. Coding the API
        2. Testing the web service
      4. Creating the REST client
        1. Configuring JAX-RS client libraries and optional package
        2. Creating the web service consumer
        3. Updating the SearchManager bean
        4. Updating the query page
      5. Structuring the web application
        1. Applying templates through Facelets
        2. Creating an entity listing page
      6. Web resources
      7. Summary
    12. 5. Singleton Bean, Validations, and SOAP Web Services
      1. Using bean validation
        1. About built-in constraints
        2. Combining and grouping validation rules
        3. Creating a custom constraint
          1. Coding a constraint validator
        4. Showing validation messages
          1. Using the message component
          2. PrimeFaces's Growl
        5. Dealing with null and empty strings on JSF components
      2. Singleton session beans
        1. Implementing a singleton session bean
        2. Understanding how to use the startup annotation
          1. Establishing a startup and shutdown sequence
        3. Dealing with concurrency when using singletons
        4. Singleton applied to web services
      3. Persisting an object using JPA
        1. Understanding the available transaction contexts
        2. Using container-managed transactions
        3. Using bean-managed transactions
        4. Acquiring a transaction context manually
      4. A brief intermission
      5. Web services and SOAP
        1. The reservation web service
        2. Testing the service provider
        3. Consuming the service
      6. Web resources
      7. Summary
    13. 6. Using Events, Interceptors, and Logging Services
      1. Understanding interceptors
        1. Creating a log interceptor
        2. Interceptors and Aspect Oriented Programming
      2. Using asynchronous methods
      3. Understanding WebLogic's logging service
        1. Anatomy of a log message
        2. Redirecting standard output to a log file
        3. Integrating Log4J to WebLogic's logging services
        4. Accessing and reading log files
      4. Events
        1. Defining audit events
      5. Web resources
      6. Summary
    14. 7. Remote Access with JMS
      1. WebLogic clients
        1. Thin T3 client – wlthint3client.jar
        2. RMI thin client – wlclient.jar
        3. JMS thin client – wljmsclient.jar
        4. JMS SAF client – wlsafclient.jar
        5. JMS T3 SAF client – wlsaft3client.jar
        6. Full client – wlfullclient.jar
        7. JMX client – wljmxclient.jar
      2. Java Messaging Service (JMS) and WebLogic
        1. The persistent store
        2. The JMS server
        3. The JMS module
        4. The JMS subdeployment
        5. The JMS queue
        6. The JMS connection factory
      3. Posting messages from a standalone client
        1. Creating the project
        2. Coding the message producer
        3. Queuing messages
      4. Consuming messages with an MDB
      5. Configuring thread limits for MDBs
      6. The Store-and-Forward client feature
        1. Creating the configuration file
        2. Encrypting the connection password
        3. Adjusting the configuration file
        4. Adjusting the code
        5. Testing the SAF client
        6. Web resources
      7. Summary
    15. 8. Adding Security
      1. Exploring Java SE and Java EE security
      2. WebLogic security
        1. Authentication providers and security realms
      3. Using an external LDAP server
        1. Configuring an OpenLDAP authentication provider
      4. Securing the web application
        1. Modifying the web.xml descriptor file
        2. Modifying the weblogic.xml descriptor file
        3. Creating and mapping a global role
          1. Creating the login form
          2. Testing the login procedure
      5. Protecting WebLogic resources
      6. Signing up a user and OpenLDAP
        1. Creating a user on the database
        2. Publishing a customer to a JMS queue
          1. Security policies for the JMS queue
          2. Updating the login bean
        3. From the JMS queue to the LDAP server
          1. Creating the LDAP client
          2. Creating the MDB
          3. Testing LDAP user provisioning
          4. Completing the application
      7. Web resources
      8. Summary
    16. 9. Servlets, Composite Components, and WebSockets
      1. Overview of JavaServer Faces
        1. Using composite components
      2. Learning a few Servlet tricks
        1. Deprecated features
        2. Identifying the default name of a servlet
        3. Asynchronous request processing
        4. Creating dynamic components
      3. Using WebSockets
        1. Creating the server component
        2. Testing the component
        3. Using an encrypted connection
      4. Web resources
      5. Summary
    17. 10. Scaling Up the Application
      1. Introducing the Node Manager
      2. Defining machines
      3. Using Cluster and Managed Servers
        1. Creating a static cluster
        2. Creating a dynamic cluster
      4. Configuring a software load balancer
        1. Creating a new Managed Server for load balancing
        2. Enabling the load balancer
        3. Retargeting applications and resources
          1. Updating web.xml of clustered web applications
          2. Retargeting auxiliary components
          3. Making the application cluster friendly
          4. Changing deployment target from Eclipse
      5. Using a singleton service
        1. Creating a singleton service
        2. Adjusting the service client
      6. Using Oracle Coherence
        1. Replicating sessions with Coherence*Web
          1. Creating a Coherence cluster
          2. Enabling Coherence*Web storage
          3. Adjusting the application to use the cache
        2. Caching JPA objects with TopLink Grid
      7. Web resources
      8. Summary
    18. 11. Some WebLogic Internals
      1. Understanding deployment structures
        1. Packaging as an archived file
        2. Using an exploded archive directory
        3. Using a virtual application
        4. Configuring the deployment model
      2. Using FastSwap to reduce deployment time
      3. Packaging modules into an application
        1. Creating an application-scoped module
        2. Restricting access to an application-scoped resource
        3. Declaring data sources using annotations
      4. Using the Classloader Analysis Tool (CAT)
        1. Starting CAT
        2. Finding potential conflicts
      5. Using RESTful management services
        1. Enabling the management service
        2. Monitoring resources
        3. Formatting the response
      6. Web resources
      7. Summary
    19. Index

Product information

  • Title: Getting Started with Oracle WebLogic Server 12c: Developer's Guide
  • Author(s): Fabio Mazanatti Nunes, William Markito Oliveira
  • Release date: September 2013
  • Publisher(s): Packt Publishing
  • ISBN: 9781849686969