I am trying to send an object over a queue. The object is wrapped in the createContextualProxy of the ContextService. But if I am unwrap the object, the securityIdentity is null. The object is a correct Proxy.
Sender:
@Resource(name = "DefaultContextService")
private ContextService cs;
public void sendMessage() {
ObjectMessage objectMessage = context.createObjectMessage();
objectMessage.setObject((Serializable) cs.createContextualProxy(<ObjectToSend>,
Runnable.class));
context.createProducer().send(queue, objectMessage);
}
Receiver:
ObjectMessage message = (ObjectMessage) msg;
Runnable myObject = (Runnable) message.getObject();
myObject.run();
The runnable myObject is a Proxy. But the securityIdentity=null.
Did anyone had this issue before?