I am trying to write message to a file using serialization.Message consists of two fields-
date and TibrvMsg(TibrvMsg is a propriotory message by Tibco and this class is not serializable as per their documentation).So my custom message is:
Message msg = new Message(TibrvMsg msg)
Problem is though i am declaring Message Serializable, i am not able to serialize it as TibrvMsg is not serializable.
So i get java.io.NotSerializableException: com.tibco.tibrv.TibrvMsg exception.
You need to find a way to represent your TibrvMsg as a serializable object (maybe something like this, which transforms it into a Map).
You can then override the following two methods to write this data to the output stream (or read it):