第1阶段

我有一个问题,关闭我的运行Boss实例下蚀,因为我改变了 JNDI口的Boss.当然,我可以关闭控制台看法,但没有 停止按钮(它仍然搜索JNDI口的默认1099端口)。我在找 向前,任何解决方案。谢谢你!

使用的环境:

  • Boss4.0.2(使用 默认的)
  • 日食的3.4.0.(使用Boss工具2.1.1.GA)

默认的港口:1098,1099 改变口:11098,11099

我改变了以下部分jbosspath/server/default/conf/jboss-service.xml:

   <!-- ==================================================================== -->
   <!-- JNDI                                                                 -->
   <!-- ==================================================================== -->

   <mbean code="org.jboss.naming.NamingService"
      name="jboss:service=Naming"
      xmbean-dd="resource:xmdesc/NamingService-xmbean.xml">
      <!-- The call by value mode. true if all lookups are unmarshalled using
      the caller's TCL, false if in VM lookups return the value by reference.
      -->
      <attribute name="CallByValue">false</attribute>
      <!-- The listening port for the bootstrap JNP service. Set this to -1
        to run the NamingService without the JNP invoker listening port.
      -->
      <attribute name="Port">11099</attribute>
      <!-- The bootstrap JNP server bind address. This also sets the default
      RMI service bind address. Empty == all addresses
       -->
      <attribute name="BindAddress">${jboss.bind.address}</attribute>
      <!-- The port of the RMI naming service, 0 == anonymous -->
      <attribute name="RmiPort">11098</attribute>
      <!-- The RMI service bind address. Empty == all addresses
       -->
      <attribute name="RmiBindAddress">${jboss.bind.address}</attribute>
      <!-- The thread pool service used to control the bootstrap lookups -->
      <depends optional-attribute-name="LookupPool"
         proxy-type="attribute">jboss.system:service=ThreadPool</depends>
   </mbean>

   <mbean code="org.jboss.naming.JNDIView"
        name="jboss:service=JNDIView"
        xmbean-dd="resource:xmdesc/JNDIView-xmbean.xml">
   </mbean>

日食安装:

关于我的Boss工具的首选项: 我有一个以前的版本,我拿到了这个问题,我读了一些修正在JbossTools,所以更新,以2.1.1.GA。现在的按钮改变,并且我已经有了一个新的偏好来看,但我不能修改任何东西...似乎是异常的,以及:

错误的对话:

这堆栈跟踪:

javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]]
    at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1385)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:579)
    at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
    at javax.naming.InitialContext.lookup(InitialContext.java:347)
    at org.jboss.Shutdown.main(Shutdown.java:202)
Caused by: javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]
    at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:254)
    at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1370)
    ... 4 more
Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]
    at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:228)
    ... 5 more
Caused by: java.net.ConnectException: Connection refused: connect
    at java.net.PlainSocketImpl.socketConnect(Native Method)
    at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
    at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
    at java.net.Socket.connect(Socket.java:452)
    at java.net.Socket.connect(Socket.java:402)
    at java.net.Socket.<init>(Socket.java:309)
    at java.net.Socket.<init>(Socket.java:211)
    at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:69)
    at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:62)
    at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:224)
    ... 5 more
Exception in thread "main" 

第2阶段:

在创建一个新的服务器在文件/新的/其他/服务器,也没有出现在偏好的选项。现在该停止按工作(服务器收到的关机消息,而无需任何额外的修改该同事发送加入此人员的网络的邀口--没有机会,它现在),但它仍然会引发错误的消息,虽然不同,它无一例外堆跟踪:"服务器Boss4.0服务器无法停止。"

有帮助吗?

解决方案

确定,你有什么要做的是文件的>新>其它->服务器上,并设立了你的Boss服务器。然后,它会出现在偏好->JBossTools->的服务器。

令人费解的。

其他提示

这里是一个详细的解决此问题:日食WTP服务器的连接器不会关闭Boss当jndi口重新映射。

这是因为默认的服务器连接的配置文件不要使用他们自己的别名jndiPort.这个问题还在讨论eclipse.org:http://www.eclipse.org/forums/index.php?t=msg&goto=489439&S=0db4920aab0a501c80a626edff84c17d#msg_489439

该解决方案。serverdef文件在日食:


<eclipse>\plugins\org.eclipse.jst.server.generic.jboss_1.5.105.v200709061325\servers\jboss*.serverdef

他们宣称xml财产jndi口:


<property id="jndiPort"
 label="%jndiPort"
 type="string"
 context="server"
 default="1099" /> 

这仅仅需要被使用在那里的serverdef已经停止命令编码:

所以这样的:


 <stop>
  <mainClass>org.jboss.Shutdown</mainClass>
  <workingDirectory>${serverRootDirectory}/bin</workingDirectory>
  <programArguments>-S</programArguments>
  <vmParameters></vmParameters>
  <classpathReference>jboss</classpathReference>
 </stop>

就变成这样的:


 <stop>
  <mainClass>org.jboss.Shutdown</mainClass>
  <workingDirectory>${serverRootDirectory}/bin</workingDirectory>
  <programArguments>-s jnp://${serverAddress}:${jndiPort}</programArguments>
  <vmParameters></vmParameters>
  <classpathReference>jboss</classpathReference>
 </stop>

该理念对于这一可以核实的比较的定义jndi连接:


 <jndiConnection>
  <providerUrl>jnp://${serverAddress}:${jndiPort}</providerUrl>
<initialContextFactory>org.jnp.interfaces.NamingContextFactory</initialContextFactory>
  <jndiProperty>
   <name></name>
   <value></value>
  </jndiProperty>
 </jndiConnection>

信贷的灵感来自于一般情况下修复去:Moisa Laurentiu弗罗林.这是他们的贡献得到了我看的一种方式取代在${jndiPort}而不是硬编码的价值。

此修正了这两个普通的日食WTP服务器的连接器。我仍然在调查Boss IDE连接

打开jboss-path\bin\shutdown.jar

例如:jboss-4.2.3.GA\bin\shutdown.jar

和打开boss径\bin\关闭。罐\jndi。性能

并改变

java。命名。供应商。url=jnp://localhost:1099java。命名。供应商。url=jnp://localhost:11099

在MyEclipse服务器构成,你发现场"可选择的关机参数",这是充满了默认值

--shutdown

改变它

-s jnp://localhost:11099 --shutdown

编辑:

对不起,这个答案是有关MyEclipse.然而,必须有一些地方在这里你可以指定的Boss关闭命令在环境。也许你看看在"跑"的配置?

你应该修改,在文件"/home/fmoisa/workspace/eclipse/plugins/org.eclipse.jst.server.generic.jboss_1.5.206.v20090115/servers/jboss42.serverdef"这样的:

org.boss.停机 ${serverRootDirectory}/bin -S -Djboss.启动。加载程序。name=关闭。蝙蝠 boss.停机

这样的:

org.boss.停机 ${serverRootDirectory}/bin -S-sjnp://localhost:11099 -Djboss.启动。加载程序。name=关闭。蝙蝠 boss.停机

gl;)

使用的服务器提供的Boss的工具,而不是一个涉及默认从蚀WTP.

然后你可以简单的双击的服务器你可以编辑JNDI口(其顺便说一句.是自动从XML配置如果你不做任何事)。你也可以做到关于设置JNDI口通过命令行参数在启动结构,但是更多的麻烦比的设置口价值观。

这是改变中Boss6.0.0M3.

停止命令现在是:

"-s服务:jms:马绍尔群岛共和国:///jndi/rmi://localhost:1090/jmxrmi"

注意到,该港口也发生了变化: 它不再是JNDI口在1099, 但 马绍尔群岛共和国/JMS口1090.所以,你需要的另一个config参数在服务器的定义。

我不知道是否"JNDI口"参数是必须在所有Boss6.0.0M3服务器。

我有一个修改蚀插在 http://www.cs.hs-rm.de/~可耐福/public/ 其中包含一个服务器定义为6.0.0M3包括这种变化。这个网站也链接到一个Boss论坛主题有有关的更多详细信息,这种变化。

最好的问候

沃尔夫冈*可耐福

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top