埋め込み可能なGlassfishアプリのクライアントコンテナを使用しようとしています。私が見つけることができる唯一のリソースは、この魅力的なコードスニペットを含む上記のjavadocです。
import org.glassfish.appclient.client.acc.AppClientContainer;
import org.glassfish.appclient.client.acc.config.TargetServer;
AppClientContainerBuilder builder = AppClientContainer.newBuilder(
new TargetServer("localhost", 3700));
AppClientContainer acc = builder.newContainer(new File("myAC.jar").toURI());
(または、代わりに)
AppClientContainer acc = builder.newContainer(MyClient.class);
それから、
acc.startClient(clientArgs);
// The newContainer method returns as soon as the client's main method returns,
// even if the client has started another thread or is using the AWT event
// dispatcher thread
// At some later point, the program can synchronize with the app client in
// a user-specified way at which point it could invoke
acc.stop();
これはかなり素晴らしいように見えますが、私はこれをさまざまな異なるエラーで数回実行しようとしました。
誰かがこれを使用した経験がありますか、またはこれを使用する方法を説明するいくつかのリソースの方向に私を向けることができますか?