01: /* Copyright 2002 The JA-SIG Collaborative. All rights reserved.
02: * See license distributed with this file and
03: * available online at http://www.uportal.org/license.html
04: */
05:
06: package org.jasig.portal.concurrency.locking;
07:
08: import org.jasig.portal.concurrency.IEntityLockService;
09: import org.jasig.portal.concurrency.IEntityLockServiceFactory;
10: import org.jasig.portal.concurrency.LockingException;
11: import org.apache.commons.logging.Log;
12: import org.apache.commons.logging.LogFactory;
13:
14: /**
15: * Creates the reference implemetation of <code>IEntityLockService</code>.
16: * @author Dan Ellentuck
17: * @version $Revision: 35418 $
18: */
19:
20: public class ReferenceEntityLockServiceFactory implements
21: IEntityLockServiceFactory {
22: private static final Log log = LogFactory
23: .getLog(ReferenceEntityLockServiceFactory.class);
24:
25: /**
26: * ReferenceEntityLockServiceFactory constructor.
27: */
28: public ReferenceEntityLockServiceFactory() {
29: super ();
30: }
31:
32: /**
33: * Return an instance of the service implementation.
34: * @return org.jasig.portal.concurrency.locking.IEntityLockService
35: * @exception LockingException
36: */
37: public IEntityLockService newLockService() throws LockingException {
38: try {
39: return ReferenceEntityLockService.singleton();
40: } catch (LockingException le) {
41: log
42: .error("ReferenceEntityLockServiceFactory.newLockService(): "
43: + le);
44: throw new LockingException(le);
45: }
46: }
47: }
|