Affordable volume is enough - IC4J (End)

zhaozj2021-02-17  146

Twteg, can the WAR file be released as a web application? Of course, if you want to be released by web mode, you can use the default OC4J configuration. Here are two steps: First, tell the container WAR file where is released. Use the editor to open the /Config /Application.xml file, add the tab to define the WAR file properties. Tell the OC4J HTTP server about how to access the deployed WAR files through the URL. Open the /config/http-web-site.xml file with the editor. Add the tag and define properties for your web program. Note that the Application property must be defined as "default" because the release is the default application. The Name property should match the ID attribute defined by your web program. WAR file is published by the OC4J and can access the / hrweb directory through the browser. If you are using an Oracle application server instead of an OC4J standalone version, you should publish the WAR file by administering the console.

Twenty-three, where can I place my shared class library so that they can access the app I publish?

OC4J is configured with a default shared directory, the directory is / AppLib. Any class library can be placed in this directory, which is available to the application on the OC4J can be accessed.

The shared directory defines in the tab of the /Config /Application.xml file:

The SESE WILL Accesible for the servlets, EJBS ETC ->

...

More questions about loading classes and packages, refer to OTN's document http://otn.oracle.com/tech/java/oc4j/pdf/classloadinginoc4j_wp.pdf.

Twenty-four, how do I use XML parsers like Xerces in OC4J? The OC4J has come with an Oracle XML parser. Oracle XML parser is fully compatible with JAXP 1.1 standards, which can serve applications where JAXP functions are required. This way does not need to download, install, and configure other XML parsers.

Oracle XML parser (XMLParserv2.jar) The default is loaded with the OC4J system-level library, implemented by the Manifest.mf file containing Oc4j.jar. This mechanism allows the Oracle XML parser for all ordinary publishing and packaging. But you can't modify the manifest.mf file of Oc4j.jar.

It should be noted that it is not supported by modifying the OC4J profile to run other XML parsers or JDBC libraries. We have successfully replaced the system-level XML parser and the JDBC driver, and reload it on this product. But we don't support freely move the test and certified class libraries, which will cause unexpected system actions, and system errors.

If you must insist on using a third-party XML parser like Xerces, the Xerces.jar file must be loaded in the OC4J system level path when the OC4J starts. You can use JRE's XBootClassPath tag to achieve this:

Java-xbootclasspath / a: d: / xerces/xerces.jar -jar oc4j.jar

Returning again, it is not allowed to have a configuration.

Twenty-five, can I publish a data source file with my app?

Yes, secure files (such as passwords) and data source files should be packaged in your application, saved as EAR files. These files are used by OC4J to establish a connection or verify user information. In addition, Oracle JDeveloper has been standardized when the application is required to publish the application.

To achieve this (package), you should provide all the files who want to bundle, and put in the same directory with the Application.xml file. In addition, there must be an Orion-Application.xml file that references these things.

If the data-sources.xml file is also included in the application, Data-Sources.xml should include a series of configuration information about the connection database.

The EAR file structure should be like this:

/ META-INF

Application.xml

Orion-Application.xml

Data-Sources.xml

WebModule.war

EjBModule.jar

For example, the Orion-Application.xml file contains the entry of the reference to the local Data-Sources.xml file:

At the time of posting, the OC4J refers to the contents of Orion-Application.xml. It will copy Data-Sources.xml in the EAR file and use it as a data source configuration file for the application. (Please pay attention! Quote, transfer this article to note: rosen Jiang and the source: http://blog.9cbs.net/ROSEN

转载请注明原文地址:https://www.9cbs.com/read-31443.html

New Post(0)