[Clustering/JBoss] - Re: Custom InvokerInterceptor
by chrismeadows
I'm bumping this as I would be very interested in the response from JBoss themselves. The original questions raised by Ben are highly relevant to the last two JBoss based projects I've worked on, and I'm now hitting it on a 3rd.
Would it be possible for JBoss to give a statement on what is the recommended approach to load balancing calls when client and session bean are both inside the container, and that container is clustered?
I found a response to this thread on techienuggets http://www.techienuggets.com/Comments?tx=52347 as follows:
anonymous wrote :
| think you'll want to modify the EJB stack defined in server/all/deploy/ejb3-interceptors-aop.xml.
| You can add your custom interceptor or simply remove/comment-out the "IsLocal" interceptor.
|
| For example, if you want to make the change for clustered stateless session beans the applicable section could look like this:
|
| <!-- interceptor-ref name="org.jboss.ejb3.remoting.ClusteredIsLocalInterceptor"/ -->
| <interceptor-ref name="org.jboss.aspects.security.SecurityClientInterceptor"/>
| <interceptor-ref name="org.jboss.aspects.tx.ClientTxPropagationInterceptor"/>
| <interceptor-ref name="org.jboss.aspects.remoting.ClusterChooserInterceptor"/>
| <interceptor-ref name="org.jboss.aspects.remoting.InvokeRemoteInterceptor"/>
|
|
| Notice the commented out ClusteredIsLocalInterceptor.
|
| I've been trying to do the exact same thing as you (i.e. cluster ejbs called from within the same JBoss 4.2.3 server). And I just figured this out today. I think it does what I want, but haven't fully "exercised" it in any way. Let me know if this helps.
|
| -Randy
Could JBoss verify the above as a valid or even recommended approach?
Regards,
Chris
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4250839#4250839
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4250839
16 years, 8 months
[jBPM] - Re: decision node based on data not in task variables
by kukeltje
Then next time please mention you did all this and this the additional information you provided now.
The handler will work, otherwise I would not have pointed to you, but you have to be creative.... you can pass arguments to the handler. So make a generic handler and pass it the expressions you want, including e.g. the transitionnames that belong to it. e.g. pass it
| <conditions>
| <condition>
| <transition>bad</transition>
| <expression>MyCustomExpression<expression>
| </condition>
| <condition>
| <transition>good</transition>
| <expression>MySecondCustomExpression<expression>
| </condition>
| </conditions>
|
And that will be in a Document in the handler where you can do ANYTHING you like with it and return the transitionname without you having to know it in the handler in advance.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4250835#4250835
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4250835
16 years, 8 months
[JBoss Messaging] - Re: JBM2 Beta5 with JBAS5.1 - Memory leak SessionContinuatio
by simon_temple
The loop in ClientProducerImpl seems to be responsible:
while (!lastChunk)
| {
| byte[] bytesRead = new byte[minLargeMessageSize];
| int numberOfBytesRead;
|
| try
| {
| numberOfBytesRead = input.read(bytesRead);
| }
| catch (IOException e)
| {
| throw new MessagingException(MessagingException.LARGE_MESSAGE_ERROR_BODY,
| "Error reading the LargeMessageBody",
| e);
| }
|
| if (numberOfBytesRead < 0)
| {
| numberOfBytesRead = 0;
| lastChunk = true;
| }
|
| final SessionSendContinuationMessage chunk = new SessionSendContinuationMessage(bytesRead,
| numberOfBytesRead,
| !lastChunk,
| lastChunk && sendBlocking);
|
| if (sendBlocking && lastChunk)
| {
| // When sending it blocking, only the last chunk will be blocking.
| channel.sendBlocking(chunk);
| }
| else
| {
| channel.send(chunk);
| }
| }
|
By configuring my connection factory I have minLargeMessageSize=131072 (128K)
My input stream is a buffered input stream returning 1024 bytes at a time.
The stream source is 512K in length.
Therefore, each time around the loop I will create a new 128K byte[] with 1K of data read into it. I then pass a reference to the array to new SessionSendContinuationMessage.
With 512 loop interations required to read and send the stream content I consume 64M of heap space in byte arrays.
wdyt?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4250830#4250830
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4250830
16 years, 8 months