📄 package-summary.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Fri Dec 15 15:32:49 PST 2000 -->
<TITLE>
WebLogic Server 6.0 Examples: Package examples.ejb.basic.beanManaged
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../examples/stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 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="../../../../examples/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 6.0 Code Examples</b>, BEA Systems, Inc.</td></EM>
</TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<H2>
Package examples.ejb.basic.beanManaged
</H2>
This example is a package that demonstrates an
Enterprise JavaBean.
<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.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="Servlet.html">Servlet</A></B></TD>
<TD>This servlet is a program similar to that in the <a href="Client.html">Client</a> example.</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>ProcessingErrorException is thrown if the caller attempts to withdraw more than a certain preset limit from the account.</TD>
</TR>
</TABLE>
<P>
<A NAME="package_description"><!-- --></A><H2>
Package examples.ejb.basic.beanManaged Description
</H2>
<P>
<p>This example is a package that demonstrates an
Enterprise JavaBean. The example is an entity EJBean called
<font face="Courier New" size=-1>AccountBean</font>.
<p>
The example demonstrates:
<ul>
<li>Usage of an entity EJBean
<li>Bean-managed persistence; the code in the EJBean
directly accesses the data storage
<li>Using application-defined exceptions
<li><a href="#Client">Client</a> application
<li><a href="Servlet.html">Servlet</a>
</ul>
<a name="Client"></a><h2>Client application</h2>
The
<a href="Client.html">Client</a>
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>
The <a href="Servlet.html">Servlet</a>
runs in a similar fashion to the <a href="Client.html">Client</a> example.
Call the servlet using an appropriate URL as described in the
<a href="Servlet.html">servlet directions</a>. See <a href="#Run the example">Run the example</a> for sample servlet output.
<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><a href="Servlet.java">Servlet.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>
<p>
<li>Exception
<dd><a href="ProcessingErrorException.java">ProcessingErrorException.java</a>
<p>
<li> Server (EJBean)
<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 EJBean, 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>
As you'll use a database for the persistent storage of the entity EJBean,
you'll need to set it up.
Note that the persistent storage is completely invisible to the client;
the actual storage is handled by the EJBean directly and not the
container.
<p>
This example is shipped "pre-built"; you can either run it
as shipped, or build the example and run it to test that you are able to successfully
build and run EJBeans.
<p>
These three sections cover what to do:
<p>
<ol>
<li><a href="#Build the example">Build the example</a>
<li><a href="#Configure the server">Configure the server</a>
<li><a href="#Run the example">Run the example</a>
</ol>
<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 separate build scripts for Windows NT and UNIX:
<ul>
<li><b><a href="build.cmd">build.cmd</a></b> for Windows NT
<p>
<li><b><a href="build.sh">build.sh</a></b> for UNIX
</ul>
<p>
These scripts build the example and place the files in the
correct locations in your WebLogic Server distribution:
<ul>
<li>Client files: in <font face="Courier New" size=-1>/config/examples/clientclasses/</font>
<li>Servlet: in <font face="Courier New" size=-1>/config/examples/applications/examplesWebApp/WEB-INF/Classes/</font>
<li>EJBean: in <font face="Courier New" size=-1>/config/examples/applications/ejb_basic_beanManaged.jar</font>
</ul>
<p>
Running the build script places the EJB in <font face="Courier New"
size=-1>/config/examples/applications</font>, where it automatically
deploys once the server is started. If you are already running the server and build
another EJB, it is automatically placed in this directory and instantly deployed.
<p>
Additional information on using the build scripts
is found in <a href="../../building.html">Building Enterprise JavaBean examples</a>
<h3><a name="Configure the server">Configure the server</a></h3>
<ol>
<li><a href=../../../examples.html#startServer>Start the WebLogic Server</a>.
<p>
<li><a href=../../../examples.html#AdministrationConsole >
Start the Administration Console.</a>
<p>
<li>Click to expand the Deployments node in the left pane and select EJB Deployments.
<p>
A list of deployed EJBs displays.
<p>
<li>Choose the appropriate deployment unit from the list.
<p>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -