3 Replies Latest reply on Feb 2, 2011 3:01 AM by Thomas Kriechbaum

    Some Experiences with JBoss Tools, Eclipse Helios and M2E

    Thomas Kriechbaum Newbie

      Hello,

       

      what are your experiences with JBoss Tools (1.1.0..-Beta2 maven-feature, 2.2.0..-beta2 as-feature), Eclipse Helios (3.6.1), JBoss AS 6 Final and M2Eclipse (0.10.2, 0.11.1 wtp-feature)?

       

      At the moment, I'm facing the following problems:

      • context root of web-module
      • republish after changes
      • module name is part of global JNDI name

       

      For testing purposes I have created some maven modules with m2e.

       

      business (root module)

      + business-ear (application.xml is generated)

      + business-core (ejb module containing the EJB implementation)

      + business-services (ejb client view)

      + business-ws (web module containing a WS that references the local EJB)

       

      ticket (root module)

      + ticket-ear (application.xml is generated)

      + ticket-core (ejb module containing the EJB implementation)

      + ticket-services (ejb client view)

       

      context root of the web-module

      Although business-ear/pom.xml contains a specific context-root, the web-module is only accessible under module-name-version (e.g. business-ws-1.0.0)

       

       <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-ear-plugin</artifactId>
        <version>2.4.1</version>
        <configuration>
            <version>5</version>
            <generateApplicationXml>true</generateApplicationXml>
             <modules>
               <ejbModule>
                   <groupId>org.foo</groupId>
                     <artifactId>business-core</artifactId>
                </ejbModule>
                <webModule>
                     <groupId>org.foo</groupId>
                     <artifactId>business-ws</artifactId>
                     <contextRoot>business-services_v1_0</contextRoot>
                 </webModule>
             </modules>
        </configuration>
      </plugin>
      

       

       

      Do I have to provide some specific settings/configuration in this case?

       

      republish after changes

      The republishing of JEE modules (e.g. WS-Implementation within the web-module) works only, if I perform a "project > clean" on all maven modules. In this case, all maven modules get redeployed correctly. Otherwise, the server state shortly changes to "republish", but the server does not reload the components (=> service behaviour does not change!).

       

      Do I have to change any Eclipse settings to avoid "project > clean" after any changes?

       

      module name is part of global JNDI name

      AFAIK, the EAR name is part of the EJBs global JNDI name.

       

      For example:

      TicketService - EJB3.x Default Remote Business Interface
      ticket-ear/TicketServiceBean/remote-at.logis.was.ticket.TicketService - EJB3.x Remote Business Interface
      

       

      This global name is used to reference this EJB via injection

      @EJB(mappedName="ticket-ear/TicketServiceBean")
      private TicketService ticketService;
      

       

       

      Within Eclipse, the module's version number is not recognized. But when building the components at command line, the version number is added to the EAR by default (e.g. ticket-ear-1.0.0). Therefore, the mapped-name has to be changed to “ticket-ear-1.0.0/TicketServiceBean” before. From my point of view, it is good to have version numbers to support parallel installation of different versions. But how can I tell Eclipse/M2E/... to use version numbers within my workspace as well?

       

       

      Thanks,

      Thomas

        • 1. Some Experiences with JBoss Tools, Eclipse Helios and M2E
          fdemay Newbie

          Hi Thomas,

           

          do you face the same problems with the new version of JBoss Tools ? (3.2.0.CR1)

          • 2. Some Experiences with JBoss Tools, Eclipse Helios and M2E
            vvenkata Newbie

            I am running FC6 and I have eclipse Helios 3.6.1. I downloaded the JBoss-Tools plugins.

            And I used the dropins to add the plugins. When I click on the open perspective for JBoSS AS to start the server, I get the error

            "Problems opening perspective

            'org.jboss.ide.eclipse.as.ui.ASperspective'

            My Linux computer is not online so I couldn't get the updates online.

             

            How do I install the JBoss-tools plugins. Could you pls suggest a way.

             

            Thanks,

            V. V. chalam

            • 3. Some Experiences with JBoss Tools, Eclipse Helios and M2E
              Thomas Kriechbaum Newbie

              Hello,

               

              now I have setup a new Eclipse 3.6.1 installation with JBoss Tools 3.2.0.CR1 and the newest M2Eclipse plugins (org.maven.ide.eclipse.feature 0.12.1.20110112-1712, org.maven.ide.eclipse.wtp.feature 0.11.1.20101108-1810, org.maven.ide.eclipse.temporary.mojos.feature 0.12.0.20101103-1500).

               

              context root of the web-module

              The context root is now resolved as defined in the EARs pom.xml ++

               

              republish after changes

              With the default settings republishing of JEE modules still does not work. I found out, that within the Servers view only a "Full Publish" effects a redeployment of the changed modules. An "Incremential Publish" behaves the same as the "behind-the-scene" redeployment after a source code change.

               

              Do I have to change some Eclipse settings in this case?

               

              module name is part of global JNDI name

              I still have not found a way to influence the application name that is part of the EJB's JNDI name. Within the IDE the JNDI name still starts with ticket-ear (without version information), but a build on the command line would change this JNDI name to ticket-ear-1.0.0 (with version information).

              I know, that I could change the EARs final name, but versioning is a "must-have" in our production environment.

               

              Do you have any ideas?

               

              Thanks,

              Thomas