Solved

NotSerializableException

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
changePi Challenge 15 77
json example 39 116
mapBully challenge 6 93
compre toata in where clue oracle 4 44
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
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…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
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 …

743 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now