2 Replies Latest reply on Apr 19, 2008 9:42 AM by Timo Roessner

    RemoteBinding: attribute jndiName is undefined

    Timo Roessner Newbie

      Hey folks,

      i am not quite sure wether i am too dumb or wether this is an documentation error....:-)

      The prehistory:

      -> I have a fine running ejb.
      -> I access this EJB via RMI using its JNDI name.
      -> I use the default JNDI-name: $myEarName/$myEJBName/remote

      The problem:

      -> I need to change to RemoteBinding of this JNDI-name to something else
      -> Currently my ejb looks quite simple:

      @Stateless
      public class SendCommand implements ISendCommand {
      // do stuff...
      }
      


      -> I followed the documentation from here: http://docs.jboss.org/ejb3/app-server/tutorial/jndibinding/jndi.html and added the line (via copy & paste)

      @RemoteBinding(jndiName="custom/remote/MySession")


      and imported

      org.jboss.annotation.ejb.RemoteBinding;


      So now it looks like:

      ....
      import org.jboss.annotation.ejb.RemoteBinding;
      
      @Stateless
      @RemoteBinding(jndiName="custom/remote/MySession")
      public class SendCommand implements ISendCommand {
      // do stuff.....
      }
      


      Finally, i added the "jboss-annotations-ejb3.jar" to my build path.

      But when i try to build it, i get:

      SendCommand.java:20: cannot find symbol
       [javac] symbol : method jndiName()
       [javac] location: @interface org.jboss.annotation.ejb.RemoteBinding
       [javac] @RemoteBinding(jndiName="custom/remote/MySession")
       [javac] ^
       [javac] 1 error
      
      BUILD FAILED
      


      Eclipse tells me:

      The attribute jndiName is undefined for the annotation type RemoteBinding ...../ejb/rmi SendCommand.java line 20 1208451365625 88787



      What's going wrong here?

      As far as i can tell, everything looks alright and i followed exactly the documentation?

      Additional Information:

      -> Operating System: Ubuntu 7.10
      -> Java-Version: Java(TM) SE Runtime Environment (build 1.6.0_03-b05)
      -> Jboss: 4.2.2 GA

      Thx for every hint!