activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: how to put Object message inside ActiveMQObjectMessage
Date Tue, 08 Apr 2008 12:38:14 GMT
On 08/04/2008, Ipraveen <praveen.jain@tarmin.com> wrote:
>
>  hi
>   i have following code
>  public boolean SendSync(Object body)
>         {
>             if (sendTo == null)
>                 return false;
>
>
>             if (body != null && session != null )
>             {
>                 message.setObject(body);
>  }
>  }
>  but here i am getting error that body must be serialized?

The object must implement Serializable. So just cast it...

message.setObject((Serializable) object);

-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://open.iona.com

Mime
View raw message