cancel
Showing results for 
Search instead for 
Did you mean: 

Optimization of remote calls of EJB

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

viliana
Advisor
Advisor
0 Kudos

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

Former Member
0 Kudos

Hello Viliana,

Thank you for your answer!

Regarding your question: I am using SAP Web AS 6.40.

Do you know if there is any official SAP documentation / whitepaper available regarding the named optimizations?

What is the recommendation on how to proceed according to the problem I described? Shall we use hard-coded local calls whenever passing parameters by reference is required?

Having in mind that other vendors allow to automatically optimize such that call-by-reference is performed if possible (because local), do you know if there are any considerations at SAP as to provide a similar feature in the future?

Thanks a lot for your help!

With kindest regards,

Nick.

viliana
Advisor
Advisor
0 Kudos

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

Answers (1)

Answers (1)

guru_subramanianb
Active Contributor
0 Kudos

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