views:

994

answers:

2

I have a problem with my jboss configuration on eclipse ide :
I had to change the Jboss configuration in jboss-service.xml because the default port used was already in use (1099 port).
A server configuration change on eclipse wasn't taken into account : It seems to me that jndi port in server properties isn't taken into account on start action.
So I 've modified jboss-service.xml in JBOSS/default/conf repository.

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

   <mbean code="org.jboss.naming.NamingService"
      name="jboss:service=Naming">
      <!-- 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">1199</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">1198</attribute>
      <!-- The RMI service bind address. Empty == all addresses
       -->
      <attribute name="RmiBindAddress">${jboss.bind.address}</attribute>
   </mbean>

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

This change is well taken into account on JBoss start but I can't stop it normally. The stop action keep 1099 port, so it kills the java process instead of stopping the server.

Configuration : JBoss 3.2.5 and eclipse 3.4.0

A: 

The server adapter that comes with JBoss Tools (http://jboss.org/tools) picks up the port values automatically from the xml and if that does not work you can double click the server and set the value explicitly.

Max Rydahl Andersen
A: 

JBoss, sometimes does not shutdown the server, so when you try to run it again the port is still in use... or by other factors like messenger or even Mozilla Firefox, if he gets ports like 1099 (jnp) you need to kill the process and try again, you can look across de ports and process in this way:

go to cmd: netstat -ano

look for the PID of the process using the port you need.

go to Task Manager (Choose to show PID column if already not shown) kill the process.

try again... But, the better way to do that is reserving ports for jboss. like for JNP, RMI, WEB and so.