cancel
Showing results for 
Search instead for 
Did you mean: 

How to Working with Enqueue Locks - Logical

Former Member
0 Kudos

Hi,

someone can explain me how I do to develop a J2EE Object that manage the logical lock?

I'm following this below buv I'm having some problem to understand where are the external DC library required

and what kind of DC type I've to develop for this.

http://help.sap.com/saphelp_nw72/helpdata/en/4a/6d2f65dd1661a7e10000000a421937/frameset.htm

Regards

Antonello

Accepted Solutions (0)

Answers (1)

Answers (1)

rolf_paulsen
Active Participant
0 Kudos

Hi,

add a depedency to DC tc/je/locking/api in SC ENGFACADE.

You may use DC Type J2EE / EJB or plain Java depending on your needs.

Regards

Rolf

Former Member
0 Kudos

Hi Rolf!

Great, now the api are available in EJB project.

But, when I try to implement the code below in EJB business method, the compiler says me:

"No exception of type TechnicalLockException can be thrown; an exception type must be a subclass

of Throwable"

InitialContext ctx = new InitialContext();

try {

* LogicalLockingFactory lf =*

* (LogicalLockingFactory) ctx.lookup(*

* LogicalLockingFactory.JNDI_NAME);*

* LogicalLocking logicalLocking =*

* lf.createLogicalLocking("SAP/FM", "SAP Facility Management");*

} catch (NamingException ne) {

* // JNDI lookup error*

} catch (TechnicalLockException tle) {

* // the namespace is already reserved for another description*

} catch (IllegalArgumentException iae) {

* // the namespace is already reserved for another description*

}

Have a sintax error at "} catch (TechnicalLockException tle) {"

You know what's up?!

Regards

Antonello