/** * Creates a remoting server based on given locator. Will convert any remote invocation requests into * method calls on the given target object.Note: the TransporterServer instance returned will be a live (started) * instance. * * Once the TransporterServer has been returned, it will have already been started automatically, so is a live server * ready to receive requests. * * @param locator - specifies what transport, host and port binding, etc. to use by the remoting server. * @param target - the target POJO to receive the method call upon getting remote invocation requests. * @param isClustered - indicates if want automatic failover on calls to remote servers. * @return TransporterServer. Note, it will already be started upon return. * @throws Exception */ public static TransporterServer createTransporterServer(InvokerLocator locator, Object target, boolean isClustered) throws Exception { if (isClustered && (InternalTransporterServices.getInstance().getDetector() == null)) { setupDetector(); } TransporterServer server = new TransporterServer(locator, target, null, null); server.start(); return server; }