Adobe 38000382 JRun Guide - Page 108

Editing XML files, JRun Programmer's Guide

Page 108 highlights

Editing XML files OEMs often must hide the underlying application server from customers who use their applications. They want their customers to know only about the application that is running and not about the underlying server technology. As an OEM, you or your support personnel, might need a way to access the application server settings. The most common function you might do is to programmatically edit XML files. This provides you with a very granular level of control over the behavior of JRun. For example, by editing the JRun configuration XML files (such as jrun.xml), you can add and remove services, and change the attributes of those services. You can also edit the J2EE XML files, such as web.xml and application.xml. This lets you add and remove servlet definitions, servlet filters, EJBs, security settings, and anything available in those XML files. The following table briefly describes the useful elements that you can edit in each of the XML files used by JRun: XML file jrun.xml web.xml jrun-resources.xml ejb-jar.xml jrun-web.xml application.xml Common elements Defines JRun core services, such as: • JRunServer • SchedulerService • LoggerService • JRunSecurityManagerService • ServletEngineService • MailService • DeployerService Defines web application settings, including the following: • Servlet definitions • Event listeners • Servlet filters • Security constraints • Error pages Defines resources used by the JRun server, including the following: • JMS Connection factories • JDBC data sources Defines EJBs. Defines virtual path mappings. Defines web modules and their context roots. For more information about the XML files used by JRun, see JRun Programmer's Guide. 94 Chapter 9 Editing XML Files

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116

94
Chapter 9
Editing XML Files
Editing XML files
OEMs often must hide the underlying application server from customers who use their
applications. They want their customers to know only about the application that is
running and not about the underlying server technology. As an OEM, you or your
support personnel, might need a way to access the application server settings.
The most common function you might do is to programmatically edit XML files. This
provides you with a very granular level of control over the behavior of JRun. For example,
by editing the JRun configuration XML files (such as jrun.xml), you can add and remove
services, and change the attributes of those services.
You can also edit the J2EE XML files, such as web.xml and application.xml. This lets you
add and remove servlet definitions, servlet filters, EJBs, security settings, and anything
available in those XML files.
The following table briefly describes the useful elements that you can edit in each of the
XML files used by JRun:
For more information about the XML files used by JRun, see
JRun Programmer’s Guide
.
XML file
Common elements
jrun.xml
Defines JRun core services, such as:
JRunServer
SchedulerService
LoggerService
JRunSecurityManagerService
ServletEngineService
MailService
DeployerService
web.xml
Defines web application settings, including the following:
Servlet definitions
Event listeners
Servlet filters
Security constraints
Error pages
jrun-resources.xml
Defines resources used by the JRun server, including the following:
JMS Connection factories
JDBC data sources
ejb-jar.xml
Defines EJBs.
jrun-web.xml
Defines virtual path mappings.
application.xml
Defines web modules and their context roots.