cancel
Showing results for 
Search instead for 
Did you mean: 

Communicate with diffrent j2ee nodes

Former Member
0 Kudos

Hi there

We've got a singleton on a j2ee which runs on about 3 nodes.

Is there any possibility to connect to the other nodes for example invalidating the singleton in all nodes?

Are there some framework-class available on which one we can connect through to get firstly the information how many nodes are available and then go in each one and invalidate the singleton?

(like you can do it in the NWA of the CE Server - "stop on all instances")

Thanks in advance

Regards

Marco

Accepted Solutions (0)

Answers (1)

Answers (1)

Benny
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Marco,

the shortcut on this is an Enqueue lock.

Watch com.sap.engine.services.applocking in [http://help.sap.com/javadocs/NW04S/current/en/index.html|http://help.sap.com/javadocs/NW04S/current/en/index.html]

The trick is to lock a string you chose from your singleton. Once your singletons boot up, they will try to lock and only the first one can do so. The rest will be blocked.

Regards,

Benny

Former Member
0 Kudos

Hi Benny

I think this isn't realy my problem.

The JNDI is working on each node yes? Or just on the central-node?

I found some information in this document: https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/0eb4a790-0201-0010-86b7-c1b26be7...

But nowhere is written, if the jndi service is only running on the central instance?!

And when i'm accessing the singleton over the jndi (in case there is just one jndi on the central-node) do i've got some problems because of the performance - whilce accessing objects in other nodes and containers?

Thanks in advance for your answer

Regards

Marco

Benny
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

oh yes, this is your problem.

However: to my information JNDI always runs on all servers.

And I don't see why you should have any kind of performance problems.

Regards,

Benny