[Design of Messaging on JBoss (Messaging/JBoss)] - Re: Large messages broken
by clebert.suconic@jboss.com
I was able to send and receive 500 * 1024 * 1024 bytes, if removing one reference of the memory (that would use 500M of memory):
Index: src/org/jboss/jms/example/LargeMessageExample.java
| ===================================================================
| --- src/org/jboss/jms/example/LargeMessageExample.java (revision 6312)
| +++ src/org/jboss/jms/example/LargeMessageExample.java (working copy)
| @@ -68,10 +68,12 @@
|
| //Step 7. Create a BytesMessage with 1MB arbitrary bytes
| BytesMessage message = session.createBytesMessage();
| - message.writeBytes(new byte[1024 * 1024]);
| + message.writeBytes(new byte[500 * 1024 * 1024]);
|
| //Step 8. Send the Message
| producer.send(message);
| +
| + message = null;
|
| System.out.println("Large Message sent");
|
| @@ -84,7 +86,7 @@
| connection.start();
|
| //Step 11. Receive the message
| - BytesMessage messageReceived = (BytesMessage) messageConsumer.receive(5000);
| + BytesMessage messageReceived = (BytesMessage) messageConsumer.receive(120000);
|
| System.out.println("Received message: " + messageReceived.getBodyLength() + " bytes");
|
And by adding more memory on the VM:
Index: jms/common/build.xml
| ===================================================================
| --- jms/common/build.xml (revision 6312)
| +++ jms/common/build.xml (working copy)
| @@ -104,7 +104,8 @@
| <target name="runExample" depends="compile">
| <java classname="${example.classname}" fork="true" resultproperty="example-result">
| <jvmarg value="-XX:+UseParallelGC"/>
| - <jvmarg value="-Xms512M"/>
| + <jvmarg value="-verbose:gc"/>
| + <jvmarg value="-Xms1024M"/>
| <jvmarg value="-Xmx2048M"/>
| <jvmarg value="-XX:+AggressiveOpts"/>
| <jvmarg value="-XX:+UseFastAccessorMethods"/>
|
I rememver having a conversation with you about supporting ClientFiles through JMS, and I remember we deciding on support that thorugh the core-api.
If we do want to expose it thorugh JMS, we would need some special methods to specify the Client directory.. and how to add a fileHandle to a message. (Or maybe having StreamMessage storing the data on a temporary file).
I will do a little more extensive testing on monday to make sure nothing is broken.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4223488#4223488
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4223488
17 years
[Design the new POJO MicroContainer] - CL's GlobalCapabilities have a bug
by alesj
Kabir's GlobalCapabilities cause a NPE in current Deployers trunk.
A bit of background on how this NPE was exposed. :-)
I've released temp 2.2.0 Milestone1 releases of MC sub-projects:
* VFS
* Kernel
* CL
This is off the trunk, since currently most of the branches look exactly the same as trunk,
hence I don't expect any big diff when I do proper 2.0.x releases.
This is just to get Alexey and Remy to move fwd with their work on XB and Metadata.
I've also committed Deployers with all the updates,
although the current build fails, hence exposing the bug.
| 516 ERROR [MockClassLoaderDescribeDeployer] Error during undeploy: A
| java.lang.NullPointerException
| at org.jboss.classloading.spi.dependency.Module.getCapabilities(Module.java:661)
| at org.jboss.classloading.spi.dependency.Module.determinePackageNames(Module.java:716)
| at org.jboss.classloading.spi.dependency.ClassLoadingSpace.unjoin(ClassLoadingSpace.java:283)
| at org.jboss.classloading.spi.dependency.ClassLoadingSpace.split(ClassLoadingSpace.java:190)
| at org.jboss.classloading.spi.dependency.Domain.removeModule(Domain.java:186)
| at org.jboss.classloading.spi.dependency.Module.release(Module.java:922)
| at org.jboss.deployers.plugins.classloading.AbstractDeploymentClassLoaderPolicyModule.release(AbstractDeploymentClassLoaderPolicyModule.java:147)
| at org.jboss.classloading.spi.dependency.ClassLoading.removeModule(ClassLoading.java:126)
| at org.jboss.deployers.plugins.classloading.AbstractClassLoaderDescribeDeployer.undeploy(AbstractClassLoaderDescribeDeployer.java:120)
| at org.jboss.deployers.plugins.classloading.AbstractClassLoaderDescribeDeployer.undeploy(AbstractClassLoaderDescribeDeployer.java:39)
| at org.jboss.deployers.spi.deployer.helpers.AbstractOptionalRealDeployer.internalUndeploy(AbstractOptionalRealDeployer.java:91)
| at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.undeploy(AbstractRealDeployer.java:112)
| at org.jboss.deployers.plugins.deployers.DeployerWrapper.undeploy(DeployerWrapper.java:196)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doUndeploy(DeployersImpl.java:1469)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.doUninstallParentLast(DeployersImpl.java:1376)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.uninstall(DeployersImpl.java:1331)
| at org.jboss.dependency.plugins.AbstractControllerContext.uninstall(AbstractControllerContext.java:354)
| at org.jboss.dependency.plugins.AbstractController.uninstall(AbstractController.java:1664)
| at org.jboss.dependency.plugins.AbstractController.uninstallContext(AbstractController.java:1275)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:827)
| at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
| at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:694)
| at org.jboss.deployers.plugins.main.MainDeployerImpl.undeploy(MainDeployerImpl.java:601)
| at org.jboss.test.deployers.AbstractDeployerTest.assertUndeploy(AbstractDeployerTest.java:207)
| at org.jboss.test.deployers.classloading.test.MockClassLoaderDependenciesUnitTestCase.testSimpleClassLoader(MockClassLoaderDependenciesUnitTestCase.java:67)
|
Once this is fixed I'll do a new CL release + Deployers 2.2.0.M1.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4223480#4223480
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4223480
17 years