3

I would like to know if the EJB 3 specification or the Weblogic vendor specificities give information about the performance/overhead cost of calling with a lookup a stateless EJB which is in a local context (in the same server and the same ear that the class invoking the EJB) but which is annotated Remote in its declaration. I did many searches on the web on the subject and I didn't find a complete response.

Is it the invocation processing is the same that if the EJB was declared local ? So, not expensive. Or, is the invocation processing is which of EJB remote invocation ? So, more expensive.

If you have references about this question, it would be great.

davidxxx
  • 125,838
  • 23
  • 214
  • 215

1 Answers1

1

Enabling local optimisations is a Weblogic-specific setting. See:

When enable-call-by-reference is True, EJB methods called from within the same EAR file or standalone JAR file will pass arguments by reference. This improves the performance of method invocation since parameters are not copied.

Enabling call by reference is not strictly EJB Spec-compliant, since you can no longer guarantee that the parameters of a remote interface are actually clones of the original arguments, but may actually be the original objects, so be careful to make defensive copies if necessary.

Community
  • 1
  • 1
Trent Bartlem
  • 2,213
  • 1
  • 13
  • 22