facebook

EJB Code generation with Xdoclet [closed]

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

    cgogineni
    Member

    Hello,

    I am using automatic code generation for EJB interfaces. I am successful so far. Now I updated entity bean class two new methods. But for some reason when I run Xdoclet, those two methods are not going into Data class that generated. If I add methods manually into Data class they are getting erased everytime I run Xdoclet.

    Can some one help me.

    Thanks,
    CHandra

    #222948 Reply

    Riyad Kalla
    Member

    Chandra I have asked our XDoclet guru to have a look at this.

    #223049 Reply

    Greg
    Member

    What data class isn’t getting updated? A dataobject? or other interface? Try earsing the existing data class and when it gets regenerated see if it contains the new methods. Do these new methods have to be annotated with xdoclet tags for them to be added to the data class?

    #223061 Reply

    cgogineni
    Member

    Dataobject is not getting updated. It is getting updated only if I add annotation @ejb.persistence. But In my case I want to add couple of methods to Data objects for which there is no database column. I have declared them in Bean class and added annotation @ejb.interface-method view-type =”local”

    Thanks
    Chandra

    #223178 Reply

    Greg
    Member

    Data objects are really just “value objects” and aren’t meant to hold any business logic. So the value/data objects are just going to hold the fields of your entity bean. However, you can add your own custom code to each data object using a merge directory. However, this would add the same code to each entity bean. If this is ok let me know and I can describe how to use the merge file if you are unfamliar with that.

    #223232 Reply

    cgogineni
    Member

    That wouldn’t work for me. I do not want to add the same fields to every object. I will build aother data object on the top(manually) to get around the problem.

    Thanks for your help.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: EJB Code generation with Xdoclet [closed]

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