facebook

ejb3 deployment on JBoss

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #227327 Reply

    Paul Baker
    Member

    I new to EJB…

    I am trying to run ejb3 with jboss and I am new to ejb…

    Using tutorial from:
    http://docs.jboss.org/ejb3/tutorial/stateless/stateless.html

    Problems:
    1)
    @Stateless, @Remote, @Local causes a syntax error
    See below for usage

    2)
    I am getting errors in the EJB class and both interface classes.

    ACTypeServiceBean:

    public class ACTypeServiceBean implements ACTypeServiceRemote, ACTypeServiceLocal { 

    No error is shown but ACTypeServiceBean is underlined in red.

    ACTypeServiceLocal:

    public interface ACTypeServiceLocal extends ACTypeService { 

    ACTypeService is underlined; error is:
    ACTypeService can not be resolved or is not a valid superinterface.

    ACTypeServiceRemote:
    Same as above.

    Will someone be kind enough to point me in the right direction….
    Please explain if I am missing a file, directory structure problem, etc…

    Thanks in advance…

    /*
     * JBoss, the OpenSource J2EE webOS
     *
     * Distributable under LGPL license.
     * See terms of license at gnu.org.
     */
    package org.jboss.tutorial.stateless.bean;
    
    import javax.ejb.Stateless;
    
    @Stateless   // causes syntax error
    public class CalculatorBean implements CalculatorRemote, CalculatorLocal
    {
       public int add(int x, int y)
       {
          return x + y;
       }
    
       public int subtract(int x, int y)
       {
          return x - y;
       }
    }
    
    #227373 Reply

    Riyad Kalla
    Member

    Moving to OT > Soft Dev, this is not ME related.

    I *think* you are attempting to use JDK 5.0 annotations with the “@Stateless” stuff, so you need to be using Eclipse 3.1M4 or greater. If you have MyEclipse installed then you need to use Eclipse 3.1M4 and MyEclipse 3.8.4 BETA.

    This will not work with Eclipse 3.0.x because it doesn’t support JDK 5.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: ejb3 deployment on JBoss

You must be logged in to post in the forum log in