Skip to Content
avatar image
Former Member

Optimization of remote calls of EJB

Hello,

does the SAP Web AS support automatic optimization of remote calls of EJBs such that the overhead associated with remote calls is avoided iff the target EJB of the call actually runs in the same JVM (and therefore would allow a local call)? This would imply that in this case objects are passed by reference instead of by value.

To clarify: I am aware of the fact that EJBs can be called through Local and LocalHome interfaces. But that prevents the distribution of the EJBs. What I am looking for is to always use Remote and Home interface (remote call) and let the AppServer optimize the call to be virtually local if possible.

From what I know, JBoss and WebLogic support this feature. Is there anything like that for the Web AS. What do I need to configure?

Any hint is greatly appreciated. Please let me know if you need additional clarification on my question. Thanks!

With kindest regards,

Nick.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Aug 12, 2005 at 08:42 AM

    Hi Nick,

    What version of the SAP WEB AS do you use?

    In fact there are optimizations regarding locally accessed EJBs through remote interfaces, but then the parameters and result objects are still passed by value. The reason is that this is a requirement from the RMI specification and there are modules that rely on passing parameters by reference or by value and using local or remote EJB interfaces for achieving that. Having this in mind, an optimization that detects locally accessed EJBs and passing the parameters by reference in that case will break the compliance with our RMI implementation.

    Part of the optimization concerns avoiding replication of parameters with simple Java types and immutable objects (e.g. java.lang.String), but in the common case parameters are replicated.

    Summarizing the above: yes, there is an optimization for locally accessed EJBs through Remote interfaces, however it is still not as fast as calls through local interfaces.

    Best regards,

    Viliana

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Nick,

      The optimizations I was talking about are a proprietary internal functionality and not something application developers can rely on. That's why they are not documented in any external documentation. According to your problem, my proposal is to declare both the remote and local interfaces of the beans and use the proper one depending on whether the bean client wants to pass parameters by value or by reference.

      SAP does not have plans to dynamically (or automatically as you call it) switch from calling by value to calling by reference as this is not just a performance optimization - this breaks the functionality. If we decide to do it, we will have at least two problems:

      1. Incompatibility with the RMI specification

      2. Incompatibility with previous versions

      As I already mentioned, there are EJB components that rely on being called by value, no matter whether the client resides in the same JVM or is a remote one.

      I still cannot get your goal - both insisting on remote interfaces and expecting object-by-reference.

      Best regards,

      Viliana

  • avatar image
    Former Member
    Aug 17, 2005 at 08:41 AM

    Hi Mohammed,

    When u use the studio ide you have the option of calling a localRemote object RMI in the same JVM.Refer the below link & sub links about WAS adminstration.There are varuious ways how u can optimize the performance of the server.

    http://help.sap.com/saphelp_erp2004/helpdata/en/68/f4bc3deaf28d33e10000000a11405a/frameset.htm

    According to my knowledge WAS server 6.40 supports all major functionalities what weblogic or websphere can support.Some features include connection pooling,clustering,load balancing etc.The performance of the server also depends on wht architeture we are using ,

    development framework also.

    Rdgs,

    G

    Add comment
    10|10000 characters needed characters exceeded