1 Reply Latest reply on Jul 8, 2005 1:03 PM by Mark Mindenhall

    can Xdoclet create methods in the remote interfaces?

    Jianhui Wu Newbie

      I'm a beginner of JBoss IDE and i'm starting with the JBossIDE Tutorial. I find that when i generated interfaces from the existed EJB, there's no remote method in the generated remote interface. I'm following the tutorial step by step and i'm sure that all the jobs required by the tutorial have been done. Is there any thing missing in the tutorial or the xdoclet actually can't generate the methods in the interface?

        • 1. Re: can Xdoclet create methods in the remote interfaces?
          Mark Mindenhall Newbie

          I'm not certain this is what you are asking, but here is an example from a session bean. If you are only generating the remote interface, change view-type from "both" to "remote".

          This is the XDoclet stuff in the class level javadoc:

          /**
           * @ejb.bean name="Protocol"
           * display-name="Name for Protocol"
           * description="Converts Message objects to and from transport
           * protocol (currently XML)."
           * jndi-name="ejb/Protocol"
           * local-jndi-name="ejb/ProtocolLocal"
           * type="Stateless"
           * view-type="both"
           */
          



          Here is an example business method. You need to have the @ejb.interface-method XDoclet tag for each method.

           /**
           * This method encodes the Message object into an XML string.
           *
           * @param msg The Message object to encode.
           * @return The encoded XML string.
           *
           * @ejb.interface-method view-type = "both"
           */
           public String encode(Message msg)
           {
           // logic
           }
          


          And for ejbCreate, you need the following:

           /**
           *
           * @throws CreateException
           * @ejb.create-method
           */
           public void ejbCreate() throws CreateException
           {
           // logic
           }