Annoying requirement for an EJB Session Bean method

I'm a bit irritated about Session Beans because I have to implement the Serializable interface for every object that I pass to a Remote method. Of course, it totally makes sense to do that when you're making remote invocation but I'm thinking if there's any way around this problem aside from creating a wrapper class that implements Serializable.

I could pass String arguments, that's ok because the String class implements Serializable by default. But when I want to pass, say, some other Object from the standard API, I have to go through the hard process. On the other hand though, the design for the prototype I'm making is quite clean... Or atleast I think it is....

Published Wednesday, December 12, 2007 5:05 AM by lamia
Filed under: , ,

Comments

# re: Annoying requirement for an EJB Session Bean method

Wednesday, December 12, 2007 7:45 PM by barakoboy

what hard process?

# re: Annoying requirement for an EJB Session Bean method

Wednesday, December 12, 2007 11:31 PM by lamia

Uhmmm... Of thinking of a way around?

Recently I wanted to return a Stream from a Session bean but then later on, I found out that Streams are not serialized. I used a File class instead.

Leave a Comment

(required) 
(required) 
(optional)
(required) 

Enter the numbers above: