com.sap.engine.services.applocking

Interface LogicalLockingFactory

All Superinterfaces:
com.sap.engine.frame.core.locking.LockingConstants, Remote

public interface LogicalLockingFactory
extends com.sap.engine.frame.core.locking.LockingConstants, Remote

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


Field Summary
static String JNDI_NAME
          The name, under wich the LogicalLockingFactory is bound in the jndi.
 
Fields inherited from interface com.sap.engine.frame.core.locking.LockingConstants
FILL_CHARACTER, LIFETIME_TRANSACTION, LIFETIME_USERSESSION, MAX_ARGUMENT_LENGTH, MAX_NAME_LENGTH, MAX_OWNER_LENGTH, MAX_USER_LENGTH, MODE_EXCLUSIVE_CUMULATIVE, MODE_EXCLUSIVE_NONCUMULATIVE, MODE_OPTIMISTIC, MODE_OPTIMISTIC_TO_EXCLUSIVE, MODE_SHARED, OWNER_WILDCARD_CHARACTER, WILDCARD_CHARACTER_MULTI, WILDCARD_CHARACTER_SINGLE
 
Method Summary
 LogicalLocking createLogicalLocking(String namespace, String description)
          Creates a new instance of the LogicalLocking, which belongs to a given namespace.
 

Field Detail

JNDI_NAME

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

See Also:
Constant Field Values
Method Detail

createLogicalLocking

public LogicalLocking createLogicalLocking(String namespace,
                                           String description)
                                    throws com.sap.engine.frame.core.locking.TechnicalLockException,
                                           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:
com.sap.engine.frame.core.locking.TechnicalLockException - if the namespace is already reserved for another description (reserving it a second time for the same description works)
IllegalArgumentException


Copyright 2006 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.