As far as I understand, to move an existing JSP/Servlet/JavaBeans beased application into distributed environment, I need to put all existing static variables (or a singleton objects properties) into JNDI (as Serializable data objects) to make them replicated/accessible to all nodes in the cluster.
I would like to ask if there is a possibility to get some kind of distributed lock similar to standard java synchronization ?
x = initialContext.lookup(...)
no, you have to implement it yourself or use "basic" classes available in JavaGroups. You can also simply use JBoss clustering framework HAPartition and make RPC call to the master node that will then be the locking node. In short, nothing is there by default.