我在一个名为Embedded-Remote的核心文件夹下的hornetq-2.3.0.Final jar中设置示例有一些麻烦,我试图在"远程环境"中运行该示例,用于同一LAN中的这两台计算机,如果我在同一台计算机上运行这两个类而不更改任何内容"EmbeddedRemotExample.java"运行正常,但由于此示例缺少配置文件,我不确定如何设置此类以连接到另一台计算机上运行的服务器.阅读api我发现这是一个有效的代码:
`
HashMap map = new HashMap();
map.put("host", "192.168.XXX.XXX");
map.put("port", 5445);
ServerLocator serverLocator = HornetQClient.createServerLocatorWithoutHA(
new TransportConfiguration(NettyConnectorFactory.class.getName(),map));
ClientSessionFactory sf = serverLocator.createSessionFactory();`
Run Code Online (Sandbox Code Playgroud)
但这会产生下一个例外
HornetQException[errorType=NOT_CONNECTED message=HQ119007: Cannot connect to server(s). Tried with all available servers.]
at org.hornetq.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:852)
at org.hornetq.core.example.EmbeddedRemoteExample.main(EmbeddedRemoteExample.java:49)`
Run Code Online (Sandbox Code Playgroud)
我怎么能设置这个具体的例子?
在一台计算机中:org.hornetq.core.example.EmbeddedServer
在另一个:org.hornetq.core.example.EmbeddedRemoteExample
如果条件满足,有没有办法只在Javafx中"渲染"一个组件?我感兴趣的是做一个具有不同角色的用户界面,如果角色允许,只需添加一个组件,我也想继续使用FXML.我没有读过类似的东西.