cancel
Showing results for 
Search instead for 
Did you mean: 

JNDI lookup on a specific server node

Former Member
0 Kudos

Hi experts

I am facing the following issue, we are loading data from ECC tables on PI JAVA memory to improve performance at runtime, this is done by a JCO,

it works fine within one Java node. But when we tested it in Productive system (with 2 java nodes) it failed because data is stored in just one Java node, so if the message does not go through

that node it does not find that data.

This is part ofe the code from the UDF where we are loading data to java memory:

props.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY, "com.sap.engine.services.jndi.InitialContextFactoryImpl");

* props.put(javax.naming.Context.PROVIDER_URL, "sapms://localhost:8110 ");*

* props.put("domain", "true");*

And this is part of the code from the UDF where we are getting data from memory

javax.naming.Context ctx = null;

* java.util.Hashtable props = new java.util.Hashtable(1);*

* props.put("domain", "true");*

* props.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY, "com.sap.engine.services.jndi.InitialContextFactoryImpl");*

props.put(javax.naming.Context.PROVIDER_URL, "sapms://localhost:8110");

Can someone give me some light about how to send data to both nodes or how to do the data lookup into a specific node??

Thanks in advanced.

Emmanuel

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor
0 Kudos

Hi,

the issue with this approach is that it violates the golden rule - "don't ever use mappings to save data"

maybe it's not worth to continue this wrong path and do something else for the performance ?

there are dozens of ways to improve performance which are supported by SAP

Regards,

Michal Krawczyk

Former Member
0 Kudos

Hi Michal, thanks for your quick answer.

I totally agree with you, and I did not designed these interfaces, I arrived to the project too late and the interfaces were already designed that way.

Now we are close to Go-live so I have to find a solution soon.

Have you any suggestion?

Thanks in advanced

Emmanuel Rebolledo

Former Member
0 Kudos

Michal

Or do you know if there is a way to load data on an specific node so I can then get it from that specific node??

Thanks

Emmanuel Rebolledo

0 Kudos

Hi,

I guess what you are trying to achieve is to build a cache of ECC data in PI memory. In this case you have to maintain local cache of the data on each server node. Hopefully the amount of memory required will not impact the system stability.

Regarding the lookup of different server node, although it is technically possible, you need to bind a remote object in the JNDI and use costly remote communication to transfer the data between the server nodes.

I guess you also have to think of some kind of update / eviction strategy for your cache.

Hope this helps!

Best Regards,

Dimitar

stefan_grube
Active Contributor
0 Kudos

> Now we are close to Go-live so I have to find a solution soon.

How long would it take to create a value mapping replication scenario?

one day or two?

Former Member
0 Kudos

The problem is solved.

I tried The Value Mapping Replication and it worked fine!

Thanks for your help!!!

Emmanuel Rebolledo

Answers (2)

Answers (2)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

>>> it works fine within one Java node. But when we tested it in Productive system (with 2 java nodes) it failed.

I guess stefan pointed is exactly right.

You store URL information in the property class . Check the URL text and modify according to the production server ... (check the following) hostname, port etc

props.put(javax.naming.Context.PROVIDER_URL, "sapms://localhost:8110");

stefan_grube
Active Contributor
0 Kudos

> props.put(javax.naming.Context.PROVIDER_URL, "sapms://localhost:8110");

> Can someone give me some light about how to send data to both nodes or how to do the data lookup into a specific node??

I suppose the "localhost" is wrong. You should put the name of the server here.