SingletonConnectionFactory.java
1.86 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.service;
import com.adobe.CORBA.ServantBase;
import com.adobe.service.ConnectionFactory;
import com.adobe.service.impl.Platform;
import org.omg.CORBA.ORB;
import org.omg.CORBA.Object;
import org.omg.CORBA.portable.ObjectImpl;
import java.io.Serializable;
import java.lang.reflect.UndeclaredThrowableException;
import java.util.Map;
/*
* This class specifies class file version 49.0 but uses Java 6 signatures. Assumed Java 6.
*/
class SingletonConnectionFactory
implements ConnectionFactory,
Serializable {
private java.lang.Object singleton = null;
private java.lang.Object theServant = null;
public SingletonConnectionFactory(java.lang.Object obj) {
this.singleton = obj;
}
@Override
public java.lang.Object getConnection() {
if (this.theServant == null) {
try {
ServantBase sb = (ServantBase)this.singleton;
ORB orb = Platform.UTIL.getOrb();
sb.activate();
this.theServant = sb._this();
if (this.theServant instanceof ObjectImpl) {
ObjectImpl objectImpl = (ObjectImpl)this.theServant;
String ior = orb.object_to_string(objectImpl);
this.theServant = orb.string_to_object(ior);
}
}
catch (Throwable t) {
throw new UndeclaredThrowableException(t);
}
}
return this.theServant;
}
@Override
public void setImpersonationIdentities(Map<String, String> credentialMap) {
}
@Override
public void clearImpersonationIdentities() {
}
@Override
public void resetProcesses() {
}
@Override
public void setServiceTimeout(long seconds) {
}
@Override
public void setCurrentInstanceTimeout(long seconds) {
}
}