web server - Borland Technical Publications
web server - Borland Technical Publications web server - Borland Technical Publications
Creating and Deploying a DAR You deploy the DAR containing the descriptor file just as you would any other J2EE module using either the Console or command-line utilities, or as part of an EAR. You can deploy any number of distinctly named DARs in the same Partition or to a BES cluster. Should two or more deployed DARs have resource object definitions with identical JNDI names, the last deployed module overwrites any existing object binding on the same node. Once deployed, resource objects defined in the DAR can be examined in the Naming Service namespace using the JNDI Browser. See Chapter 9, “Using the JNDI Browser” for details on using the browser. Migrating to DARs from previous versions of Borland Enterprise Server Previous product versions, including IAS 4.1 and BAS 4.5, did not have a DAR module to contain the jndi-definitions.xml descriptor. If you have a customized jndidefinitions.xml file that needs to be transferred to Borland Enterprise Server, follow these migration steps: 1 If you want the entire contents of the default resources overridden, make a temporary directory called META-INF and place your existing jndi-definitions.xml file within it. 2 Open a command window and use the following jar command: prompt>jar uvMf default-resources.dar META-INF/jndi-definitions.xml 3 Now deploy this module following the usual procedures. If you have performed only a few customizations on your old jndi-definitions.xml file then it may be easier to simply move the appropriate XML stanzas from the old file into the one contained within the pre-deployed DAR. Creating and Deploying a DAR The DDEditor walks you through creating a new JNDI Definitions Module. Open the DDEditor and select “File|New...” The Object Gallery appears. Figure 21.1 Object Gallery Select the JNDI Definitions tab and select JNDI Definitions Archive to create a new DAR. Click OK. You may now add JDBC datasources or add JMS resources. Or, you may do this later. When you are finished save the module by choosing “File|Save...”. Chapter 21: Connecting to Resources with BES: using the Definitions Archive (DAR) 193
Disabling and Enabling a Deployed DAR After saving the archive, use the J2EE Deployment Wizard to deploy the module. The wizard reads resource definitions from the DAR and binds them to the Naming Service of the target partition(s). To start the wizard, open the Console and select “Wizards| Deployment Wizard.” Follow the on-screen instructions. Disabling and Enabling a Deployed DAR Once a DAR module is deployed to a partition, it is enabled. This means that its resource object definitions are bound to the Naming Service of the partition for as long as the Naming Service remains active. Enabling a DAR module rebinds its resource object definitions to the Naming Service and in the process overwrites any pre-existing content for JNDI names specified. Disabling a DAR module has no immediate impact on the contents of an active Naming Service. Upon a subsequent restart of the partition, disabled DARs are not deployed to the partition, that is, resource object definitions are not bound to the Naming Service. By default, the Naming Service stores object bindings in memory. Each time the host partition is restarted, resource object bindings from previously deployed DARs are destroyed. If the Naming Service is configured with a JDBC backing store, resource object bindings for all DARs are retained, even those that were once deployed but now marked disabled. Use the JNDI Browser to locate and permanently remove these bindings. To manipulate a deployed DAR module, use the Console to select it from the set of Deployed Modules for a partition, right-click and choose the appropriate action. Packaging DAR Modules in an Application EAR Note Sometimes it is useful to package all archives that make up a complete application into a single deployable unit. The common scenario is that you have some EJBs in an EJB Archive, some servlets and JSPs in a Web Archive and they both depend on some datasources or JMS administrative objects defined in a DAR. Using the Archive Tools in the Console it is easy to package a set of individual archives into a single EAR Module. Because DARs are not a part of the J2EE specification, you must include at least one other valid J2EE module along with your DAR within the EAR. An EAR containing only a DAR file is not a valid J2EE archive. 194 BES Developer’s Guide
- Page 153 and 154: 142 BES Developer’s Guide
- Page 155 and 156: Setting Properties J2EE 1.3 Entity
- Page 157 and 158: Setting Properties Figure 16.2 Edit
- Page 159 and 160: Setting Properties Table 16.1 ejb.m
- Page 161 and 162: Setting Properties Table 16.3 Table
- Page 163 and 164: Setting Properties Security Propert
- Page 165 and 166: Aggregate Functions in EJB-QL Selec
- Page 167 and 168: Support for ORDER BY Support for OR
- Page 169 and 170: Overriding SQL generated from EJB-Q
- Page 171 and 172: Container-managed data access suppo
- Page 173 and 174: 162 BES Developer’s Guide
- Page 175 and 176: Generating primary keys from a cust
- Page 177 and 178: Implementing primary key generation
- Page 179 and 180: Transaction manager services Consis
- Page 181 and 182: Transaction manager services When t
- Page 183 and 184: Transaction manager services Follow
- Page 185 and 186: Declarative transaction management
- Page 187 and 188: Declarative transaction management
- Page 189 and 190: JDBC API Modifications JDBC API Mod
- Page 191 and 192: Handling of EJB exceptions Applicat
- Page 193 and 194: 182 BES Developer’s Guide
- Page 195 and 196: Client View of an MDB Client View o
- Page 197 and 198: Clustering of MDBs This is yet anot
- Page 199 and 200: Error Recovery Redelivered messages
- Page 201 and 202: 190 BES Developer’s Guide
- Page 203: JNDI Definitions Module Important s
- Page 207 and 208: Configuring JDBC Datasources In the
- Page 209 and 210: Configuring JDBC Datasources To add
- Page 211 and 212: Defining the Connection Pool Proper
- Page 213 and 214: Defining the Connection Pool Proper
- Page 215 and 216: Descriptions of Borland Enterprise
- Page 217 and 218: Advanced Topics for Defining JDBC D
- Page 219 and 220: Connecting to JDBC Resources from J
- Page 221 and 222: Configuring JMS Connection Factorie
- Page 223 and 224: Defining Connection Pool Properties
- Page 225 and 226: Obtaining JMS Connection Factories
- Page 227 and 228: JMS and Transactions and its accomp
- Page 229 and 230: JMS and Transactions For instance:
- Page 231 and 232: 220 BES Developer’s Guide
- Page 233 and 234: Configuring JMS administered object
- Page 235 and 236: Tibco Creating Clustered JMS Servic
- Page 237 and 238: Sonic serverUrl String localhost:72
- Page 239 and 240: Sonic Creating Clustered JMS Servic
- Page 241 and 242: OpenJMS Even though OpenJMS can be
- Page 243 and 244: OpenJMS Important If you use OpenJM
- Page 245 and 246: OpenJMS openjms.clean_messages_on_s
- Page 247 and 248: OpenJMS Table 24.1 Property Name De
- Page 249 and 250: Other JMS providers The following a
- Page 251 and 252: 240 BES Developer’s Guide
- Page 253 and 254: Creating the Interceptor Class For
Disabling and Enabling a Deployed DAR<br />
After saving the archive, use the J2EE Deployment Wizard to deploy the module. The<br />
wizard reads resource definitions from the DAR and binds them to the Naming Service<br />
of the target partition(s). To start the wizard, open the Console and select “Wizards|<br />
Deployment Wizard.” Follow the on-screen instructions.<br />
Disabling and Enabling a Deployed DAR<br />
Once a DAR module is deployed to a partition, it is enabled. This means that its<br />
resource object definitions are bound to the Naming Service of the partition for as long<br />
as the Naming Service remains active. Enabling a DAR module rebinds its resource<br />
object definitions to the Naming Service and in the process overwrites any pre-existing<br />
content for JNDI names specified. Disabling a DAR module has no immediate impact<br />
on the contents of an active Naming Service. Upon a subsequent restart of the<br />
partition, disabled DARs are not deployed to the partition, that is, resource object<br />
definitions are not bound to the Naming Service. By default, the Naming Service stores<br />
object bindings in memory. Each time the host partition is restarted, resource object<br />
bindings from previously deployed DARs are destroyed. If the Naming Service is<br />
configured with a JDBC backing store, resource object bindings for all DARs are<br />
retained, even those that were once deployed but now marked disabled. Use the JNDI<br />
Browser to locate and permanently remove these bindings.<br />
To manipulate a deployed DAR module, use the Console to select it from the set of<br />
Deployed Modules for a partition, right-click and choose the appropriate action.<br />
Packaging DAR Modules in an Application EAR<br />
Note<br />
Sometimes it is useful to package all archives that make up a complete application into<br />
a single deployable unit. The common scenario is that you have some EJBs in an EJB<br />
Archive, some servlets and JSPs in a Web Archive and they both depend on some<br />
datasources or JMS administrative objects defined in a DAR. Using the Archive Tools<br />
in the Console it is easy to package a set of individual archives into a single EAR<br />
Module.<br />
Because DARs are not a part of the J2EE specification, you must include at least one<br />
other valid J2EE module along with your DAR within the EAR. An EAR containing only<br />
a DAR file is not a valid J2EE archive.<br />
194 BES Developer’s Guide