Solved

NotSerializableException

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

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
javap bin 2 40
java jdbc batch example 8 41
Running JavaFX on JDeveloper 12C 1 54
Is there a simpler dropbox system? 10 34
I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
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…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

856 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