Oracle8i Application Developer's Guide - XML Release 3 (8.1.7) Part Number A86030-01 |
|
B2B XML Application: Step by Step , 29 of 32
<?xml version="1.0" ?> <!-- | $Author: smuench $ | $Date: 2000/03/14 10:36:42 $ | $Source: C:\\cvsroot/xsql/src/XSQLConfig.xml,v $ | $Revision: 1.11 $ +--> <XSQLConfig> <!-- | | This section defines configuration settings | specific to the XSQL Servlet | +--> <servlet> <!-- | | Sets the size (in bytes) of the buffered output stream. | If your servlet engine already buffers I/O to the | Servlet Output Stream, then you can set to 0 | to avoid additional buffering. | | <output-buffer-size>10000</output-buffer-size> | +--> <output-buffer-size>0</output-buffer-size> <!-- | | Add <media-type> elements as shown below to cause | the XSQL Servlet to *suppress* sending the "charset=XXX" | portion of the Media/Content-type. | | For example, sending a character set for "image/svg" | documents seems to confuse current SVG plugins. | | <suppress-mime-charset> | <media-type>image/svg</media-type> | </suppress-mime-charset> | +--> <suppress-mime-charset> <media-type>image/svg</media-type> </suppress-mime-charset> </servlet> <!-- | | This section defines XSQL Page Processor configuration settings. | +--> <processor> <!-- | | Connection definitions (see <connectiondefs> below) | are cached when the XSQL Page Processor is initialized. | | Set to "yes" to cause the processor to | reread the XSQLConfig.xml file to reload | connection definitions if an attempt is made | to request a connection name that's not in the | cached connection list. The "yes" setting is useful | during development when you might be adding new | <connection> definitions to the file while the | servlet is running. Set to "no" to avoid reloading | the connection definition file when a connection name | is not found in the in-memory cache. | +--> <reload-connections-on-error>yes</reload-connections-on-error> <!-- | | Set the default value of the Row Fetch Size | for retrieving information from SQL queries | from the database. Only takes effect if you | are using the Oracle JDBC Driver, otherwise | the setting is ignored. Useful for reducing | network roundtrips to the database from | the servlet engine running in a different tier. | | <default-fetch-size>50</default-fetch-size> | +--> <default-fetch-size>50</default-fetch-size> <!-- | | Set the value of the XSQL LRU Cache for XSQL Pages | This determines the maximum number of stylesheets | that will be cached. Least recently used sheets get | "bumped" out of the cache if you go beyond this number. | | <page-cache-size>25</page-cache-size> | +--> <page-cache-size>25</page-cache-size> <!-- | | Set the value of the XSQL LRU Cache for XSL Stylesheets. | This determines the maximum number of stylesheets | that will be cached. Least recently used sheets get | "bumped" out of the cache if you go beyond this number. | | <stylesheet-cache-size>25</stylesheet-cache-size> | +--> <stylesheet-cache-size>25</stylesheet-cache-size> <!-- | | Set the parameters controlling stylesheet pools. | | Each cached stylesheet is actually a cached pool | of stylesheet instances. These values control | The initial number of stylesheet instances in the | pool, the number that will be added/incremented | when under-load the pool must be grown, and | the number of seconds that must transpire without | activity before a stylesheet instance will be | dropped out of the pool to shrink it back towards | its initial number. | | <stylesheet-pool> | <initial>1</initial> | <increment>1</increment> | <timeout-seconds>60</timeout-seconds> | </stylesheet-pool> | +--> <stylesheet-pool> <initial>1</initial> <increment>1</increment> <timeout-seconds>60</timeout-seconds> </stylesheet-pool> <!-- | | Set the parameters controlling database connection pools. | | When used, each named connection defined can have a pool of | connection instances to share among requests. These values | control The initial number of stylesheet instances in the pool, | the number that will be added/incremented when under-load the | pool must be grown, and the number of seconds that must | transpire without activity before a stylesheet instance will be | dropped out of the pool to shrink it back towards its initial | number. | | If the "dump-allowed" element has the value "yes" | then a browser-based status report that dumps the | current state of the connection pools is enabled. | | <connection-pool> | <initial>2</initial> | <increment>1</increment> | <timeout-seconds>60</timeout-seconds> | <dump-allowed>no</dump-allowed> | </connection-pool> | +--> <connection-pool> <initial>2</initial> <increment>1</increment> <timeout-seconds>60</timeout-seconds> <dump-allowed>no</dump-allowed> </connection-pool> <!-- | | Include timing information (in Milliseconds) | | <timing-info> | <page>yes</page> | <action>yes</action> | </timing-info> | +--> <timing-info> <page>no</page> <action>no</action> </timing-info> </processor> <!-- | | This section defines HTTP Proxy Server name | and port for use by the <xsql:include-xml> | action. If you intend to use <xsql:include-xml> | to include XML from URL's outside a firewall, | uncomment the: | | <http> | <proxyhost>your-proxy-server.yourcompany.com</proxyhost> | <proxyport>80</proxyport> | </http> | | section below and change the proxyhost and proxyport | as appropriate. If left commented out, then the XSQL | Page processor does not use a proxy server. | +--> <!-- <http> <proxyhost>your-proxy-server.yourcompany.com</proxyhost> <proxyport>80</proxyport> </http> --> <!-- | | This section defines convenient "nicknames" for | one or more database connections. You can include | any number of <connection> elements inside of | the <connectiondefs> element. XSQL Pages refer to | these connections by their name in the "connection" | attribute on the document element of the page. | +--> <connectiondefs> <connection name="demo"> <username>scott</username> <password>tiger</password> <dburl>jdbc:oracle:thin:@localhost:1521:ORCL</dburl> <driver>oracle.jdbc.driver.OracleDriver</driver> </connection> <connection name="xmlbook"> <username>xmlbook</username> <password>xmlbook</password> <dburl>jdbc:oracle:thin:@localhost:1521:ORCL</dburl> <driver>oracle.jdbc.driver.OracleDriver</driver> </connection> <connection name="lite"> <username>system</username> <password>manager</password> <dburl>jdbc:Polite:POlite</dburl> <driver>oracle.lite.poljdbc.POLJDBCDriver</driver> </connection> <connection name="retail"> <username>retailer</username> <password>retailer</password> <dburl>jdbc:oracle:thin:@atp-1.us.oracle.com:1521:ORCL</dburl> <driver>oracle.jdbc.driver.OracleDriver</driver> </connection> </connectiondefs> <!-- | | This section registers pre-defined element names and | handler classes for user-defined XSQL page actions | | The section looks like: | | <actiondefs> | <action> | <elementname>myAction</elementname> | <handlerclass>mypackage.MyActionHandler</handlerclass> | </action> | : | <actiondefs> | | Action Handler classes must implement the interface | oracle.xml.xsql.XSQLActionHandler. | | Once registered here, user-defined actions can be | used in the same way as built-in XSQL actions, for example | including the <xsql:myAction> element in your page. | +--> <actiondefs> <action> <elementname>param</elementname> <handlerclass>oracle.xml.xsql.actions.ExampleGetParameterHandler</handlerclass> </action> <action> <elementname>current-date</elementname> <handlerclass>oracle.xml.xsql.actions.ExampleCurrentDBDateHandler</handlerclass> </action> </actiondefs> </XSQLConfig>
The message header script is given here:
package B2BDemo; /** * Describes the headers used in the messages * * @author Olivier LE DIOURIS - Partner Technical Services - Oracle Copr. */ public class MessageHeaders extends Object { public static String APP_A = "RETAIL"; public static String APP_B = "SUPPLY"; public static String BROKER = "BROKER"; public static String EXIT = "EXIT"; public static String NEW_ORDER = "NEW ORDER"; public static String UPDATE_ORDER = "UPDATE ORDER"; }
package B2BDemo; /** * Holds the constants to be used by the Message Broker * * @author Olivier LE DIOURIS - Partner Technical Services - Oracle Copr. */ public class AppCste extends Object { public final static String AQDBUrl = "jdbc:oracle:thin:@atp-1.us.oracle.com:1521:ORCL"; public final static String AQuser = "aqMessBrok"; public final static String AQpswd = "aqMessBrok"; }
|
Copyright © 1996-2000, Oracle Corporation. All Rights Reserved. |
|