-
1. Re: Seam+JMS: extracting Java object from ObjectMessage
dkane May 23, 2007 2:01 PM (in response to dkane)No way ?
I could of course serialize Object to string and use TextMessage instead. But there are some other subscribers already targeted to ObjectMessage. -
2. Re: Seam+JMS: extracting Java object from ObjectMessage
jazir1979 May 23, 2007 6:03 PM (in response to dkane)Hi,
From what I've seen, the object in your ObjectMessage should follow the same rules as what any Seam Remoting @WebRemote method would return (Section 19.6 of the doco) -- ie: keep it as a simple JavaBean so you can access the serialized state from javascript using properties. I don't think a Java Properties object will work. You could use Firebug in firefox to debug the JS and view what Seam is returning inside the Seam.Remoting.ObjectMessage if you really want to try it.
Also from looking at Seam's remote.js, I think you call ".value" or "getValue()" on the ObjectMessage, not ".object/getObject()" as the documentation says.Seam.Remoting.ObjectMessage = function() { this.value = null; Seam.Remoting.ObjectMessage.prototype.getValue = function() { return this.value; } Seam.Remoting.ObjectMessage.prototype.setValue = function(value) { this.value = value; } }
Daniel."dkane" wrote:
No way ?
I could of course serialize Object to string and use TextMessage instead. But there are some other subscribers already targeted to ObjectMessage. -
3. Re: Seam+JMS: extracting Java object from ObjectMessage
shane.bryzak May 23, 2007 7:35 PM (in response to dkane)What Daniel said is spot on. I've also fixed the documentation to correctly refer to the getValue() method.