Author: chirino
Date: Tue Aug 1 09:55:10 2006
New Revision: 427648
URL: http://svn.apache.org/viewvc?rev=427648&view=rev
Log:
Latest export from confluence
Modified:
incubator/activemq/site/jms-streams.html
Modified: incubator/activemq/site/jms-streams.html
URL:
http://svn.apache.org/viewvc/incubator/activemq/site/jms-streams.html?rev=427648&r1=427647&r2=427648&view=diff
==============================================================================
--- incubator/activemq/site/jms-streams.html (original)
+++ incubator/activemq/site/jms-streams.html Tue Aug 1 09:55:10 2006
@@ -276,14 +276,30 @@
<!--
<div class="pagetitle">JMS Streams</div>
-->
- <DIV class="wiki-content">
-<P>Sometimes you need to send truly massive files (many Gb) around the network
in a reliable manner. The JMS API expects JMS clients to be able to keep a
message in memory at one time, so sending > 1Gb messages around ends up
using way too much RAM on the client side.</P>
+ <DIV class="wiki-content"><P>Sometimes you need to send truly
massive files (many Gb) around the network in a reliable manner. The JMS API
expects JMS clients to be able to keep a message in memory at one time, so
sending > 1Gb messages around ends up using way too much RAM on the client
side.</P>
<P>To solve this problem ActiveMQ supports regular <SPAN class="nobr"><A
href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/InputStream.html"
title="Visit page outside Confluence" rel="nofollow">InputStream<SUP><IMG
class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif"
height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN> and
<SPAN class="nobr"><A
href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/OutputStream.html"
title="Visit page outside Confluence" rel="nofollow">OutputStream<SUP><IMG
class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif"
height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN>
abstractions which work with regular JMS producers and consumers.</P>
<P>This allows you to use the familar streams from Java to send or receive
messages of any size at all (providing your file system can handle them <IMG
class="emoticon"
src="http://goopen.org/confluence/images/icons/emoticons/smile.gif" height="20"
width="20" align="absmiddle" alt="" border="0"> while keeping a low memory
overhead.</P>
-<P>See the javadoc for how to use them.</P>
+<H3><A name="JMSStreams-UsingJMSStreams"></A>Using JMS Streams</H3>
+
+<P>To use the streams just create an input or output stream depending on if
you are reading or writing using the <SPAN class="nobr"><A
href="http://incubator.apache.org/activemq/maven/activemq-core/apidocs/org/apache/activemq/ActiveMQConnection.html#createInputStream(javax.jms.Destination)"
title="Visit page outside Confluence"
rel="nofollow">connection.createInputStream()<SUP><IMG class="rendericon"
src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0"
width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN> or<BR>
+<SPAN class="nobr"><A
href="http://incubator.apache.org/activemq/maven/activemq-core/apidocs/org/apache/activemq/ActiveMQConnection.html#createOutputStream(javax.jms.Destination)"
title="Visit page outside Confluence"
rel="nofollow">connection.createOutputStream()<SUP><IMG class="rendericon"
src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0"
width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN> methods.</P>
+
+<P>e.g.</P>
+
+<DIV class="code"><DIV class="codeContent">
+<PRE class="code-java">ActiveMQConnection connection = ...;
+OutputStream out = connection.createOutputStream(destination);
+<SPAN class="code-comment">// write the file to out
+</SPAN>out.close();</PRE>
+</DIV></DIV>
+
+<P>There are overloaded createInputStream/createOutputStream methods which
support additional paramateres to be passed.</P>
+
+<P>For further reference see the javadoc.</P>
+
<UL>
<LI><SPAN class="nobr"><A
href="http://activemq.codehaus.org/maven/apidocs/org/apache/activemq/ActiveMQInputStream.html"
title="Visit page outside Confluence" rel="nofollow">ActiveMQInputStream
<SUP><IMG class="rendericon"
src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0"
width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
<LI><SPAN class="nobr"><A
href="http://activemq.codehaus.org/maven/apidocs/org/apache/activemq/ActiveMQOutputStream.html"
title="Visit page outside Confluence" rel="nofollow">ActiveMQOutputStream
<SUP><IMG class="rendericon"
src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0"
width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN></LI>
@@ -307,8 +323,8 @@
</DIV>
<DIV id="site-footer">
Added by <A
href="http://goopen.org/confluence/users/viewuserprofile.action?username=jstrachan">James
Strachan</A>,
- last edited by <A
href="http://goopen.org/confluence/users/viewuserprofile.action?username=jstrachan">James
Strachan</A> on May 12, 2006
- (<A
href="http://goopen.org/confluence/pages/diffpages.action?pageId=123&originalId=5482">view
change</A>)
+ last edited by <A
href="http://goopen.org/confluence/users/viewuserprofile.action?username=jstrachan">James
Strachan</A> on Aug 01, 2006
+ (<A
href="http://goopen.org/confluence/pages/diffpages.action?pageId=123&originalId=9487">view
change</A>)
(<A
href="http://goopen.org/confluence/pages/editpage.action?pageId=123">edit
page</A>)
</DIV>