?
Solved

NotSerializableException

Posted on 2000-03-15
1
Medium Priority
?
205 Views
Last Modified: 2013-11-24
Hi,

I'm using javamail and weblogic/EJBs. With EJBs I would like to make a connection to the MailServer. The JavaBean is stateless so if I make a connection to the mail server after going back to the servlet  I loose all the server related objects. So I created a class which stores the EJB-MailServer sessoin identifiers. This should be a serializable object. That's fine but the session that I got from the mail server is not serializable :-((( So I got the NotSerializableException when I would like to put the javamail session into my serialized object. The problem is that the Session class is final so I can't extend it to be serializable. So the question would be how I can store the MailServer related information (Session) to keep alive the MailServer connection ? Shall I use Entity Beans?? Would it solve the problem?
0
Comment
Question by:kapitany
1 Comment
 
LVL 7

Accepted Solution

by:
Ravindra76 earned 300 total points
ID: 2624826

Ur session class no need to extend Serializable.

It has to implement Serializable

public class YourSession implements Serializable {



}
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
A solution for Fortify Path Manipulation.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Suggested Courses
Course of the Month16 days, 17 hours left to enroll

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question