on 12-05-2008 9:20 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.