📄 package-summary.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Fri Dec 05 15:19:24 PST 2003 -->
<TITLE>
examples.ejb20.basic.containerManaged (WebLogic Server 8.1 Examples)
</TITLE>
<META NAME="keywords" CONTENT="examples.ejb20.basic.containerManaged package">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
</HEAD>
<SCRIPT>
function asd()
{
parent.document.title="examples.ejb20.basic.containerManaged (WebLogic Server 8.1 Examples)";
}
</SCRIPT>
<BODY BGCOLOR="white" onload="asd();">
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</td><td valign=bottom align=right><b>WebLogic Server 8.1 Code Examples</b>, BEA Systems, Inc.</td></EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../examples/ejb20/basic/beanManaged/package-summary.html"><B>PREV PACKAGE</B></A>
<A HREF="../../../../examples/ejb20/basic/statefulSession/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="package-summary.html" TARGET="_top"><B>NO FRAMES</B></A>
<SCRIPT>
<!--
if(window==top) {
document.writeln('<A HREF="../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<H2>
Package examples.ejb20.basic.containerManaged
</H2>
This example is a package that demonstrates an
Enterprise JavaBean written to the EJB 2.0 specification.
<P>
<B>See:</B>
<BR>
<A HREF="#package_description"><B>Description</B></A>
<P>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Interface Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="Account.html"><I>Account</I></A></B></TD>
<TD>The methods in this interface are the public face of AccountBean.
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="AccountHome.html"><I>AccountHome</I></A></B></TD>
<TD>This interface is the home interface for the EJBean AccountBean. </TD>
</TR>
</TABLE>
<P>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Class Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="AccountBean.html">AccountBean</A></B></TD>
<TD>AccountBean is an EntityBean. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="Client.html">Client</A></B></TD>
<TD>This class demonstrates calling an entity EJBean,
followed by two exercises:
Part A: Create an Account and Deposit some money into it. </TD>
</TR>
</TABLE>
<P>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Exception Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="ProcessingErrorException.html">ProcessingErrorException</A></B></TD>
<TD>This class is used with the WebLogic EJBean container-managed example package.
</TD>
</TR>
</TABLE>
<P>
<A NAME="package_description"><!-- --></A><H2>
Package examples.ejb20.basic.containerManaged Description
</H2>
<P>
<p>This example is a package that demonstrates an
Enterprise JavaBean written to the EJB 2.0 specification.
The example is an entity EJB called
<font face="Courier New" size=-1>AccountBean</font>.
<p>
The example demonstrates:
<ul>
<li>Use of an entity EJB written to the EJB 2.0 specification
<li>Container-managed JDBC persistence; the code in the EJB
never directly accesses the data storage
<li>Using WebLogic's EJB finders to find both single and Collections of accounts
<li>Using application-defined exceptions
<li><a href="#Client">Client</a> application
</ul>
<h3>
Pre-Built Examples</h3>
<p>This EJB 2.0 example is shipped pre-built. However, if you want to re-run this example, you can build it following the instructions in <a href="#Build the example">Build the example</a> and then re-run it following the instructions in <a href="#Run the example">Run the example</a>.
<a name="Client"></a><h2>Client application</h2>
The Client
application performs these steps:
<ol>
<li>Finds or creates 20 separate accounts
<li>Displays the balance for each account
<li>Finds all accounts with balances over $5000
<li>Finds the first account with a balance of zero
<li>Finds any accounts with a null type
<li>Removes all accounts
</ol>
<p>
To get the most out of this example, first read through the source
code files.
<ul>
<li>Client applications
<dd><a href="Client.java">Client.java</a>
<p>
<li>Interfaces
<dd><a href="Account.java">Account.java</a>
<dd><a href="AccountHome.java">AccountHome.java</a>
<p>
<li>Deployment
<dd><a href="ejb-jar.xml">ejb-jar.xml</a>
<dd><a href="weblogic-ejb-jar.xml">weblogic-ejb-jar.xml</a>
<dd><a href="weblogic-cmp-rdbms-jar.xml">weblogic-cmp-rdbms-jar.xml</a>
<p>
<li>Exception
<dd><a href="ProcessingErrorException.java">ProcessingErrorException.java</a>
<p>
<li> Server (EJB)
<dd><a href="AccountBean.java">AccountBean.java</a>
</ul>
Start with the XML deployment files <a href="ejb-jar.xml">ejb-jar.xml</a>, <a href="weblogic-ejb-jar.xml">weblogic-ejb-jar.xml</a> and <a href="weblogic-cmp-rdbms-jar.xml">weblogic-cmp-rdbms-jar.xml</a> to find the general
structure of the EJB, which classes are used for the different
objects and interfaces, then look at <a href="Client.java">Client</a> code to see how the application works.
<p>
These four sections cover what to do:
<p>
<ol>
<li><a href="#Set up the database">Set up the database</a>
<li><a href="#Build the example">Build the example</a>
<li><a href="#Start the Examples server">Start the Examples server</a>
<li><a href="#Run the example">Run the example</a>
</ol>
<h3><a name="Set up the database">Set up the database</a></h3>
<p>
This example is preconfigured to work with the PointBase database, included with the WebLogic Server distribution. As you'll use a database for the persistent storage of the entity EJB,
you'll need to set it up.
The persistent storage is completely invisible to the client;
the actual storage is handled by the EJB directly and not the
container.
<p>
With database persistence, each instance of an EJB is written to a
row in a table.
If you want or need to run this example with Oracle, see <a href=../../../database_setup.html>Database SetUp</a> for instructions.
<h3><a name="Build the example">Build the example</a></h3>
Set up your development shell as described in
<a href=../../../examples.html#environment>Setting up your environment</a>.
<p>
We provide a build script for you to build the example:
<p>The build script is <b><a href="build.xml">build.xml</a></b>.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -