[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [xmlblaster] possible bug in security plugin or MsgUnitRaw.getMsgUnit()

Ok, I looked into the issue more, and here is my understanding.

It is ok for a MsgUnitRaw to return null from a getMsgUnit call. I
found code in XmlBlasterImpl to convert a MsgUnitRaw into a
MsgUnit. However, the conversion is based on the fact that you know
what type of MsgUnitRaw you have (publish, subcribe,...) due to the
method invocation on XmlBlasterImpl. 

I'd like to also convert the MsgUnitRaw I get from the importMessage
method in the security plugin into a MsgUnit. However, I cannot figure
out how to do this, since
 * I don't know the operation that created the MsgUnitRaw in the
 * I don't know how to get access to org.xmlBlaster.engine.Global (as
 supposed to util.Global), which is needed for instance for the
 conversion code in XmlBlasterImpl.toMsgUnit (MsgUnitRaw)

Would it be possible to change I_Session from 
   public MsgUnitRaw importMessage(MsgUnitRaw msg) throws XmlBlasterException ...
   public MsgUnitRaw importMessage(MsgUnit msg) throws XmlBlasterException ...

to get around these problems ?

On Fri, May 16, 2003 at 11:38:57AM -0400, Michael Atighetchi wrote:
> I made good progress implementing my protocol via security plugins. 
> However, I've recently run into the following situation. A client
> publishes messages via publishArr to a PSQ slaves, which forwards it
> on to a PSQ master. The security plugin within the PSQ master
> intercepts the publishArr message, and gives
>   MsgUnitRaw msg
> as a parameter to the importMessage method. Since my code needs access
> to KeyData and QosData, I'm calling
>  MsgUnit mu =  msg.getMsgUnit()
> The problem is that mu is always null.
> Any clues why this would be ?

matighet at bbn.com   BBN Technologies