Go to main content
1/23
Contents
Title and Copyright Information
Preface
Documentation Accessibility
Conventions
1
Overview of WebLogic Server Application Development
Document Scope and Audience
WebLogic Server and the Java EE Platform
Overview of Java EE Applications and Modules
Web Application Modules
Servlets
JavaServer Pages
More Information on Web Application Modules
Enterprise JavaBean Modules
EJB Documentation in WebLogic Server
Additional EJB Information
Connector Modules
Enterprise Applications
Java EE Programming Model
Packaging and Deployment Overview
WebLogic Web Services
JMS and JDBC Modules
WebLogic Diagnostic Framework Modules
Using an External Diagnostics Descriptor
Defining an External Diagnostics Descriptor
Coherence Grid Archive (GAR) Modules
Bean Validation
XML Deployment Descriptors
Automatically Generating Deployment Descriptors
EJBGen
Java-based Command-line Utilities
Upgrading Deployment Descriptors From Previous Releases of Java EE
and WebLogic Server
Deployment Plans
Development Tools
Java API Reference and the wls-api.jar File
Using the wls-api.jar File
Using the weblogic.jar File
Apache Ant
Using a Third-Party Version of Ant
Changing the Ant Heap Size
Source Code Editor or IDE
Database System and JDBC Driver
Web Browser
Third-Party Software
New and Changed Features in this Release
2
Using Ant Tasks to Configure and Use a WebLogic Server Domain
Overview of Configuring and Starting Domains Using Ant Tasks
Starting Servers and Creating Domains Using the wlserver Ant Task
Basic Steps for Using wlserver
Sample build.xml Files for wlserver
wlserver Ant Task Reference
Configuring a WebLogic Server Domain Using the wlconfig Ant Task
What the wlconfig Ant Task Does
Basic Steps for Using wlconfig
wlconfig Ant Task Reference
Main Attributes
Nested Elements
create
delete
set
get
query
invoke
Using the libclasspath Ant Task
libclasspath Task Definition
libclasspath Ant Task Reference
Main libclasspath Attributes
Nested libclasspath Elements
librarydir
library
Example libclasspath Ant Task
3
Using the WebLogic Maven Plug-In
Installing Maven
Configuring the WebLogic Maven Plug-In
How to use the WebLogic Maven Plug-in
Basic Configuration POM File
Maven Plug-In Goals
appc
create-domain
deploy
distribute-app
help
install
list-apps
purge-tasks
redeploy
remove-domain
start-app
start-server
stop-app
stop-server
undeploy
uninstall
update-app
wlst
wlst-client
ws-clientgen
wsgen
wsimport
ws-wsdlc
ws-jwsc
4
Creating a Split Development Directory Environment
Overview of the Split Development Directory Environment
Source and Build Directories
Deploying from a Split Development Directory
Split Development Directory Ant Tasks
Using the Split Development Directory Structure: Main Steps
Organizing Java EE Components in a Split Development Directory
Source Directory Overview
Enterprise Application Configuration
Web Applications
EJBs
Important Notes Regarding EJB Descriptors
Organizing Shared Classes in a Split Development Directory
Shared Utility Classes
Third-Party Libraries
Class Loading for Shared Classes
Generating a Basic build.xml File Using weblogic.BuildXMLGen
weblogic.BuildXMLGen Syntax
Developing Multiple-EAR Projects Using the Split Development Directory
Organizing Libraries and Classes Shared by Multiple EARs
Linking Multiple build.xml Files
Best Practices for Developing WebLogic Server Applications
5
Building Applications in a Split Development Directory
Compiling Applications Using wlcompile
Using includes and excludes Properties
wlcompile Ant Task Attributes
Nested javac Options
Setting the Classpath for Compiling Code
Library Element for wlcompile and wlappc
Building Modules and Applications Using wlappc
wlappc Ant Task Attributes
wlappc Ant Task Syntax
Syntax Differences between appc and wlappc
weblogic.appc Reference
weblogic.appc Syntax
weblogic.appc Options
6
Deploying and Packaging from a Split Development Directory
Deploying Applications Using wldeploy
Packaging Applications Using wlpackage
Archive versus Exploded Archive Directory
wlpackage Ant Task Example
wlpackage Ant Task Attribute Reference
7
Developing Applications for Production Redeployment
What is Production Redeployment?
Supported and Unsupported Application Types
Additional Application Support
Programming Requirements and Conventions
Applications Should Be Self-Contained
Versioned Applications Access the Current Version JNDI Tree by Default
Security Providers Must Be Compatible
Applications Must Specify a Version Identifier
Applications Can Access Name and Identifier
Client Applications Use Same Version when Possible
Assigning an Application Version
Application Version Conventions
Upgrading Applications to Use Production Redeployment
Accessing Version Information
8
Using Java EE Annotations and Dependency Injection
Annotation Processing
Annotation Parsing
Deployment View of Annotation Configuration
Compiling Annotated Classes
Dynamic Annotation Updates
Dependency Injection of Resources
Application Life Cycle Annotation Methods
Standard JDK Annotations
javax.annotation.PostConstruct
javax.annotation.PreDestroy
javax.annotation.Resource
javax.annotation.Resources
Standard Security-Related JDK Annotations
javax.annotation.security.DeclareRoles
javax.annotation.security.DenyAll
javax.annotation.security.PermitAll
javax.annotation.security.RolesAllowed
javax.annotation.security.RunAs
9
Using Contexts and Dependency Injection for the Java EE Platform
About CDI for the Java EE Platform
Defining a Managed Bean
Injecting a Bean
Defining the Scope of a Bean
Overriding the Scope of a Bean at the Point of Injection
Using Qualifiers
Defining Qualifiers for Implementations of a Bean Type
Applying Qualifiers to a Bean
Injecting a Qualified Bean
Providing Alternative Implementations of a Bean Type
Defining an Alternative Implementation of a Bean Type
Selecting an Alternative Implementation of a Bean Type for an Application
Applying a Scope and Qualifiers to a Session Bean
Applying a Scope to a Session Bean
Applying Qualifiers to a Session Bean
Using Producer Methods, Disposer Methods, and Producer Fields
Defining a Producer Method
Defining a Disposer Method
Defining a Producer Field
Initializing and Preparing for the Destruction of a Managed Bean
Initializing a Managed Bean
Preparing for the Destruction of a Managed Bean
Intercepting Method Invocations and Life Cycle Events of Bean Classes
Defining an Interceptor Binding Type
Defining an Interceptor Class
Identifying Methods for Interception
Enabling an Interceptor
Decorating a Managed Bean Class
Defining a Decorator Class
Enabling a Decorator Class
Assigning an EL Name to a CDI Bean Class
Defining and Applying Stereotypes
Defining a Stereotype
Applying Stereotypes to a Bean
Using Events for Communications Between Beans
Defining an Event Type
Sending an Event
Handling an Event
Injecting a Predefined Bean
Injecting and Qualifying Resources
Using CDI With JCA Technology
Configuring a CDI Application
Supporting Third-Party Portable Extensions
10
Java API for JSON Processing
About JavaScript Object Notation (JSON)
Object Model API
Creating an Object Model from JSON Data
Creating an Object Model from Application Code
Navigating an Object Model
Writing an Object Model to a Stream
Streaming API
Reading JSON Data Using a Parser
Writing JSON Data Using a Generator
11
Understanding WebLogic Server Application Classloading
Java Classloading
Java Classloader Hierarchy
Loading a Class
prefer-web-inf-classes Element
Changing Classes in a Running Program
Configuring Class Caching
WebLogic Server Application Classloading
Overview of WebLogic Server Application Classloading
Application Classloader Hierarchy
Custom Module Classloader Hierarchies
Declaring the Classloader Hierarchy
User-Defined Classloader Restrictions
Servlet Reloading Disabled
Nesting Depth
Module Types
Duplicate Entries
Interfaces
Call-by-Value Semantics
In-Flight Work
Development Use Only
Individual EJB Classloader for Implementation Classes
Application Classloading and Pass-by-Value or Reference
Using a Filtering ClassLoader
What is a Filtering ClassLoader
Configuring a Filtering ClassLoader
Resource Loading Order
Resolving Class References Between Modules and Applications
About Resource Adapter Classes
Packaging Shared Utility Classes
Manifest Class-Path
Using the Classloader Analysis Tool (CAT)
Opening the CAT Interface
How CAT Analyzes Classes
Identifying Class References through Manifest Hierarchies
Sharing Applications and Modules By Using Java EE Libraries
Adding JARs to the Domain
/lib
Directory
12
Creating Shared Java EE Libraries and Optional Packages
Overview of Shared Java EE Libraries and Optional Packages
Optional Packages
Library Directories
Versioning Support for Libraries
Shared Java EE Libraries and Optional Packages Compared
Additional Information
Creating Shared Java EE Libraries
Assembling Shared Java EE Library Files
Assembling Optional Package Class Files
Editing Manifest Attributes for Shared Java EE Libraries
Packaging Shared Java EE Libraries for Distribution and Deployment
Referencing Shared Java EE Libraries in an Enterprise Application
Overriding context-roots Within a Referenced Enterprise Library
URIs for Shared Java EE Libraries Deployed As a Standalone Module
Referencing Optional Packages from a Java EE Application or Module
Using weblogic.appmerge to Merge Libraries
Using weblogic.appmerge from the CLI
Using weblogic.appmerge as an Ant Task
Integrating Shared Java EE Libraries with the Split Development
Directory Environment
Deploying Shared Java EE Libraries and Dependent Applications
Web Application Shared Java EE Library Information
Using WebApp Libraries With Web Applications
Accessing Registered Shared Java EE Library Information
with LibraryRuntimeMBean
Order of Precedence of Modules When Referencing Shared Java EE Libraries
Best Practices for Using Shared Java EE Libraries
13
Programming Application Life Cycle Events
Understanding Application Life Cycle Events
Registering Events in weblogic-application.xml
Programming Basic Life Cycle Listener Functionality
Configuring a Role-Based Application Life Cycle Listener
Examples of Configuring Life Cycle Events with and without the URI Parameter
Understanding Application Life Cycle Event Behavior During Re-deployment
Programming Application Version Life Cycle Events
Understanding Application Version Life Cycle Event Behavior
Types of Application Version Life Cycle Events
Example of Production Deployment Sequence When Using Application Version
Life Cycle Events
14
Programming Context Propagation
Understanding Context Propagation
Programming Context Propagation: Main Steps
Programming Context Propagation in a Client
Programming Context Propagation in an Application
15
Programming JavaMail with WebLogic Server
Overview of Using JavaMail with WebLogic Server Applications
Understanding JavaMail Configuration Files
Configuring JavaMail for WebLogic Server
Sending Messages with JavaMail
Reading Messages with JavaMail
16
Threading and Clustering Topics
Using Threads in WebLogic Server
Using the Work Manager API for Lower-Level Threading
Programming Applications for WebLogic Server Clusters
17
Developing OSGi Bundles for WebLogic Server Applications
Understanding OSGi
Features Provided in WebLogic Server OSGi Implementation
Configuring the OSGi Framework
Configuring OSGi Framework Instances
Configuring OSGi Framework Instance From Administration Console
Configuring OSGi Framework Instance From config.xml
Configuring OSGi Framework Instance From WLST
Configuring OSGi Framework Instance from a Java Program
Parameter Required for Installing Bundles in the Framework
Configuring OSGi Framework Persistence
Using OSGi Services
Creating OSGi Bundles
Deploying OSGi Bundles
Preparing to Deploy an OSGi Bundle on a Target System
Preparing to Deploy Bundles as Enterprise Applications
Preparing to Deploy Bundles as Web Applications
Global Work Managers
Global Data Sources
Deploying OSGi Bundles in the osgi-lib Directory
Setting the Start Level and Run Level for a Bundle
Accessing Deployed Bundle Objects From JNDI
Using OSGi Logging Via WebLogic Server
Configuring a Filtering ClassLoader for OSGi Bundles
OSGI Example
18
Using the WebSocket Protocol in WebLogic Server
Understanding the WebSocket Protocol
Limitations of the HTTP Request-Response Model
WebSocket Endpoints
Handshake Requests in the WebSocket Protocol
Messaging and Data Transfer in the WebSocket Protocol
Understanding the WebLogic Server WebSocket Implementation
WebSocket Protocol Implementation
WebLogic WebSocket Java API
Protocol Fallback for WebSocket Messaging
Sample WebSocket Applications
Overview of Creating a WebSocket Application
Creating an Endpoint
Creating an Annotated Endpoint
Creating a Programmatic Endpoint
Specifying the Path Within an Application to a Programmatic Endpoint
Handling Life Cycle Events for a WebSocket Connection
Handling Life Cycle Events in an Annotated WebSocket Endpoint
Handling a Connection Opened Event
Handling a Message Received Event
Handling an Error Event
Handling a Connection Closed Event
Handling Life Cycle Events in a Programmatic WebSocket Endpoint
Defining, Injecting, and Accessing a Resource for a WebSocket Endpoint
Sending a Message
Sending a Message to a Single Peer of an Endpoint
Sending a Message to All Peers of an Endpoint
Ensuring Thread Safety for WebSocket Endpoints
Encoding and Decoding a WebSocket Message
Encoding a Java Object as a WebSocket Message
Decoding a WebSocket Message as a Java Object
Specifying a Part of an Endpoint Deployment URI as an Application Parameter
Maintaining Client State
Configuring a Server Endpoint Programmatically
Building Applications that Use the Java API for WebSocket
Deploying a WebSocket Application
Using WebSockets with Proxy Servers
Writing a WebSocket Client
Writing a Browser-Based WebSocket Client
Writing a Java WebSocket Client
Configuring a WebSocket Client Endpoint Programmatically
Connecting a Java WebSocket Client to a Server Endpoint
Setting the Maximum Number of Threads for Dispatching Messages
from a WebSocket Client
Securing a WebSocket Application
Applying Verified-Origin Policies
Authenticating and Authorizing WebSocket Clients
Authorizing WebSocket Clients
Establishing Secure WebSocket Connections
Avoiding Mixed Content
Specifying Limits for a WebSocket Connection
Enabling Protocol Fallback for WebSocket Messaging
Using the JavaScript API for WebSocket Fallback in Client Applications
Configuring WebSocket Fallback
Creating a WebSocket Object
Handling Life Cycle Events for a JavaScript WebSocket Client
Sending a Message from a JavaScript WebSocket Client
Packaging and Specifying the Location of the WebSocket Fallback Client
Library
Enabling WebSocket Fallback
Migrating an Application to the JSR 356 Java API for WebSocket
from the Deprecated API
Comparison of the JSR 356 API and Proprietary WebLogic Server
WebSocket API
Converting a Proprietary WebSocket Server Endpoint to Use the JSR 356 API
Replacing the /* Suffix in a Path Pattern String
Replacing a /* Suffix that Represents Variable Path Parameters
in an Endpoint URI
Replacing a /* Suffix that Represents Additional Data for an Endpoint
Example of Converting a Proprietary WebSocket Server Endpoint to Use
the JSR 356 API
Example of Using the Java API for WebSocket with WebLogic Server
A
Enterprise Application Deployment Descriptor Elements
weblogic-application.xml Deployment Descriptor Elements
weblogic-application
ejb
entity-cache
max-cache-size
xml
parser-factory
entity-mapping
jdbc-connection-pool
connection-factory
pool-params
driver-params
security
application-param
classloader-structure
listener
singleton-service
startup
shutdown
work-manager
session-descriptor
library-ref
library-context-root-override
fast-swap
weblogic-application.xml Schema
application.xml Schema
B
wldeploy Ant Task Reference
Overview of the wldeploy Ant Task
Basic Steps for Using wldeploy
Sample build.xml Files for wldeploy
wldeploy Ant Task Attribute Reference
Main Attributes
Nested <files> Child Element
Scripting on this page enhances content navigation, but does not change the content in any way.