ejb方法
public String sayHello() {
return hello world !;
}
pb呼叫EJB
int i
FOR i = 0 to 100000
g_hello = g_helloHome.create()
g_hello.sayHello()
//ls_text += aa + "~r~n~r~n"
g_hello.remove()
NEXT
g_EJBConn.disconnectServer()
PB呼叫EJB一段時間后,出現
Exception raised: java.lang.OutOfMemoryError
記憶體溢位。
呼叫時PB90.exe這個行程的記憶體一直在增長,不釋放,
在運行時,PB90.exe把JVM裝入到這個行程,再利用Java呼叫EJB,
呼叫EJB方法時,EJB方法回傳“hello world !”,呼叫次數多了,就把記憶體用盡了。
為什么不會回收了。??????????????
請問
高手知道有什么方法釋入不。
uj5u.com熱心網友回復:
pb中產生的物件不會自動destroy。你應該自己來destroy
不知道g_hello.remove() 是不是用于destroy
uj5u.com熱心網友回復:
FOR i = 0 to 100000g_hello = g_helloHome.create()
g_hello.sayHello()
//ls_text += aa + "~r~n~r~n "
g_hello.remove()
NEXT
為什么Home要反復create?
create出1次不就可以了嗎?
應該是你的原因
uj5u.com熱心網友回復:
沒看發帖日期,接分不可能了轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/112210.html
標籤:Web 應用
