[Design of Messaging on JBoss (Messaging/JBoss)] - Re: JBMESSAGING-549 - Lease set to -1 causes exception
by tom.elrod@jboss.com
You are right that client should not error because the server says its default lease period is a negative number. I have already checked in a fix for this.
However, we need to resolve how all of this works together for leasing. First off, if there is no connection listener registered on the server side, there is no point in doing leasing at all imo (as there will be no one to notify of expired lease). This is why lease period > 0 AND at least one connection listener registred is required to turn on leasing from the server side.
Once leasing is turned on and a client has begun to do leasing (meaning there is a leasing sessions in progress on the server side), need to know when they should be cleaned up. Currently there are three cases when this will happen:
1. Client disconnects
2. Client lease is expired (meaning client probably crashed)
3. All connection listeners are removed
Notice case 3 is because leasing has been disabled.
Then there is the leasing period on the server side. This value is only used as part of the criteria for turning on leasing (having connection listener registered is the other). Once leasing is enabled on the server side and leasing sessions have begun, the lease period on the server side only impacts what the leasing period will be on the client (assuming the client does not override this with their own lease period). This is where the original bug mentioned came in because the client would accept the server's lease period without checking for negative number.
So having said all that, does this NOT meet messaging requirements? If not, what should be changed?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973374#3973374
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973374
19 years, 6 months
[Design of Messaging on JBoss (Messaging/JBoss)] - Re: Incorporating Remoting http transport into Messaging
by ron_sigal
anonymous wrote :
| Messaging uses whatever serialization Remoting Connector was configured with, both on client-to-server marshalling and vice-versa. We need to keep this consistent. Take a look at CallbackSErverFactory, for example, to see how this is configured.
|
I was thinking of the following code from ServerPeer:
| // We explicitly associate the datatype "jms" with the java SerializationManager
| // This is vital for performance reasons.
| SerializationStreamFactory.setManagerClassName(
| "jms", "org.jboss.remoting.serialization.impl.jboss.JBossSerializationManager");
|
| JMSWireFormat wf = new JMSWireFormat();
|
| MarshalFactory.addMarshaller("jms", wf, wf);
|
I can't see a use of "jms" anywhere in Messaging, so I commented it out.
In any case, I updated JMSWireFormat with a constructor which takes an InvokerLocator parameter, from which it attemtps to get a serializationType value. If there is none, it defaults to "jboss". All JMSWireFormat instances in Messaging 1.0 are now created with a call to this new constructor, with the exception of one test case, which should be happy with the defaults (transport = "socket", serializationType = "jboss").
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973373#3973373
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973373
19 years, 6 months