Solved

NotSerializableException

Posted on 2000-03-15
1
184 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 100 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

726 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