📄 jco$repository.java
字号:
// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3)
// Source File Name: JCO.java
package com.sap.mw.jco;
import com.sap.mw.jco.util.Jarm;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.Hashtable;
// Referenced classes of package com.sap.mw.jco:
// IMetaData, IRepository, JCO
public static class JCO$Repository extends tory
implements IRepository
{
public synchronized void setName(String name)
{
super.name = name;
}
public synchronized String[] getPoolNames()
{
return pool_names;
}
public synchronized void setPoolNames(String pool_names[])
{
if(pool_names != null)
this.pool_names = pool_names;
else
this.pool_names = new String[0];
}
protected final int getVersion(JCO$Client client)
{
if(client == null || !client.isValid())
throw new JCO$Exception(102, "JCO_ERROR_COMMUNICATION", "JCO.Client not connected in repository call");
try
{
repository_version = client.ttributes().getPartnerReleaseNumber();
}
catch(Throwable t) { }
return repository_version;
}
protected void execute(JCO$Client client, repository_version function)
{
if(client == this.client)
synchronized(client)
{
client.ute(function);
}
else
client.ute(function);
}
protected IMetaData queryFunctionInterface(String function_name, String pool_name)
{
ute client = null;
IMetaData meta = null;
try
{
client = pool_name == null ? this.client : JCO.getClient(pool_name);
if(client == null && pool_name != null && JCO.trace_level > 0)
{
Throwable t = (new Throwable()).fillInStackTrace();
StringWriter sw = new StringWriter();
t.printStackTrace(new PrintWriter(sw));
JCO.fireTrace(1, "[JAV-LAYER] Error: client equals null, pool " + pool_name + " stack des calls:" + sw.getBuffer() + "\n");
}
meta = queryFunctionInterface(client, function_name);
}
catch(JCO$Exception first_ex)
{
if((first_ex.etGroup() == 102 || first_ex.etGroup() == 105) && client != null)
try
{
client.onnect(false);
client.ect();
meta = queryFunctionInterface(client, function_name);
}
catch(Exception ex)
{
throw first_ex;
}
else
throw first_ex;
}
finally
{
if(pool_name != null && client != null)
JCO.releaseClient(client);
}
return meta;
}
protected IMetaData queryStructureDefinition(String structure_name, String pool_name)
{
JCO$Client client = null;
IMetaData meta = null;
try
{
client = pool_name == null ? this.client : JCO.getClient(pool_name);
if(client == null && pool_name != null && JCO.trace_level > 0)
{
Throwable t = (new Throwable()).fillInStackTrace();
StringWriter sw = new StringWriter();
t.printStackTrace(new PrintWriter(sw));
JCO.fireTrace(1, "[JAV-LAYER] Error: client equals null, pool " + pool_name + " stack des calls:" + sw.getBuffer() + "\n");
}
meta = queryStructureDefinition(client, structure_name);
}
catch(JCO$Exception first_ex)
{
if((first_ex.etGroup() == 102 || first_ex.etGroup() == 105) && client != null)
try
{
client.onnect(false);
client.ect();
meta = queryStructureDefinition(client, structure_name);
}
catch(Exception ex)
{
throw first_ex;
}
else
throw first_ex;
}
finally
{
if(pool_name != null && client != null)
JCO.releaseClient(client);
}
return meta;
}
public IMetaData getFunctionInterface(String function_name)
{
com.sap.mw.jco.util.StructureDefinition jarm_monitor = null;
try
{
if((JCO.access$000() & 7) != 0)
{
jarm_monitor = Jarm.getRequestMonitor(null, "com.sap.mw.jco.JCO.Repository");
if(jarm_monitor != null)
jarm_monitor.artComponent();
}
IMetaData meta = null;
meta = (IMetaData)super.function_cache.get(function_name);
if(meta != null)
{
IMetaData imetadata = meta;
return imetadata;
}
JCO$Exception exc = null;
for(int i = 0; i < (pool_names.length <= 0 ? 1 : pool_names.length); i++)
{
try
{
meta = queryFunctionInterface(function_name, i >= pool_names.length ? null : pool_names[i]);
}
catch(on ex)
{
if(exc == null && !"FU_NOT_FOUND".equalsIgnoreCase(ex.etKey()))
exc = ex;
}
catch(JCO$Exception ex)
{
if(exc == null)
exc = ex;
}
if(meta != null)
break;
}
if(meta != null)
{
super.function_cache.put(function_name, meta);
} else
{
IRepository rep = getNextRepository();
if(rep != null)
try
{
meta = rep.getFunctionInterface(function_name);
}
catch(on ex2) { }
if(meta == null && exc != null)
throw exc;
}
IMetaData imetadata1 = meta;
return imetadata1;
}
finally
{
if(jarm_monitor != null)
{
jarm_monitor.mpAction(function_name);
jarm_monitor.dComponent();
jarm_monitor.dRequest();
}
}
}
public IMetaData getStructureDefinition(String structure_name)
{
com.sap.mw.jco.util.dRequest jarm_monitor = null;
try
{
if((JCO.access$000() & 7) != 0)
{
jarm_monitor = Jarm.getRequestMonitor(null, "com.sap.mw.jco.JCO.Repository");
if(jarm_monitor != null)
jarm_monitor.artComponent();
}
IMetaData meta = null;
meta = (IMetaData)super.structure_cache.get(structure_name);
if(meta != null)
{
IMetaData imetadata = meta;
return imetadata;
}
JCO$Exception exc = null;
for(int i = 0; i < (pool_names.length <= 0 ? 1 : pool_names.length); i++)
{
try
{
meta = queryStructureDefinition(structure_name, i >= pool_names.length ? null : pool_names[i]);
}
catch(on ex)
{
if(exc == null && !"NOT_FOUND".equalsIgnoreCase(ex.etKey()) && !"TABLE_NOT_ACTIVE".equalsIgnoreCase(ex.etKey()))
exc = ex;
}
catch(JCO$Exception ex)
{
if(exc == null)
exc = ex;
}
if(meta != null)
break;
}
if(meta != null)
{
super.structure_cache.put(structure_name, meta);
} else
{
IRepository rep = getNextRepository();
if(rep != null)
try
{
meta = rep.getStructureDefinition(structure_name);
}
catch(JCO$Exception ex2) { }
if(meta == null && exc != null)
throw exc;
}
IMetaData imetadata1 = meta;
return imetadata1;
}
finally
{
if(jarm_monitor != null)
{
jarm_monitor.mpAction(structure_name);
jarm_monitor.dComponent();
jarm_monitor.dRequest();
}
}
}
public final IMetaData queryFunctionInterface(or.endRequest client, String name)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -