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 object.it 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.
thanks in advance
venkat
-
Critical highlevel ejb design problem (3 messages)
- Posted by: venkatesh Yadalam
- Posted on: July 31 2001 06:10 EDT
Threaded Messages (3)
- Critical highlevel ejb design problem by Stefan Piesche on July 31 2001 14:39 EDT
- Critical highlevel ejb design problem by Adnan Rafiq on July 31 2001 18:06 EDT
- Critical highlevel ejb design problem by Tom King on August 06 2001 15:40 EDT
-
Critical highlevel ejb design problem[ Go to top ]
- Posted by: Stefan Piesche
- Posted on: July 31 2001 14:39 EDT
- in response to venkatesh Yadalam
The easiest way is to use EJB 2.0 and local interfaces - if that's an option.
Local interfaces are specified to use non-serializable objects as parameters. -
Critical highlevel ejb design problem[ Go to top ]
- Posted by: Adnan Rafiq
- Posted on: July 31 2001 18:06 EDT
- in response to venkatesh Yadalam
Hi, in case you don't use EJB 2.0 you can also utilize Value Objects (a.k.a. Data Transfer Objects) to pass your data between tiers and/or between EJBs. Your value object will implement java.io.Serializable. This website has great articles related to the Value Object pattern. -
Critical highlevel ejb design problem[ Go to top ]
- Posted by: Tom King
- Posted on: August 06 2001 15:40 EDT
- in response to venkatesh Yadalam
You could create a subclass of the object and have the subclass implement serializable. Then just pass the subclassed object.
HTH, Tom