Hi Steven,

Definitely let me know if you run into trouble with this on LCDS 2.6 beta.

Best,
Seth

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Steven 
Toth
Sent: Monday, June 23, 2008 10:20 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Re: ANYONE? LCDS Bug? Return from overriden 
ServiceAdapter manage() disregarded

Thanks, but the manage() method only gets called if you override the 
handlesSubscriptions() method to return true, and in LCDS if you call 
the super.manage(command) for a subscribe operation when you 
indicated you will be handling subscriptions it throws an exception. 
BlazeDS will allow you to call the super.manage(command) even with 
handlesSubscriptions() overriden to return true, but it works even if 
you don't call the super.manage(command). 

For some reason LCDS 2.51 ignores the value I return from the manage
() method. Seems like a bug. I'm trying to recreate it on LCDS 2.6 
Beta. 

If anyone has any suggestions or feedback I'd appreciate it. I tried 
to file a bug report from the link on the LCDS Beta Download page bug 
it told me I didn't have the correct permissions. 

Regards.

-Steven

--- In flexcoders@yahoogroups.com, shaun <[EMAIL PROTECTED]> wrote:
>
> Hi,
> 
> A pure 100% guess... Perhaps you need to call super.manage
(command).
> 
> 
> Steven Toth wrote:
> > --- In flexcoders@yahoogroups.com, "Steven Toth" <toth82@> wrote:
> > 
> >>I have a custom adapter I'm using for messaging. This code works 
> > 
> > in 
> > 
> >>BlazeDS, but when I try it in LiveCycle DS it does not work. The 
> >>return value (a new AckknowledgeMessage I created) from my 
> > 
> > overriden 
> > 
> >>manage() method never makes it to the client. I see the message 
> > 
> > from 
> > 
> >>the sysout at the end of the method populated correctly, but 
> > 
> > whatever 
> > 
> >>is happening after this method is called and before the message 
is 
> >>returned to the client overwrites what I returned. Any thoughts?
> >>
> >>public class MyMessagingAdapter extends ServiceAdapter {
> >> public boolean handlesSubscriptions() {
> >> return true;
> >> }
> >>
> >> public Object manage(CommandMessage command) {
> >> Object ret = null;
> >> try {
> >> if (command.getOperation() == 
> >>CommandMessage.SUBSCRIBE_OPERATION) {
> >> // Do something custom here... 
> >>
> >> AcknowledgeMessage msg = new 
> >>AcknowledgeMessage();
> >> ASObject body = (ASObject)msg.getBody
> >>();
> >> if (body == null) {
> >> body = new ASObject();
> >> msg.setBody(body); 
> >> }
> >> body.put("someValue","abc");
> >> body.put("spmeOtherValue, "def");
> >> ret = msg;
> >> }
> >> } catch (Throwable t) {
> >> System.out.println("manage(), exception 
> >>caught:\n" + t.getMessage());
> >> t.printStackTrace();
> >> }
> >> System.out.println("manage(), returning msg:\n" + 
> >>ret);
> >> return ret;
> >> }
> >>
> > 
> > 
> > 
> >
>
 

Reply via email to