Critical highlevel ejb problem


EJB programming & troubleshooting: Critical highlevel ejb problem

  1. Critical highlevel ejb problem (2 messages)

    Hello Friends,
                   I have a critical problem the problemgoes like this-I have a servlet which looks up an session ejb.In this session ejb an object is created which is not serializable.After this object is created i have to pass it other session bean.Remember this object that is created is not serializable.I have tried this using weblogic server where the session bean returns a object to the servlet and the servlet looks up another session bean and sets this works fine.But when i try with orion server it is giving objectNot Serializable exception which is very reasonable.Can any ejb experts suggest me how do i overcome this problem(or is it not at all possible to transport a non serializable object??).I need to transport an object from one ejb to another ejb through a servlet and the object is not serializable.I have one solution which i think is a round about way.
  2. Have your class implement There is no mrthod to implement in the Serilizable interface. It acts as a tag. If your class has emebedded object references, they also have to be recursively serializable.

    Hope it helps.

  3. Simple answer. NO, all arguments supplied to EJB remote methods MUST be serializable. Methods supplied to local interfaces do not have to be.

    Just make the class serializable. If you don't have access to it's source code, then sub-class it and make the sub-class implement Serializable.