cancel
Showing results for 
Search instead for 
Did you mean: 

EJB parameter passing by reference?

Former Member
0 Kudos

hello all,

i'd like to know how i can configure the J2EE engine to pass ejb parameters by reference, instead of by value. is this a config thing or really an ejb programming thing?

we have a j2ee application deployed on WAS 6.40 J2EE Engine. In a nutshell, our app is made up of a few stateless session beans and bunch of servlets. each bean is packaged in its own .jar file. all the ejb jars and the single web app .war file are packaged into one .ear file. we deploy this .ear file using the Visual Administrator tool. in short, everything should reside on the same jvm.

one of our beans invokes methods of another bean. we have various logging and monitors placed in the code. i've noticed that there are a lot (i mean really a lot) of serialization happening when cross bean border calls are made. this causes serious performance degradation.

the same app works fine under weblogic. running exactly the same test reveals no serialization between the bean calls. weblogic seems to automatically pass params by reference when the client and bean are on the same jvm.

???my question is: can i configure J2EE Engine to behave the same? in other words, when the client and the bean are on the same jvm, is there a configuration property i can set somewhere to enable param passing by reference?

btw, our beans only have remote and home interfaces today, no local or local home interfaces. could this be the key issue? in other words, if i add the local and local home interface, will the serialization be stopped?

thanks much for your thoughts.

wentao

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Wentao,

adding the local and local home interfaces should solve your problem. When local access is used the parameters are passed by reference. This is also what the EJBs documentation says: http://help.sap.com/saphelp_nw04/helpdata/en/56/c8633e0084e946e10000000a114084/frameset.htm (see the table comparing the local and remote bean access).

Hope that helps.