facebook

Writing EJBs [Closed]

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #201384 Reply

    mdichi
    Member

    I’ve been experimenting with writing EJBs. I am curious as to how to add my own business methods to an EJB. For some reason I assumed that simply creating a method in the XBean.java file (in the ejb package) would result in a similarly named method being added to one of the classes that XDoclet creates. I guess I assumed the XBean.java class in the interfaces package is where this would occur. However, I am not seeing this behavior (even after running XDoclet).

    Now the file that contains the interfaces.XBean class says “Do Not Edit!” at the top. So I am not sure if I need to manually add the method to the remote interface (but where?). Or should it be added automatically after running XDoclet (which I am not observing).

    How should this work with MyEclipse?

    Thanks,
    Mike

    #201385 Reply

    mdichi
    Member

    Things seem to work as I expected with the finder methods. I add a finder method to the ejb.XBean class and run XDoclet. Magically, a corresponding method is generated in the home interface (interfaces.XBeanHome).

    I am also using default settings for XDoclet. I simply added the standard EJB doclet to the project and also added the JBoss doclet.

    Mike

    #201388 Reply

    Scott Anderson
    Participant

    Mike,

    You need to tell XDoclet specifically which methods you’d like to include in your public interface upon regeneration by specifying the @ejb.interface-method tag.

    Details on all the XDoclet settings are available in the MyEclipse User Guide or online here:
    http://myeclipseide.com/enterpriseworkbench/help/topic/com.genuitec.myeclipse.doc/html/reference/xdoclet-doc/index.html

    –Scott
    MyEclipse Support

    #201399 Reply

    mdichi
    Member

    Thanks!

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Writing EJBs [Closed]

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