facebook

DAO

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #221768 Reply

    thecrazylab
    Member

    I have created a bmp ejb called Customer and i have added the standard ejb xdoclet tag (all the tag: dao too) but myeclipse can’t generate CustomerDAO and CustomerDAOImpl. I have tested adding this line to the Customer bean class

    
     *  * @ejb.dao class = "org.jcinema.ejb.CustomerDAO"
     *             impl-class = "org.jcinema.ejb.CustomerDAOImpl"
    

    and all works good! What i am doing wrong? is this my fault or is a myeclipse ide problem?

    tnx all 😉

    #221779 Reply

    Greg
    Member

    The standard EJB configuration builds DAO interfaces in the dao package. Make sure that your CustomerEJB is in a package that has the suffix “.ejb”. If you don’t want to use the default DAO interface name, you can specify one with the @ejb.dao class=”” attribute. However, the impl-class attributes doesn’t generate any code. It points to an existing class that implements the DAO interface. So the code that is generated for obtaining a DAO will just create a new instance of this class.

    #221781 Reply

    thecrazylab
    Member

    so using the standard ejb configuration myeclipse ide would have to create a new pockage called .dao? are you sure because it seem really not working…no new package .dao created 🙁 in the .ejb package i have only Customer.java and CustomerBMP.java, this is the link to download my j2ee project

    http://www.utenti.lycos.it/reverseftp/workspace.rar

    test it please and tell me what i am doing wrong

    tnx

    #221806 Reply

    Greg
    Member

    I was unable to open your file with the latest version of WinRar. It said the file was damaged or it was an unknown format.

    #221824 Reply

    thecrazylab
    Member

    excuseme i have fixed the rar and i have added workspace in zip format to be sure 😉

    link: http://utenti.lycos.it/reverseftp/

    #221825 Reply

    thecrazylab
    Member

    do not directly open the zip or rar link (iexplorer seem having problem with this free host), use save as and open after downloaded 🙂
    tnx

    #221827 Reply

    Greg
    Member

    You do have to add the

     * @ejb.dao generate="true"

    tag to your xdoclet tags in the Customer.java file. If you want to specify the DAO file name that will be generated use the class=”” attribute.

Viewing 7 posts - 1 through 7 (of 7 total)
Reply To: DAO

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