ObjectMessage objMessage = session.createObjectMessage();
objMessage.setObject((java.io.Serializable) value);
message = objMessage;
}
else {
throw new MessageServiceException(L.l("value '{0}' must be serializable",
value));
}
MessageProducer producer = session.createProducer(_destination);
producer.send(message);
producer.close();
} finally {
session.close();
}
} catch (MessageServiceException e) {
throw e;
} catch (Exception e) {
throw new MessageServiceException(e);
}
}