SyncTransactable.java
1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*
* Decompiled with CFR 0_118.
*
* Could not load the following classes:
* javax.transaction.RollbackException
* javax.transaction.Synchronization
* javax.transaction.SystemException
* javax.transaction.Transaction
* org.slf4j.Logger
* org.slf4j.LoggerFactory
*/
package com.adobe.service;
import com.adobe.service.ResourcePeerImpl;
import com.adobe.service.Transactable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.transaction.RollbackException;
import javax.transaction.Synchronization;
import javax.transaction.SystemException;
import javax.transaction.Transaction;
class SyncTransactable
implements Transactable {
private static final Logger logger = LoggerFactory.getLogger(SyncTransactable.class);
public boolean enlist(Transaction transact, ResourcePeerImpl resourcePeer) throws RollbackException, SystemException, IllegalStateException {
if (transact == null) {
return false;
}
try {
transact.registerSynchronization((Synchronization)resourcePeer);
}
catch (RollbackException e) {
logger.warn("Error enlisting with transaction", (Throwable)e);
throw new RollbackException(e.toString());
}
catch (SystemException e) {
logger.warn("Error enlisting with transaction", (Throwable)e);
throw new SystemException(e.toString());
}
catch (IllegalStateException e) {
logger.warn("Error enlisting with transaction", (Throwable)e);
throw new IllegalStateException(e.toString());
}
return true;
}
public boolean delist(Transaction transact, ResourcePeerImpl resourcePeer) throws SystemException, IllegalStateException {
if (transact == null) {
return false;
}
return true;
}
}