DocumentEngine: refactor getServer() code
This commit is contained in:
parent
462c9cca2f
commit
2100340d06
|
@ -461,23 +461,16 @@ public class DocumentEngine implements DocAction
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// Should work on Client and Server
|
// Should work on Client and Server
|
||||||
InitialContext ctx = CConnection.get().getInitialContext(true);
|
Server server = CConnection.get().getServer();
|
||||||
ServerHome serverHome = (ServerHome)ctx.lookup (ServerHome.JNDI_NAME);
|
if (server != null)
|
||||||
if (serverHome != null)
|
|
||||||
{
|
{
|
||||||
Server server = serverHome.create();
|
String error = server.postImmediate(Env.getCtx(),
|
||||||
if (server != null)
|
m_document.getAD_Client_ID(),
|
||||||
{
|
m_document.get_Table_ID(), m_document.get_ID(),
|
||||||
String error = server.postImmediate(Env.getCtx(),
|
true, m_document.get_TrxName());
|
||||||
m_document.getAD_Client_ID(),
|
m_document.get_Logger().config("Server: " + error == null ? "OK" : error);
|
||||||
m_document.get_Table_ID(), m_document.get_ID(),
|
return error == null;
|
||||||
true, m_document.get_TrxName());
|
|
||||||
m_document.get_Logger().config("Server: " + error == null ? "OK" : error);
|
|
||||||
return error == null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
m_document.get_Logger().config("NoServerHome");
|
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue