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

📄 package-summary.html

📁 ejb20_src_message.rar
💻 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.message (WebLogic Server 8.1 Examples)
</TITLE>
<META NAME="keywords" CONTENT="examples.ejb20.message package">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
</HEAD>
<SCRIPT>
function asd()
{
parent.document.title="examples.ejb20.message (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/ejb20/basic/statelessSession/package-summary.html"><B>PREV PACKAGE</B></A>&nbsp;
&nbsp;<A HREF="../../../examples/ejb20/relationships/bands/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.message
</H2>
This example is a package that demonstrates an
Enterprise Java Message Bean written to the EJB 2.0 specification. 


<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>Class Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="Client.html">Client</A></B></TD>
<TD>This class illustrates calling a Message-Driven bean and publishing
 quotes on a topic.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD WIDTH="15%"><B><A HREF="MessageTraderBean.html">MessageTraderBean</A></B></TD>
<TD>Demonstrates usage of a Message-Driven EJB.</TD>
</TR>
</TABLE>
&nbsp;

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

<P>
<p>This example is a package that demonstrates an
Enterprise Java Message Bean written to the EJB 2.0 specification. 

<p>
The example demonstrates:
<ul>
<li>Usage of an entity EJBean written to the EJB 2.0 specification
<li>Using application-defined exceptions
<li><a href="#Client">Client</a> application
</ul>

<h3>
Pre-Built Examples</h3>
<!--  ejb20_message.ear is actually in the SAMPLES_HOME\domains\examples\applications directory in Olympic Load 13, so, in fact, this example is shipped pre-built. 
<p>This EJB 2.0 example is not shipped pre-built. To run these examples, you must set up, build, and run the example, following the instructions below. 
-->
<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
<a href="Client.html">Client</a>
application performs these steps:
<ol>
<li>Calls a Message-Driven bean
<li>Publishes quotes on a topic
<li>Prints the messages to the server shell after the Client example is run
</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>Deployment
  <dd><a href="ejb-jar.xml">ejb-jar.xml</a>
  <dd><a href="weblogic-ejb-jar.xml">weblogic-ejb-jar.xml</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>
These three sections cover what to do:

<p>
<ol>
  <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="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>
The script will build the example and place the files in the
correct locations in your WebLogic Server distribution:
<ul>
 
<li>Client.jar file: in <font face="Courier New" size=-1>SAMPLES_HOME\server\examples\build\clientclasses</font>
<li>EJB (in EAR file): in <font face="Courier New" size=-1>SAMPLES_HOME\domains\examples\applications\ejb20_message.ear</font>

</ul>
<p>
Running the build script places the EJB in the <font face="Courier New"
size=-1>%applications%</font> directory, 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="../../examples.html#buildScripts">More About Building Examples</a>.

<h3><a name="Start the Examples server">Start the Examples server</a></h3>

<ol>
<li><a href=../../examples.html#startServer>Start the Examples server</a>.
<!-- Taking this out because the EJB deploys automatically when server starts; no need for manual deployment instructions
<p>
<li><a href=../../examples.html#console  >
Start the Administration Console.</a>
<p>
<li>Click the Deployments node in the left pane and select EJB. 
<p>
A list of deployed EJBs displays in the left pane. 
<p>
<li>Choose the EJB that you want to deploy from the list of deployment units. 
<p>
<li>On the Edit EJB Descriptor page in the right pane, select the Targets tab.
<p>
<li> Verify that the EJB is deployed on the examplesServer. The examplesServer should be listed in the Chosen column.
-->
</ol>
<h3><a name="Run the example"></a>Run the example</h3>

<ol>

<li>Run the client in a separate command line window. Set up your client as described in 
<a href=../../examples.html#environment>Setting up your environment</a>,
and then run the client by entering:
<!--
<pre><font face="Courier New">prompt&gt;<b> java examples.ejb20.message.Client</b></font></pre>

<p>
If you're not running the WebLogic Server with its default settings,
you will have to run the client using:
-->
<pre>  prompt&gt;<b> ant run </b> </pre>

<p>
<li>If you're running the <font face="Courier New" size=-1>Client</font> example, 
you should get output similar to this from the client application in the server shell:

<pre><font face="Courier New">In client shell:

Beginning message.Client...

End message.Client...

In server.shell:

Received new quote : BEAS 40 1/8
Received new quote : BEAS 40 1/8
Received new quote : SUNW 79 1/2
Received new quote : SUNW 79 1/2
Received new quote : IBM 82 1/4
Received new quote : IBM 82 1/4

End message.Client...
</font></pre>

</ol>
<h2>There's more...</h2>

Read more about EJB in 
<a href="http://e-docs.bea.com/wls/docs81/ejb/index.html">BEA WebLogic
Server Enterprise Java Beans</a>.
<P>

<P>
<HR>

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_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>Documentation is available at<br> <a href=http://e-docs.bea.com/wls/docs81>http://e-docs.bea.com/wls/docs81</a></td></EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../examples/ejb20/basic/statelessSession/package-summary.html"><B>PREV PACKAGE</B></A>&nbsp;
&nbsp;<A HREF="../../../examples/ejb20/relationships/bands/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>
<a href=http://e-docs.bea.com/wls/docs81/copyright.html>Copyright</a> &copy; 2003 BEA Systems, Inc. All Rights Reserved.
</BODY>
</HTML>

⌨️ 快捷键说明

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