?
Solved

NotSerializableException

Posted on 2000-03-15
1
Medium Priority
?
197 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Give Your Engineering Team a Productivity Boost

Learn why container technology is so powerful and how it can provide your team with productivity gains and other benefits.

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…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses
Course of the Month11 days, 11 hours left to enroll

752 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