📄 ch06.html
字号:
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Chapter 6. Customizing JAWS</title><link rel="stylesheet" href="styles.css" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/styles.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets Vimages/callouts/"><link rel="home" href="index.html" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/index.html" title="JBoss 3.0 Documentation"><link rel="up" href="index.html" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/index.html" title="JBoss 3.0 Documentation"><link rel="previous" href="ch05s11.html" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/ch05s11.html" title="Discussion: container-managed persistence"><link rel="next" href="ch06s02.html" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/ch06s02.html" title="Specifying a datasource"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table border="0" cellpadding="0" cellspacing="0" height="65"><tr height="65"><td rowspan="2"><img src="jboss.gif" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/jboss.gif" border="0"></td><td rowspan="2" background="gbar.gif" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/gbar.gif" width="100%" align="right" valign="top"><a href="index.html" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/index.html"><img src="doc.gif" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/doc.gif" border="0"></a><a href="index.html" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/index.html"><img src="toc.gif" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/toc.gif" border="0"></a><a href="ch05s11.html" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/ch05s11.html"><img src="prev.gif" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/prev.gif" border="0"></a><a href="ch06s02.html" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/ch06s02.html"><img src="next.gif" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/next.gif" border="0"></a></td></tr><tr></tr></table><div class="chapter"><div class="titlepage"><div><h2 class="title"><a name="jaws"></a>Chapter 6. Customizing JAWS</h2></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="ch06.html#d0e2040" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/ch06.html#d0e2040">Introduction</a></dt><dt><a href="ch06s02.html" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/ch06s02.html">Specifying a datasource</a></dt><dt><a href="ch06s03.html" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/ch06s03.html">JAWS Options</a></dt><dt><a href="ch06s04.html" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/ch06s04.html">Telling JAWS about your tables</a></dt><dt><a href="ch06s07.html" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/ch06s07.html">Declaring finders</a></dt><dt><a href="ch06s13.html" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/ch06s13.html">Defining a type mapping</a></dt><dt><a href="ch06s14.html" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/ch06s14.html">Dependant Value Objects [since JBoss 2.4]</a></dt></dl></div><p>Author:<span class="author">Sebastien Alborini</span>
<tt><<a href="mailto:sebastien.alborini@m4x.org">sebastien.alborini@m4x.org</a>></tt>
</p><p>JBoss 2.2 compliance checked by:<span class="author">Vincent Harcq</span>
<tt><<a href="mailto:vincent.harcq@hubmethods.com">vincent.harcq@hubmethods.com</a>></tt>
</p><div class="section"><a name="d0e2040"></a><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="d0e2040"></a>Introduction</h2></div></div><p>JAWS is the O/R mapper used by JBoss to manage CMP entity beans. JAWS is configured in a file
named standardjaws.xml, located in the conf/config-name directory in the JBoss distribution.
The default “config-name” is “default”.</p><p>This file configures JAWS for all JBoss. You can then extend
this configuration on a per-application basis by putting a jaws.xml
file in the META-INF directory of your application. Upon deploying
your beans, JAWS will first process the standardjaws.xml file, and
then the jaws.xml file for your application if provided.Please note
that if your are bundling your jar archive into an ear archive for
deployment the jaws.xml file still must be put into the META-INF
directory of the <span class="emphasis"><i>jar</i></span> archive.
</p><p>Here is what you can do with standardjaws.xml / jaws.xml:</p><div class="itemizedlist"><ul><li><p><a name="d0e2059"></a> Specify a datasource and the type-mappings to use with it
</p></li><li><p><a name="d0e2062"></a> Set a bunch of options concerning jaws behavior
</p></li><li><p><a name="d0e2065"></a> Specify how JAWS should build/use your tables
</p></li><li><p><a name="d0e2068"></a> Define finders to access you entity beans
</p></li><li><p><a name="d0e2071"></a> Define a type mapping
</p></li></ul></div><p>If you want to know everything about jaws.xml, see the Jaws.xml DTD. The
general structure of the jaws.xml can be found here. All parts of
this file are optional: you only provide what you need!</p><p>Download and install the full source code as explain in <a href="ch01s08.html" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/ch01s08.html" title="Downloading the Documentation Example Source">the section called “Downloading the Documentation Example Source”</a></p><p>Run "ant cmp-jaws-compile" from the "build/" subdirectory. This will create a ejb jar
"documentation-example/build-examples/cmp-jaws/ejb/class.jar". Drop it in the "deploy" directory of your
JBoss installation. This example shows all possibilities described in this chapter. You may wqnt to change
the files as you read this chapter, simply rebuild in EJB jar and deploy it to see the changes.</p></div></div><table border="0" cellpadding="0" cellspacing="0" height="65"><tr height="65"><td rowspan="2"><img src="gbar.gif" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/gbar.gif" width="432" height="79"></td><td rowspan="2" background="gbar.gif" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/gbar.gif" width="100%" align="right" valign="top"><a href="index.html" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/index.html"><img src="doc.gif" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/doc.gif" border="0"></a><a href="index.html" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/index.html"><img src="toc.gif" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/toc.gif" border="0"></a><a href="ch05s11.html" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/ch05s11.html"><img src="prev.gif" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/prev.gif" border="0"></a><a href="ch06s02.html" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/ch06s02.html"><img src="next.gif" tppabs="http://www.huihoo.org/jboss/online_manual/3.0/next.gif" border="0"></a></td></tr><tr></tr></table></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -