Home > database >  Pb calls the EJB frees memory problems.
Pb calls the EJB frees memory problems.

Time:10-04

Ejb method
Public String sayHello () {
Return the hello world! ;
}

Pb calls the EJB
Int I
FOR I=0 to 100000
G_hello=g_helloHome. The create ()
G_hello. SayHello ()
//ls_text aa + +="~ r ~ n ~ r ~ n"
G_hello. Remove ()
NEXT
G_EJBConn. DisconnectServer ()

PB to invoke the EJB after a period of time,
The Exception raised: Java. Lang. OutOfMemoryError

Out of memory,

Call PB90. Exe have grown in the process of memory, don't release,
At runtime, PB90. Exe put the JVM into to this process, using Java calls the EJB,
To invoke the EJB method, the EJB method returns "hello world!" , the call number is much, the memory used up,
Recycling, why not????????????????????

Excuse me,
The liberation of ace to know is there any way to the no.

CodePudding user response:

Pb in the object will not be automatically destroy,
You should be yourself to destroy
I don't know g_hello. Remove () is used to destroy

CodePudding user response:

FOR I=0 to 100000
G_hello=g_helloHome. The create ()
G_hello. SayHello ()
//ls_text aa + +="~ r ~ n ~ r ~ n"
G_hello. Remove ()
NEXT
Why should the Home repeatedly create?
Don't create out 1 is ok?
Should be you

CodePudding user response:

Didn't see the Posting date, pick up points impossible
  • Related