cancel
Showing results for 
Search instead for 
Did you mean: 

OutOfMemory of Permanent Generation Question

Former Member
0 Kudos

Hi all,

we experience some OutOfMemory exception on our system. Therefore i have got a couple of questions.

Q1: Does anybody know if each web application has got his own private part in the permanent generation ?

So that in case we would have several web applications which depend on the same libraries such as hibernate or spring then these libs/classes would be loaded several times into the permanent space.

Q2: In case we would create library projects for spring and hibernate and so on in the J2EE engine do they get loaded just onces into the permanent space or do they get loaded several times ?

best regards,

Matthias Hlubek

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Matthias,

Every class is unique by key ClassName+DefiningClassLoader. So if N applications has same library embeded, then every library class get loaded N times while every application has own class loader. However, if you deploy your library as WebAS Library and creates references from application to WebAS Library then classes will be loaded only once: class loaders of applications will refer single class loader of library that defines classes.

So answers are [Q1] -- they do, [Q2] yes, only once.

Valery Silaev

SaM Solutions

http://www.sam-solutions.net

Former Member
0 Kudos

Hi Valery,

thanks for good answer.

One more question puzzles me, when i create a reference to a WebAs library i can define a reference-type which is either hard or weak. Does it has anything to do with the permanent generation space or do i mixing up something?

best regards,

Matthias Hlubek

Former Member
0 Kudos

Matthias,

I read this document:

http://help.sap.com/saphelp_webas630/helpdata/en/28/c9a3a9606f434ea757a3536d220704/frameset.htm

Still it's unclear for me whether weak reference is enough or strong is required.

As usual, try weak, if not working try strong.

Also you can read this:

http://help.sap.com/saphelp_webas630/helpdata/en/9a/4e4f3e065de946e10000000a114084/frameset.htm

http://help.sap.com/saphelp_webas630/helpdata/en/5d/11243ee9399a0be10000000a114084/frameset.htm

Valery Silaev

SaM Solutions

http://www.sam-solutions.net

Former Member
0 Kudos

Valery,

thanks again, i starts to become clear to me know.

best regards,

Matthias Hlubek

Answers (0)