You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by Philipp Reinecke <pr...@informatik.hu-berlin.de> on 2005/04/27 15:40:15 UTC

Retry: Possibly stupid question regarding msgNumber in Sandesha

Hello,

as I had sent the attached message before, I have been wondering why
I did not receive any replies to it. Only now did I realize that it
did not show up in the archives, either, which seems strange since I
got a copy sent by the list software.

So, can one of the Sandesha developers help me understand/resolve the
issue mentioned below? I am looking at a different way of handling
acknowledgements, and this detail caused some major confusion.

Thanks,

Philipp Reinecke

----- Forwarded message from Philipp Reinecke <pr...@informatik.hu-berlin.de> -----
[..]

Hello,

I noticed that Sandesha internally uses variables of type `long'
to store the RM message number. According to the JDK API Docu-
mentation these have maximum value of 2^63-1. The WSRM, however,
specifies that message numbers can be in the range from 1 up to
2^64-1, which is quite a bit larger than 2^63-1. Does Sandesha
magically handle the (hypothetical) case of more than 2^63-1
messages in one sequence by utilizing the negative portion of
the long number space, or is this a bug? Judging from the way
MessageNumber.toSOAPEnvelope() works, I lean towards the latter,
since the internal message number is exported without checking
whether it is negative.

Regards,

Philipp Reinecke

----- End forwarded message -----


RE: Retry: Possibly stupid question regarding msgNumber in Sandesha

Posted by Jaliya Ekanayake <ja...@opensource.lk>.
Hi Alek,
 
Thanks for the tip. We will fix this bug using BigInteger soon. It is a sort
of re-factoring that we need to do, instead of normal long operations, now
the code will use operations in the BigInteger class.
 
Thanks,
 
Jaliya
  _____  

From: Aleksander Slominski [mailto:aslom@cs.indiana.edu] 
Sent: Thursday, April 28, 2005 10:29 AM
To: Jaliya Ekanayake
Cc: 'Philipp Reinecke'; fx-dev@ws.apache.org
Subject: Re: Retry: Possibly stupid question regarding msgNumber in Sandesha
 
Jaliya Ekanayake wrote: 
Hi Reinecke,
 
Yes, it is a problem that we need to solve. According to the specification
the maximum of the message number that is allowed is 18446744073709551615
which is the max value of the "unsigned long" in some languages.
 
However when we try to implement in java, we cannot just use some base
types. The problem starts from this kind of situation (If this ever
happens...)
 
When we read the message number from SOAP initially we have to get it as
String and then get the special type that we need. Here we are in trouble.
We need the functionality of some form of "number" format since we need to
perform increments, checks etc... On this number.
 
Unfortunately we cannot use double, since it round some parts off from the
number and hence the final value is inconsistent. 
 
So the possibility is to use some form of utility class that either dose
some string processing or string processing + long. 
 
At the moment we are trying our best to pass the interops with other
implementations so if you can derive a solution and send a patch it is
really great.
  
why not use BigInteger ? no need to reinvent wheel with another utility
class to do arithmetic on big numbers - moreover it is used in crypto and is
very optimized (and i think using native C code):
http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html

HTH,

alek


-----Original Message-----
From: Philipp Reinecke [mailto:preineck@informatik.hu-berlin.de] 
Sent: Wednesday, April 27, 2005 7:40 PM
To: fx-dev@ws.apache.org
Subject: Retry: Possibly stupid question regarding msgNumber in Sandesha
 
Hello,
 
as I had sent the attached message before, I have been wondering why
I did not receive any replies to it. Only now did I realize that it
did not show up in the archives, either, which seems strange since I
got a copy sent by the list software.
 
So, can one of the Sandesha developers help me understand/resolve the
issue mentioned below? I am looking at a different way of handling
acknowledgements, and this detail caused some major confusion.
 
Thanks,
 
Philipp Reinecke
 
----- Forwarded message from Philipp Reinecke
 <ma...@informatik.hu-berlin.de>
<pr...@informatik.hu-berlin.de> -----
[..]
 
Hello,
 
I noticed that Sandesha internally uses variables of type `long'
to store the RM message number. According to the JDK API Docu-
mentation these have maximum value of 2^63-1. The WSRM, however,
specifies that message numbers can be in the range from 1 up to
2^64-1, which is quite a bit larger than 2^63-1. Does Sandesha
magically handle the (hypothetical) case of more than 2^63-1
messages in one sequence by utilizing the negative portion of
the long number space, or is this a bug? Judging from the way
MessageNumber.toSOAPEnvelope() works, I lean towards the latter,
since the internal message number is exported without checking
whether it is negative.
 
Regards,
 
Philipp Reinecke
 
----- End forwarded message -----
 
 
 
 
  




-- 
The best way to predict the future is to invent it - Alan Kay

Re: Retry: Possibly stupid question regarding msgNumber in Sandesha

Posted by Aleksander Slominski <as...@cs.indiana.edu>.
Jaliya Ekanayake wrote:

>Hi Reinecke,
>
>Yes, it is a problem that we need to solve. According to the specification
>the maximum of the message number that is allowed is 18446744073709551615
>which is the max value of the "unsigned long" in some languages.
>
>However when we try to implement in java, we cannot just use some base
>types. The problem starts from this kind of situation (If this ever
>happens...)
>
>When we read the message number from SOAP initially we have to get it as
>String and then get the special type that we need. Here we are in trouble.
>We need the functionality of some form of "number" format since we need to
>perform increments, checks etc... On this number.
>
>Unfortunately we cannot use double, since it round some parts off from the
>number and hence the final value is inconsistent. 
>
>So the possibility is to use some form of utility class that either dose
>some string processing or string processing + long. 
>
>At the moment we are trying our best to pass the interops with other
>implementations so if you can derive a solution and send a patch it is
>really great.
>  
>
why not use |BigInteger ? no need to reinvent wheel with another utility 
class to do arithmetic on big numbers - moreover it is used in crypto 
and is very optimized (and i think using native C code):
http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html

HTH,

alek
|

>-----Original Message-----
>From: Philipp Reinecke [mailto:preineck@informatik.hu-berlin.de] 
>Sent: Wednesday, April 27, 2005 7:40 PM
>To: fx-dev@ws.apache.org
>Subject: Retry: Possibly stupid question regarding msgNumber in Sandesha
>
>Hello,
>
>as I had sent the attached message before, I have been wondering why
>I did not receive any replies to it. Only now did I realize that it
>did not show up in the archives, either, which seems strange since I
>got a copy sent by the list software.
>
>So, can one of the Sandesha developers help me understand/resolve the
>issue mentioned below? I am looking at a different way of handling
>acknowledgements, and this detail caused some major confusion.
>
>Thanks,
>
>Philipp Reinecke
>
>----- Forwarded message from Philipp Reinecke
><pr...@informatik.hu-berlin.de> -----
>[..]
>
>Hello,
>
>I noticed that Sandesha internally uses variables of type `long'
>to store the RM message number. According to the JDK API Docu-
>mentation these have maximum value of 2^63-1. The WSRM, however,
>specifies that message numbers can be in the range from 1 up to
>2^64-1, which is quite a bit larger than 2^63-1. Does Sandesha
>magically handle the (hypothetical) case of more than 2^63-1
>messages in one sequence by utilizing the negative portion of
>the long number space, or is this a bug? Judging from the way
>MessageNumber.toSOAPEnvelope() works, I lean towards the latter,
>since the internal message number is exported without checking
>whether it is negative.
>
>Regards,
>
>Philipp Reinecke
>
>----- End forwarded message -----
>
>
>
>
>  
>


-- 
The best way to predict the future is to invent it - Alan Kay


RE: Retry: Possibly stupid question regarding msgNumber in Sandesha

Posted by Jaliya Ekanayake <ja...@opensource.lk>.
Hi Reinecke,

Yes, it is a problem that we need to solve. According to the specification
the maximum of the message number that is allowed is 18446744073709551615
which is the max value of the "unsigned long" in some languages.

However when we try to implement in java, we cannot just use some base
types. The problem starts from this kind of situation (If this ever
happens...)

When we read the message number from SOAP initially we have to get it as
String and then get the special type that we need. Here we are in trouble.
We need the functionality of some form of "number" format since we need to
perform increments, checks etc... On this number.

Unfortunately we cannot use double, since it round some parts off from the
number and hence the final value is inconsistent. 

So the possibility is to use some form of utility class that either dose
some string processing or string processing + long. 

At the moment we are trying our best to pass the interops with other
implementations so if you can derive a solution and send a patch it is
really great.

Thanks,

Jaliya 


-----Original Message-----
From: Philipp Reinecke [mailto:preineck@informatik.hu-berlin.de] 
Sent: Wednesday, April 27, 2005 7:40 PM
To: fx-dev@ws.apache.org
Subject: Retry: Possibly stupid question regarding msgNumber in Sandesha

Hello,

as I had sent the attached message before, I have been wondering why
I did not receive any replies to it. Only now did I realize that it
did not show up in the archives, either, which seems strange since I
got a copy sent by the list software.

So, can one of the Sandesha developers help me understand/resolve the
issue mentioned below? I am looking at a different way of handling
acknowledgements, and this detail caused some major confusion.

Thanks,

Philipp Reinecke

----- Forwarded message from Philipp Reinecke
<pr...@informatik.hu-berlin.de> -----
[..]

Hello,

I noticed that Sandesha internally uses variables of type `long'
to store the RM message number. According to the JDK API Docu-
mentation these have maximum value of 2^63-1. The WSRM, however,
specifies that message numbers can be in the range from 1 up to
2^64-1, which is quite a bit larger than 2^63-1. Does Sandesha
magically handle the (hypothetical) case of more than 2^63-1
messages in one sequence by utilizing the negative portion of
the long number space, or is this a bug? Judging from the way
MessageNumber.toSOAPEnvelope() works, I lean towards the latter,
since the internal message number is exported without checking
whether it is negative.

Regards,

Philipp Reinecke

----- End forwarded message -----