Oracle® Containers for J2EE Servlet Developer's Guide 10g (10.1.3.1.0) Part Number B28959-01 |
|
|
View PDF |
This appendix provides reference documentation of OC4J features for administering Web modules through Oracle Enterprise Manager 10g Application Server Control, covering the following topics:
The Application Server Control Console provides a Web-based user interface for deploying, configuring, and monitoring applications, as well as managing the OC4J instance and the Web services used by your applications. It is installed, preconfigured, and started automatically when you install the OC4J software (either in a standalone or Oracle Application Server environment), and is bound to whichever port the OC4J instance is using. In a standalone environment, the port is typically 8888. In an Oracle Application Server environment, the port is usually 7777.
For example, in a standalone OC4J environment, you can use port 8888 of the appropriate host to access the console:
http://host:1888
See the Application Server Control Console online help for detailed instructions on using this interface.
The console is organized into functional areas for applications, administration, performance, and Web services. You can manage Web modules through the applications area.
Web module configuration starts from the applicable Web Module Home page in the Application Server Control Console. This page has a General tab, a Performance tab, and an Administration tab.
The rest of this section covers the following topics:
To get to a Web Module Home page from the OC4J Home page, select the Applications tab. From there, you can get to a Web Module Home page in one of two ways:
View applications, by selecting "Applications" in the View dropdown menu.
Select the application of interest.
In the resulting Application Home page, select the module of interest.
or:
View modules from all applications, by selecting "Modules" in the View dropdown menu.
Select the module of interest.
From a Web Module Home page, you can access the following:
General tab (the Web Module Home page itself): This lists the host, port, and context path for the Web module, as well as the module's active servlets and JSP pages. For each servlet and JSP page, the General tab page lists the following metrics:
Active Requests
Current Client Processing Time (average processing time for each request over the preceding five minutes)
Requests per Second
Requests Processed
Total Client Processing Time (since startup of the servlet or JSP page)
(These metrics are not persistent if OC4J is restarted.)
Performance tab: This page graphically displays the following metrics for servlets and JSP pages that have been executed.
Active Sessions: The number of sessions active at any given point, over the indicated period of time.
Active Requests: The number of requests active at any given point, over the indicated period of time.
Response and Load: The average request processing time over the preceding five minutes, together with the requests per second over the preceding five minutes, over the indicated period of time.
Administration tab: From this page, you can view or edit certain Web module configuration properties, view the web.xml
or orion-web.xml
file, and view or edit various kinds of mappings that relate to the Web module. Specifically, you can reach the following pages:
Configuration Properties page
View Deployment Descriptor page
View Proprietary Deployment Descriptor page
Servlet Mappings page
Filter Mappings page
Resource Reference Mappings page
EJB Reference Mappings page
Environment Entry Mappings page
See the next section, "Application Server Control Web Module Configuration Pages", for information about these pages.
For more information about the pages summarized in the preceding paragraphs, see the context-sensitive topics "Web Module Home Page", "Web Module Performance Page", and "Web Module Administration Page" in the Application Server Control online help. For more information about OC4J performance metrics, see the topic "Summary of the OC4J Performance Metrics" in the online help.
From the Web Module Administration page, you can select "Go to Task" for several viewing and editing functions related to Web module configuration. These are described in the following sections:
Notes:
|
Table A-1 discusses the Web module properties you can configure through the Configuration Properties page of the Application Server Control Console. This page is accessible from the Web Module Administration page. For additional information about the properties, see the appropriate elements under "Elements and Attributes of orion-web.xml, global-web-application.xml".
The Configuration Properties page also displays the Web module name and application name.
Also see the context-sensitive topic "Web Module Configuration Properties Page" in the Application Server Control online help.
Table A-1 Properties of the Configuration Properties Page
Application Server Control Property | Corresponding XML Entity | Description |
---|---|---|
Display Name |
|
A short name for the Web module, for display by tools. Note: This is read-only through Application Server Control |
Description |
|
An optional description of the Web module. Note: This is read-only through Application Server Control |
Distributable |
|
Indicates whether the application is distributable, as described in the servlet specification. This property is not editable through this page. Note: This is read-only through Application Server Control |
Classpath |
|
Informs OC4J of additional code locations for Web application class loading—either library files or locations for individual class files. |
Persistence Path |
|
Indicates where to store servlet Note: This attribute is ignored if OC4J clustering is enabled. |
Temporary Directory |
|
This is the path to a temporary directory that can be used by servlets and JSP pages for scratch files. The path can be either absolute, or relative to the deployment directory. |
File Modification Check Interval |
|
This attribute, in milliseconds, determines when to check a static file, such as an HTML file, to see whether its timestamp has changed and it should therefore be reloaded from the file system. The default is |
Session Timeout |
|
Defines the default session timeout for all sessions created in the Web application, in minutes. For a value of 0 or less, there is no timeout. |
Default Buffer Size |
|
Specifies the default size of the output buffer for servlet responses, in bytes. Without specifying, the default is |
Allow Directory Browsing |
|
Specifies whether to allow directory browsing for a URL that ends in " |
You can view, but not edit, the application web.xml
file and orion-web.xml
file through the View Deployment Descriptor page and View Proprietary Deployment Descriptor page, respectively, of the Application Server Control Console.
In the Servlet Mappings page of the Application Server Control Console, you can view, but not edit, mappings between servlet names and URL patterns. These mappings are described in Table A-2.
Also see the context-sensitive topic "Web Module Servlet Mappings Page" in the Application Server Control online help.
Table A-2 Properties of the Servlet Mappings Page
Application Server Control Property | Corresponding XML Entity | Description |
---|---|---|
Servlet Name |
|
A reference to the desired name of the servlet, as defined in the |
URL Pattern |
|
The desired URL pattern (servlet path) for the servlet, to map to the corresponding servlet name. The URL to invoke the servlet includes this pattern. |
Table A-3 discusses the properties you can configure for servlet filters, through the Filter Mappings page.
Also see the context-sensitive topic "Web Module Filter Mappings Page" in the Application Server Control online help.
Table A-3 Configurable Properties of the Filter Mappings Page
Application Server Control Property | Corresponding XML Entity | Description |
---|---|---|
Filter Name |
|
A reference to the desired name of the filter, as defined in the |
URL Pattern or Servlet Name |
|
This is to map either a URL pattern or a servlet name (not both) to the corresponding filter name. |
Apply to Forwards |
|
Use this for the filter to be applied to any "forward" targets matching the servlet name or URL pattern. |
Apply to Requests |
|
Use this in addition to an "Apply to Forwards" or "Apply to Includes" setting for the filter to also be applied to direct request targets matching the servlet name or URL pattern. |
Apply to Includes |
|
Use this for the filter to be applied to any "include" targets matching the servlet name or URL pattern. |
Apply to Errors |
|
Use this for the filter to be applied under the error page mechanism. |
Table A-4 discusses addition servlet filter properties that are displayed for reference in the Filter Mappings page.
Table A-4 Reference Properties of the Filter Mappings Page
Application Server Control Property | Corresponding XML Entity | Description |
---|---|---|
Name |
|
The desired name of the filter. |
Class |
|
The fully qualified name of the class containing the filter code. |
Description |
|
An optional description of the filter. |
Use the Resource Reference Mappings page to specify a JNDI location for a resource such as a data source, JMS queue, or mail session. Table A-5 shows properties you can configure in this page.
Also see the context-sensitive topic "Web Module Resource Reference Mappings" in the Application Server Control online help.
From the Resource Reference Mappings page, you can also edit a JNDI lookup context, taking you to the Resource Reference Lookup Context page, described in "Resource Reference Lookup Context Page".
Table A-5 Properties of the Resource Reference Mappings Page
Application Server Control Property | Corresponding XML Entity | Description |
---|---|---|
Name |
|
The name of the resource, which refers to the value of a |
Type |
|
The type of the data source or other resource. This is the fully qualified Java type that is implemented by the resource. |
Authorization |
|
Indicates whether sign-on to the resource manager is programmatic in the application component (Authorization value is |
JNDI Location |
|
The desired JNDI location from which to look up the resource. |
Lookup Context |
|
Specifies an optional JNDI context that will be used instead of the default context in looking up the resource. |
Use the EJB Reference Mappings page to specify a JNDI location for an EJB. Table A-6 discusses the properties in this page.
Also see the context-sensitive topic "Web Module EJB Reference Mappings Page" in the Application Server Control online help.
Table A-6 Properties of the EJB Reference Mappings Page
Application Server Control Property | Corresponding XML Entity | Description |
---|---|---|
Name |
|
The name of the EJB, which refers to the value of an |
Type |
|
The type of EJB, either |
Home Interface |
|
The fully qualified name of the home interface of the EJB. |
Remote Interface |
|
The fully qualified name of the remote interface of the EJB. |
JNDI Location |
|
The desired JNDI location from which to look up the EJB. |
Use the Environment Entry Mappings Page to set a new value for an environment entry. Table A-7 discusses the properties in this page.
Also see the context-sensitive topic "Web Module Environment Entry Mappings Page" in the Application Server Control online help.
Table A-7 Properties of the Environment Entry Mappings Page
Application Server Control Property | Corresponding XML Entity | Description |
---|---|---|
Name |
|
The name of the environment entry, and refers to the value of the |
Type |
|
The Java type of the environment entry. |
Description |
|
An optional description of the environment entry. |
Value |
|
The assembled value of the environment entry (typically from the |
Deployed Value |
|
The desired deployment value of the environment entry, to override the assembled value. The value of the |
This page is linked from the Resource Reference Mappings page, described in "Resource Reference Mappings Page", allowing you to specify a new context from which to look up a resource. You can also edit context attributes.
Also see the context-sensitive topic "Resource Reference Lookup Context Page" in the Application Server Control online help.
Table A-8 Properties of the Resource Reference Lookup Context Page
Application Server Control Property | Corresponding XML Entity | Description |
---|---|---|
Resource Reference Name |
|
The name of the resource, which refers to the value of a |
Lookup Context Location |
|
Specifies an optional JNDI context that will be used instead of the default context in looking up the resource. |
Name (of context attribute) |
|
The name of an attribute to send to a nondefault, such as third-party, JNDI context specified as the corresponding Lookup Context. |
Value (of context attribute) |
|
The desired value of the attribute. |
Standards-compliant MBeans play a role in OC4J runtime configuration. The following sections provide an overview:
OC4J support for the JMX specification allows standard interfaces to be created for managing resources dynamically, including resources relating to resource adapters, in a J2EE environment. The OC4J implementation of JMX provides a JMX client, the System MBean Browser, that you can use to manage an OC4J instance through MBeans that are provided with OC4J.
An MBean is a Java object that represents a JMX manageable resource. Each manageable resource within OC4J, such as an application or a resource adapter, is managed through an instance of the appropriate MBean. Each MBean provided with OC4J exposes a management interface that is accessible through the System MBean Browser in the Application Server Control Console. You can set MBean attributes, execute operations to call methods on an MBean, subscribe to notifications of errors or specific events, and display execution statistics.
Note: This information is provided for reference, but key Web module configuration settings are exposed in a more user-friendly manner through other features of the Application Server Control Console, as discussed under "Application Server Control Web Module Configuration Pages". |
To access the browser from the OC4J home page, select the Administration tab and then, under the list of tasks, go to the JMX task "System MBean Browser". From the browser, you can do the following:
Select the MBean of interest in the left-hand frame.
Use the Attributes tab in the right-hand frame to view or change attributes. An attribute that can be set has a field where you can type in a new value. Then apply the change.
Use the Operations tab in the right-hand frame to invoke methods on the MBean. Select the operation of interest. In the Operation window, you can invoke it with specified parameter settings.
Use the Notifications tab (where applicable) in the right-hand frame to subscribe to notifications. You can select each item for which you want notification, and then apply the changes.
Use the Statistics tab (where applicable) in the right-hand frame to display execution statistics.
Be aware that MBeans and their attributes vary regarding when changes take effect. In the runtime model, changes take effect immediately. In the configuration model, some changes take effect when the resource is restarted, others when the application is restarted, and still others when OC4J is restarted. There is also variation in whether changes are persisted.
See the Oracle Containers for J2EE Configuration and Administration Guide for details. The System MBean Browser itself also provides information about the MBeans.
OC4J exports a set of MBeans for each Web module, including the OC4J default Web application, to support administration during application runtime. Some OC4J MBeans are required in order to support the J2EE management specification, but may offer extended features. Other OC4J MBeans are Oracle extensions to the model.
Table A-9 summarizes the OC4J implementation of MBeans that relate to Web modules and are required of an application server according to JSR-77. These implementations are in the oracle.oc4j.admin.management.mbeans
package.
Notes:
|
Table A-9 Mandatory System MBeans for Web Modules
MBean | Description |
---|---|
Servlet |
Manages an instance of a servlet, with properties corresponding to a |
WebModule |
Manages standard features of a Web module, with properties corresponding to the The loadAllServletMBeans() method of the WebModule MBean creates the servlet MBeans without loading the underlying servlets. OC4J loads a servlet when it is invoked or when preloading is requested, as described under "Preloading Servlets". |
Table A-10 summarizes the OC4J MBean that relates to Web modules and is an Oracle extension. This MBean implementation is also in the oracle.oc4j.admin.management.mbeans
package.
Table A-10 Additional System MBeans for Web Modules
MBean | Description |
---|---|
OC4JWebModule |
Manages OC4J-specific features of a Web module, with properties corresponding to the |
Notes Regarding OC4J Web Module MBeans
WebModule
attributes corresponding to the following <web-app>
subelements are accessible through the Application Server Control Console: <context-param>
, <servlet-mapping>
, <filter-mapping>
, <session-timeout>
.
OC4JWebModule
attributes corresponding to the following <orion-web-app>
attributes and subelements are accessible through the Application Server Control Console: file-modification-check-interval
, directory-browsing
, <classpath>
, <resource-ref-mapping>
, <env-entry-mapping>
, <ejb-ref-mapping>
.
The following JSP-related <orion-web-app>
attributes, being global in nature, do not apply to OC4JWebModule
: jsp-cache-directory
, jsp-cache-tlds
, jsp-taglib-locations
, jsp-print-null
, jsp-timeout
.