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

📄 lib0024.html

📁 java外企软件工程师就业班 J2EE方向 《J2EE架构师手册》 电子书
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<p class="table-para">Java-compliant only</p>
</td><td class="td" align="left">
<p class="table-para">Any</p>
</td><td class="td" align="left">
<p class="table-para">Any</p>
</td><td class="td" align="left">
<p class="table-para">Java-compliant only</p>
</td><td class="td" align="left">
<p class="table-para">Any</p>
</td><td class="td" align="left">
<p class="table-para">Any</p>
</td>
</tr>
<tr valign="top">
<td class="td" align="left">
<p class="table-para">
<b class="bold">Communication method supported</b>
</p>
</td><td class="td" align="left">
<p class="table-para">Synch. only.</p>
</td><td class="td" align="left">
<p class="table-para">Both</p>
</td><td class="td" align="left">
<p class="table-para">Both only</p>
</td><td class="td" align="left">
<p class="table-para">Synch. only</p>
</td><td class="td" align="left">
<p class="table-para">Synch. only</p>
</td><td class="td" align="left">
<p class="table-para">Synch.</p>
</td>
</tr>
<tr valign="top">
<td class="td" align="left">
<p class="table-para">
<b class="bold">Coupling</b>
</p>
</td><td class="td" align="left">
<p class="table-para">Tight</p>
</td><td class="td" align="left">
<p class="table-para">Loose</p>
</td><td class="td" align="left">
<p class="table-para">Loose</p>
</td><td class="td" align="left">
<p class="table-para">Tight</p>
</td><td class="td" align="left">
<p class="table-para">Loose</p>
</td><td class="td" align="left">
<p class="table-para">Loose</p>
</td>
</tr>
<tr valign="top">
<td class="td" align="left">
<p class="table-para">
<b class="bold">Transaction support</b>
</p>
</td><td class="td" align="left">
<p class="table-para">Local and JTA</p>
</td><td class="td" align="left">
<p class="table-para">Local and JTA</p>
</td><td class="td" align="left">
<p class="table-para">Local</p>
</td><td class="td" align="left">
<p class="table-para">Local</p>
</td><td class="td" align="left">
<p class="table-para">Local</p>
</td><td class="td" align="left">
<p class="table-para">Local</p>
</td>
</tr>
<tr valign="top">
<td class="td" align="left">
<p class="table-para">
<b class="bold">Requires J2EE container?</b>
</p>
</td><td class="td" align="left">
<p class="table-para">Yes</p>
</td><td class="td" align="left">
<p class="table-para">No</p>
</td><td class="td" align="left">
<p class="table-para">No</p>
</td><td class="td" align="left">
<p class="table-para">No</p>
</td><td class="td" align="left">
<p class="table-para">No</p>
</td><td class="td" align="left">
<p class="table-para">No</p>
</td>
</tr>
<tr valign="top">
<td class="td" align="left">
<p class="table-para">
<b class="bold">Support clustering for scalability and availability?</b>
</p>
</td><td class="td" align="left">
<p class="table-para">Yes</p>
</td><td class="td" align="left">
<p class="table-para">Yes</p>
</td><td class="td" align="left">
<p class="table-para">Yes</p>
</td><td class="td" align="left">
<p class="table-para">No</p>
</td><td class="td" align="left">
<p class="table-para">Yes</p>
</td><td class="td" align="left">
<p class="table-para">Yes</p>
</td>
</tr>
</tbody>
</table>
<a name="110"></a><a name="IDX-39"></a>
</div>
<div class="section">
<h3 class="sect3-title">
<a name="111"></a><a name="ch04lev2sec4"></a>Common Mistakes</h3>
<p class="first-para">
<b class="bold">Using databases and file systems as "message brokers."</b> This error-prone strategy consists of writing a row in a database table (or file in a file system) with the contents of a message. The second part to the strategy is writing an agent that "polls" the database (or file system) for new messages to arrive, reads and processes the message content, and then deletes the row or file.</p>
<p class="para">In essence, this strategy is akin to writing your own messaging system. It is typically a frequent source of bugs. Why reinvent the wheel? Choose one of the existing forms of communication and concentrate on business logic, not low-level communication programming.</p>
<p class="para">
<b class="bold">Using an asynchronous communication method, such as messaging, when</b> <b class="bold">a response is required.</b> With this strategy, your application sends an asynchronous message to another application and waits for a return message from that application.</p>
<p class="para">Using asynchronous communication when responses are required puts you in the position of programming an algorithm to wait for a response. How long do you wait? If you wait too long, you could be holding up a user. If you don't wait long enough, you could mistakenly report an error. This is akin to two blindfolded people trying to find each other in a vacuum.</p>

<p class="last-para">As asynchronous messaging requires messaging software, using asynchronous communication when a response is required adds components and complexity to the application. Although messaging technologies are robust and stable, synchronous communication methods are less vulnerable to unplanned outages.</p>
</div>
</div>
</div><br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td><div STYLE="MARGIN-LEFT: 0.15in;"><a href="toc.html"><img src="images/teamlib.gif" width="62" height="15" border="0" align="absmiddle"  alt="Team LiB"></a></div></td>
<td align="right"><div STYLE="MARGIN-LEFT: 0.15in;">
<a href="LiB0023.html"><img src="images/previous.gif" width="62" height="15" border="0" align="absmiddle" alt="Previous Section"></a>
<a href="LiB0025.html"><img src="images/next.gif" width="41" height="15" border="0" align="absmiddle" alt="Next Section"></a>
</div></td></tr></table>
</body></html>

⌨️ 快捷键说明

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