[jbosstools-issues] [JBoss JIRA] Commented: (JBIDE-2050) AS (running/stopped) state is not retrieved in Eclipse if the server configuration is not the "default" but another one with different port bindings.

Rob Stryker (JIRA) jira-events at lists.jboss.org
Thu Apr 24 19:15:08 EDT 2008


    [ http://jira.jboss.com/jira/browse/JBIDE-2050?page=comments#action_12410624 ] 
            
Rob Stryker commented on JBIDE-2050:
------------------------------------

Ok my last message was innaccurate. This is interesting.  I had never used that specific feature of JBoss before. 

So... when trying to startup / shutdown, the tooling needs to know the JNDI port... The question ultimately is how to find it. It is usually hard-coded in jboss-service.xml, and that's where the tooling would usually find it.

You, however, have made use of the service binding feature. Rather than editing these ports directly in the jboss-service.xml, you've kept them in another file in a named configuration.

As of now, here's the best work-around I can offer you, which is actually pretty damn good! 

So, for the sake of example, let's call my new configuration "testConfig". The first thing I did was open server/testConfig/conf/jboss-service.xml and modify the store url to make sure the store file would be somewhere in testConfig.

   <mbean code="org.jboss.services.binding.ServiceBindingManager"
     name="jboss.system:service=ServiceBindingManager">
     <attribute name="ServerName">ports-01</attribute>
     <attribute name="StoreURL">${jboss.home.url}/server/testConfig/conf/sample-bindings.xml</attribute>
     <attribute name="StoreFactoryClassName">
       org.jboss.services.binding.XMLServicesStoreFactory
     </attribute>
   </mbean>

The next thing I did was, in the JBoss Servers View, select my server, and in the lower half, browse into XML Configuration -> Ports. In the properties view, you should see one that says "JNDI".  Right-click on that and select "Delete XPath".  Then right-click in the same area and select "New XPath".

The XPath's name ***must*** be         JNDI
The XPath's pattern should be 
   //service-bindings/server[@name='ports-01']/service-config[@name='jboss:service=Naming']/binding

And in the "Attribute Name" field, put "port"

What this is basically doing is it's telling the tooling NOT to look in jboss-service.xml for the JNDI port anymore, but to instead look in the new XPath. It should find the real port there. 

(The reason we had to delete and re-create the xpath rather than modify is that the xpath UI does not currently display another field which limits the searching for the xpath to one specific file.)

I realize this is a little convoluted. I'll leave the bug opened but modify it so that it's a feature request to add support for service bindings more easily.

Hope this helps! Post here if you need any further assistance!

> AS (running/stopped) state is not retrieved in Eclipse if the server configuration is not the "default" but another one with different port bindings.
> -----------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: JBIDE-2050
>                 URL: http://jira.jboss.com/jira/browse/JBIDE-2050
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>    Affects Versions: 2.0.1
>         Environment: Linux 2.6.22-14-generic, Eclipse Europa Version: 3.3.2, JbossToolsPlugin 2.0.1GA-ALL linux, JbossAS 4.2.2.GA
>            Reporter: Mario Balaban
>         Assigned To: Rob Stryker
>             Fix For: 2.1
>
>
> On the same machine I had to create 2 instances of JbossAS, one for testing and another for development. The instance used for testing is using the "default" configuration. The test (default) instance I am able to start and to stop correctly from the Eclipse IDE. The "devel" instance that is a copy of the "default" configuration but has different port bindings (modified jboss-service.xml by uncommenting the tag <mbean code="org.jboss.services.binding.ServiceBindingManager"..../> )  has problems when starting and stopping  from eclipse IDE. In the console window of IDE  I see " [Server] JBoss (MX MicroKernel) [4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=200710221139)] Started in 15s:993ms" but the state of the server in the "Servers" window of the IDE is Starting... It remains "Starting..." till an OutOfMemory is visualized in the IDE. This error happens even when no applications are deployed to the deploy directory of the "devel" configuration. It seems that the problem is associated to different port bindings used by "devel" configuration.   

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       




More information about the jbosstools-issues mailing list