[ 
https://issues.apache.org/jira/browse/JAMES-1241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13189680#comment-13189680
 ] 

Eric Charles commented on JAMES-1241:
-------------------------------------

Hi Michael,

I guess the  if (attrValue instanceof Serializable) is there to make it 
compatible with the primitive/string restrictions of the JMS API/
Are you saying that we should accept any object, or restrict to the 
primitve/string?

The current implementation creates a blobMessage which is passed from the 
producer to the consumer via a FileSystemBlobTransferPolicy (mails are written 
on hard drive)
A few properties are added to the JMS Message (sender, recipients, size...)

Yes, we have limited types for the properties, but this should not be an issue 
(as properties, we don't want to pass any complex object, do we?).

As we also want to support distributed queing, the transfer blob policy will 
have to be adapted to something less local than the hard drive, and the 
properties being Serializable will be fine to be transfered in the distributed 
queing system.

Does this make sense?

                
> Mail Attributes retrieved as String even though set as Boolean
> --------------------------------------------------------------
>
>                 Key: JAMES-1241
>                 URL: https://issues.apache.org/jira/browse/JAMES-1241
>             Project: JAMES Server
>          Issue Type: Bug
>          Components: Queue
>    Affects Versions: 3.0-M2
>            Reporter: Andrzej Rusin
>            Assignee: Norman Maurer
>             Fix For: 3.0-beta3
>
>
> I set a boolean attribute to a Mail:
>         boolean smartHostSSL = false;
>         mail.setAttribute(SMARTHOSTSSL, smartHostSSL);
> and then I retireve it in another method:
>             boolean smartHostSSL = (Boolean)mail.getAttribute(SMARTHOSTSSL);
> and there's an exception on this very line:
> java.lang.ClassCastException: java.lang.String cannot be cast to 
> java.lang.Boolean

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to