DocumentEngine: refactor getServer() code
This commit is contained in:
parent
462c9cca2f
commit
2100340d06
|
@ -461,11 +461,7 @@ 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 (serverHome != null)
|
|
||||||
{
|
|
||||||
Server server = serverHome.create();
|
|
||||||
if (server != null)
|
if (server != null)
|
||||||
{
|
{
|
||||||
String error = server.postImmediate(Env.getCtx(),
|
String error = server.postImmediate(Env.getCtx(),
|
||||||
|
@ -476,9 +472,6 @@ public class DocumentEngine implements DocAction
|
||||||
return error == null;
|
return error == null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
m_document.get_Logger().config("NoServerHome");
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
m_document.get_Logger().config("(ex) " + e.getMessage());
|
m_document.get_Logger().config("(ex) " + e.getMessage());
|
||||||
|
|
Loading…
Reference in New Issue