/** * Constructor. * @param server The remote server. * @param baseMessageQueue My parent message queue. */ public void init(RemoteTask server, BaseMessageQueue baseMessageQueue) throws RemoteException { super.init(baseMessageQueue); m_receiveQueue = server.createRemoteReceiveQueue(baseMessageQueue.getQueueName(), baseMessageQueue.getQueueType()); } /**
/** * Creates new MessageSender. * @param server The remote server. * @param baseMessageQueue My parent message queue. */ public void init(RemoteTask server, BaseMessageQueue baseMessageQueue) throws RemoteException { super.init(baseMessageQueue); m_sendQueue = server.createRemoteSendQueue(baseMessageQueue.getQueueName(), baseMessageQueue.getQueueType()); } /**
if (propIn != null) properties.putAll(propIn); RemoteTable remoteTable = ((RemoteTask)m_remoteObject).makeRemoteTable(strRecordClassName, strTableSessionClassName, properties, propDatabase); String strTableID = this.add(new TableHolder(this, remoteTable)); this.setReturnString(out, strTableID); RemoteReceiveQueue remoteReceiveQueue = ((RemoteTask)m_remoteObject).createRemoteReceiveQueue(strQueueName, strQueueType); String strID = this.find(remoteReceiveQueue); if (strID == null) RemoteSendQueue remoteSendQueue = ((RemoteTask)m_remoteObject).createRemoteSendQueue(strQueueName, strQueueType); String strID = this.find(remoteSendQueue); if (strID == null) ((RemoteTask)m_remoteObject).setRemoteMessageTask(remoteTask); String strPassword = this.getNextStringParam(in, Params.PASSWORD, properties); String strDomain = this.getNextStringParam(in, Params.DOMAIN, properties); Map<String,Object> mapLoginInfo = ((RemoteTask)m_remoteObject).login(strUserName, strPassword, strDomain);
appServer.setRemoteMessageTask(server); // Should have done all the apps in this env! } catch (RemoteException ex) { ex.printStackTrace();
if (m_gbRemoteTaskServer) remoteLockSession = (RemoteLockSession)m_lockServer.makeRemoteSession(LockSession.class.getName());
/** * Setup this popup field linked to this remote table. */ public JComponent setupPopup(FieldList record, String strDesc, String strFieldName, String strComponentName, String strIndexValue) { BaseApplet applet = this.getBaseApplet(); RemoteTable remoteTable = null; try { RemoteTask server = (RemoteTask)applet.getRemoteTask(); synchronized (server) { // In case this is called from another task Map<String, Object> dbProperties = applet.getApplication().getProperties(); remoteTable = server.makeRemoteTable(record.getRemoteClassName(), null, null, dbProperties); } } catch (RemoteException ex) { ex.printStackTrace(); } catch (Exception ex) { ex.printStackTrace(); } RemoteSession remoteSession = remoteTable; boolean bCacheTable = true; return new JCellRemoteComboBox(applet, remoteSession, record, strDesc, strFieldName, strComponentName, bCacheTable, strIndexValue, null); } /**
appServer.setRemoteMessageTask(server); // Should have done all the apps in this env! } catch (RemoteException ex) { ex.printStackTrace();
if (m_gbRemoteTaskServer) remoteLockSession = (RemoteLockSession)m_lockServer.makeRemoteSession(LockSession.class.getName());
/** * Start this service. * Override this to do all the startup. * @return true if successful. */ public Application startupThisApp(Environment env, Map<String, Object> props) { Application application = new MessageInfoApplication(env, props, null); if (env.getDefaultApplication() != null) if (env.getDefaultApplication() != application) { RemoteTask server = (RemoteTask)application.getRemoteTask(null); RemoteTask appServer = (RemoteTask)env.getDefaultApplication().getRemoteTask(null, null, false); if ((server != null) && (appServer != null)) { try { // Tell the remote session who my main session is // so it can know where not to send server record // messages (to eliminate echos in the client). appServer.setRemoteMessageTask(server); // Should have done all the apps in this env! } catch (RemoteException ex) { ex.printStackTrace(); } } } return application; } }