[Design of Embedded JBoss] - Re: Shortcomings of Virtual Archives (in progress)
by ALRubinger
"jason.greene(a)jboss.com" wrote : There really is no need for the "classes" to appear in VFS. If someone wants to get a stream for a class instance, they would normally do clazz.getClassLoader().getResource(clazz.getName()) anyway, because there is no guarantee that a class visible to the deployment is actually in the deployment
In some cases, the classes do need to be in the virtual archive.
This has to work the same way a physical deployment would. In a real JAR, we've got class files. So the deployment CL picks those up and uses them if the FQN is not already handled by a parent CL.
The only difference in the testing scenario is that the classes *are* all visible to a parent CL (usually the appCL) because the test launcher will put everything on java.class.path. In this case copying the bytes again within memory is a waste.
However, I could conceivably add classes as resources from elsewhere on the file system, and these are not covered under java.class.path. In that case, the bytes need to be copied and in memory within the virtual archive.
S,
ALR
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4243333#4243333
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4243333
16 years, 8 months
[Design of Messaging on JBoss (Messaging/JBoss)] - clustered grouping issue
by ataylor
Ive just about completed clustered grouping using a single node approach. I have one edge case that I'm not sure how to solve.
The problem.
Lets say a group is bound to node 1 that has a single consumer. Another node, node 2, currently forwarding messages with a specific group id to node 1.
At this point node the consumer is removed from node 1, however since node 2 is not yet notified of this removal it carries on forwarding messages.
At some point node 2 realizes that node 1 no longer has any consumers so must make a decision as to where to forward messages to. The problem is however that it must be sure that the queue on node 1 has redistributed all the messages with the same groupid before it restarts sending.
One solution would be to wait until node 1 has informed us that all the messages for the queue have been redistributed. The problem with this is that there could be a lot of messages in the queue, which could take a while and also if a consumer is added before all the messages are redistributed then we may have messages still in the queue with a groupid that have to be redistributed.
another solution would be to have a special groupIdRedistributor. When a consumer that is pinned to a group is removed we create a Redistributor with a filter that matches the groupid. The messages are consumed and redistributed to another node and then the nodes are informed they can start redelivering. The problem here is when does the consumer know when all the messages have been delivered.
A simple solution would be to have a delay time larger than the redistribution delay time. we simply hold back on delivering the message until the delay has elapsed and then restart. Not sure if this would fly tho'
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4243323#4243323
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4243323
16 years, 8 months