SAP J2EE Engine

Version 6.40


com.sap.engine.services.applocking
Interface LogicalLockingFactory

All Superinterfaces:
java.rmi.Remote

public interface LogicalLockingFactory
extends java.rmi.Remote

Gives access to an instance of the LogicalLocking, which belongs to a specified namespace.


Field Summary
static java.lang.String JNDI_NAME
          The name, under wich the LogicalLockingFactory is bound in the jndi.
 
Method Summary
 LogicalLocking createLogicalLocking(java.lang.String namespace, java.lang.String description)
          Creates a new instance of the LogicalLocking, which belongs to a given namespace.
 

Field Detail

JNDI_NAME

public static final java.lang.String JNDI_NAME
The name, under wich the LogicalLockingFactory is bound in the jndi.
Method Detail

createLogicalLocking

public LogicalLocking createLogicalLocking(java.lang.String namespace,
                                           java.lang.String description)
                                    throws com.sap.engine.frame.core.locking.TechnicalLockException,
                                           java.lang.IllegalArgumentException
Creates a new instance of the LogicalLocking, which belongs to a given namespace.

The namespace must start with a letter or a digit (see Character.isLetterOrDigit()), because the other characters are reserved for internal usage. For security-reasons a reserved namespace can not be released again.

On the other hand a namespace can be reserved multiple times: if it is reserved again with the same namespace AND the same description, then this will not cause an error. This is the way how different applications can share the same locks: the applications must agree on a namespace and description, and then both can reserve this namespace (technically the first one is reserving it and the second just takes part).

The created LogicalLocking only(!) identifies the namespace. It does not identify the user-session or transaction. Those are determined again and again when calling the methods of the LogicalLocking. So it is possible to use the same LogicalLocking in different transactions or to use different LogicalLockings in one transaction. Especially it is no problem to lookup this Factory and create a LogicalLocking in different places of the logic.

Parameters:
namespace - The namespace, to which this LogicalLocking belongs.
description - A description of this namespace, which can be displayed in the administration-tools. The description must not be null.
Returns:
The created instance of the LogicalLocking.
Throws:
TechnicalLockException - if the namespace is already reserved for another description (reserving it a second time for the same description works)

SAP J2EE Engine

Version 6.40


Copyright © 2001-2005 SAP AG. All Rights Reserved.