⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 package-summary.html

📁 ejb20_src_basic.rar
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!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.beanManaged (WebLogic Server 8.1 Examples)
</TITLE>
<META NAME="keywords" CONTENT="examples.ejb20.basic.beanManaged package">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style">
</HEAD>
<SCRIPT>
function asd()
{
parent.document.title="examples.ejb20.basic.beanManaged (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>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <FONT CLASS="NavBarFont1">Class</FONT>&nbsp;</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">
&nbsp;<A HREF="../../../../examples/cluster/utils/package-summary.html"><B>PREV PACKAGE</B></A>&nbsp;
&nbsp;<A HREF="../../../../examples/ejb20/basic/containerManaged/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>  &nbsp;
&nbsp;<A HREF="package-summary.html" TARGET="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;
<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.beanManaged
</H2>
This example is a package that demonstrates an
Enterprise JavaBean. 
<P>
<B>See:</B>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<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,
 which in WebLogic is implemented by the code-generated container class 
 AccountBeanC. </TD>
</TR>
</TABLE>
&nbsp;

<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.
 </TD>
</TR>
</TABLE>
&nbsp;

<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>ProcessingErrorException is thrown if the caller attempts
 to withdraw more than a certain preset limit from the account.</TD>
</TR>
</TABLE>
&nbsp;

<P>
<A NAME="package_description"><!-- --></A><H2>
Package examples.ejb20.basic.beanManaged Description
</H2>

<P>
<p>This example is a package that demonstrates an
Enterprise JavaBean. The example is an entity EJB called
<font face="Courier New" size=-1>AccountBean</font>.

<p>
The example demonstrates:
<ul>
<li>Usage of an entity EJB
<li>Bean-managed persistence; the code in the EJB
directly accesses the data storage
<li>Using application-defined exceptions
<li><a href="#Client">Client</a> application
</ul>

<a name="Client"></a><h2>Client application</h2>

The Client
application performs these steps:
<ol>
<li>Finds or creates 20 separate accounts
<li>Prints the balances for all accounts
<li>Finds all accounts with a balance greater than $5000
<li>Removes the 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>
   <dd>EJBeanManagedClient.jsp (see <a href="../../../jsp/package-summary.html">JSP</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>

<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> and <a href="weblogic-ejb-jar.xml">weblogic-ejb-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.

<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>.

<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>.
<p>Run the build script using the following Java  ant command:
<pre>prompt&gt;<b> ant</b></pre>

<p>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -